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