5 references to Slug
NativeIntegrations.DockerCompose (5)
DockerComposeGenerator.cs (5)
23
return $"aspire-{
Slug
(Path.GetFileName(directory))[..Math.Min(
Slug
(Path.GetFileName(directory)).Length, 16)]}-{ShortSlug(name, 12)}-{ShortSlug(environmentName, 12)}-{identity}";
567
internal static string ServiceName(string value) => Regex.IsMatch(value, "^[a-z0-9][a-z0-9-]{0,62}$", RegexOptions.CultureInvariant) ? value : $"{
Slug
(value)}-{Hash(value)}";
575
private static string ShortSlug(string value, int length) =>
Slug
(value)[..Math.Min(
Slug
(value).Length, length)];