2 writes to Name
Aspire.Hosting (1)
Aspire.Hosting.Tests (1)
246 references to Name
Aspire.Hosting (50)
Dcp\DcpExecutor.cs (7)
688_logger.LogWarning("Encountered the same service-endpoint combination more than once for {EndpointName} on resource {ResourceName} when creating default endpoint services. This should never happen.", endpoint.Name, sp.ModelResource.Name);
718svc.Annotate(CustomResource.EndpointNameAnnotation, endpoint.Name);
813_logger.LogDebug("Using persisted public port {Port} for proxyless endpoint '{EndpointName}' on persistent resource '{ResourceName}'.", persistedPort, endpoint.Name, resource.Name);
818_logger.LogDebug("Allocated public port {Port} for proxyless endpoint '{EndpointName}' on resource '{ResourceName}'.", publicPort, endpoint.Name, resource.Name);
825_logger.LogWarning("Failed to persist public port {Port} for proxyless endpoint '{EndpointName}' on persistent resource '{ResourceName}'. Enable user secrets, set a fixed public port, or configure the endpoint to use a proxy to avoid recreating the persistent resource each run.", publicPort, endpoint.Name, resource.Name);
865_logger.LogDebug("Ignoring invalid persisted public port value '{Port}' for proxyless endpoint '{EndpointName}' on persistent resource '{ResourceName}'.", configuredPort, endpoint.Name, resource.Name);
873return $"Resources:{resource.Name}:{endpoint.Name}:port";
Orchestrator\ApplicationOrchestrator.cs (7)
326_logger.LogTrace("Setting primary launch profile endpoint to '{EndpointName}' for resource '{ResourceName}'.", endpoint.Name, resource.Name);
418_logger.LogTrace("Added URL '{Url}' for endpoint '{EndpointName}' on resource '{ResourceName}'.", url.Url, endpoint.Name, resource.Name);
425_logger.LogTrace("Added additional URL '{Url}' for endpoint '{EndpointName}' on resource '{ResourceName}'.", additionalUrl.Url, endpoint.Name, resource.Name);
483var primaryUrl = urls.FirstOrDefault(u => string.Equals(u.Endpoint?.EndpointName, primaryLaunchProfileEndpoint.Name, StringComparisons.EndpointAnnotationName));
494_logger.LogTrace("Applying path '{Path}' from URL '{Url}' for primary launch profile endpoint '{EndpointName}' to other launch profile endpoints for resource '{ResourceName}'.", primaryPath, primaryUrl.Url, primaryLaunchProfileEndpoint.Name, resource.Name);
519_logger.LogTrace("URL '{Url}' for primary launch profile endpoint '{EndpointName}' for resource '{ResourceName}' does not have a path to apply to other launch profile endpoints.", primaryUrl.Url, primaryLaunchProfileEndpoint.Name, resource.Name);
527_logger.LogTrace("Could not find URL for primary launch profile endpoint '{EndpointName}' for resource '{ResourceName}'.", primaryLaunchProfileEndpoint.Name, resource.Name);
Aspire.Hosting.Azure.AppContainers (5)
ContainerAppContext.cs (4)
149throw new NotSupportedException($"The endpoint(s) {string.Join(", ", unsupportedEndpoints.Select(r => $"'{r.Endpoint.Name}'"))} specify an unsupported transport. The supported transports are 'http', 'http2', and 'tcp'.");
231_endpointMapping[endpoint.Name] = new(scheme, NormalizedContainerAppName, port, targetPort, true, httpIngress.External, endpoint.TlsEnabled);
239.Select(r => r.Endpoint.Name)
263_endpointMapping[endpoint.Name] = new(endpoint.UriScheme, NormalizedContainerAppName, resolved.ExposedPort.Value ?? g.Port.Value, g.Port.Value, false, g.External, endpoint.TlsEnabled);
Aspire.Hosting.Azure.AppService (5)
Aspire.Hosting.Azure.Kusto.Tests (2)
Aspire.Hosting.Azure.Sandboxes (9)
Aspire.Hosting.Azure.Tests (16)
Aspire.Hosting.Blazor (2)
Aspire.Hosting.Blazor.Tests (1)
Aspire.Hosting.Browsers (2)
Aspire.Hosting.Browsers.Tests (2)
Aspire.Hosting.DevTunnels (2)
Aspire.Hosting.Docker (2)
Aspire.Hosting.Foundry (3)
Aspire.Hosting.Foundry.Tests (4)
Aspire.Hosting.Garnet.Tests (2)
Aspire.Hosting.Java.Tests (2)
Aspire.Hosting.JavaScript (1)
Aspire.Hosting.Kafka.Tests (4)
Aspire.Hosting.Keycloak.Tests (6)
Aspire.Hosting.Kubernetes (7)
KubernetesResource.cs (7)
256EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), httpMapping.Port, endpoint.Name);
276EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), HelmValue.Literal(portValue), endpoint.Name, ServicePort: servicePort);
285var paramName = $"port_{endpoint.Name}".ToHelmValuesSectionName();
291EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), helmValue, endpoint.Name);
Aspire.Hosting.Maui.Tests (1)
Aspire.Hosting.Milvus.Tests (5)
Aspire.Hosting.MongoDB.Tests (2)
Aspire.Hosting.MySql.Tests (2)
Aspire.Hosting.Nats.Tests (2)
Aspire.Hosting.Oracle.Tests (3)
Aspire.Hosting.PostgreSQL.Tests (4)
Aspire.Hosting.Qdrant.Tests (8)
Aspire.Hosting.RabbitMQ.Tests (4)
Aspire.Hosting.Radius (6)
Aspire.Hosting.Redis (1)
Aspire.Hosting.Redis.Tests (3)
Aspire.Hosting.Seq.Tests (4)
Aspire.Hosting.SqlServer.Tests (1)
Aspire.Hosting.Tests (67)
Dashboard\DashboardResourceTests.cs (14)
210var otlpGrpcEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName);
211var otlpHttpEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
244var otlpGrpcEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName);
245var otlpHttpEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
287var otlpGrpcEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName);
288var otlpHttpEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
315var frontendEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name is "http" or "https");
317Assert.Equal(expectedEndpointName, frontendEndpoint.Name);
503Assert.DoesNotContain(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName);
549Assert.Contains(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
862if (endpoint.Name == KnownEndpointNames.OtlpGrpcEndpointName)
866else if (endpoint.Name == KnownEndpointNames.OtlpHttpEndpointName)
870else if (endpoint.Name == "http")
874else if (endpoint.Name == "https")
KestrelConfigTests.cs (10)
29Assert.Equal("http", a.Name);
35Assert.Equal("ExplicitHttp", a.Name);
65Assert.Equal("http", a.Name);
71Assert.Equal("ExplicitHttp", a.Name);
98Assert.Equal("https", a.Name);
115Assert.Equal("FirstHttpEndpoint", a.Name);
123Assert.Equal("SecondHttpEndpoint", a.Name);
284.WithEndpointsInEnvironment(e => e.Name != "FirstHttpEndpoint")
285.WithEndpointsInEnvironment(e => e.Name != "ExplicitProxiedHttp");
457endpoint.AllocatedEndpoint = new AllocatedEndpoint(endpoint, "localhost", endpoint.Port ?? 0, targetPortExpression: $"port_{endpoint.Name}");
WithEndpointTests.cs (20)
173.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single();
212.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single();
247.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single();
330.Single(endpoint => string.Equals(endpoint.Name, "callback-http", EndpointAnnotationName));
346.Single(endpoint => string.Equals(endpoint.Name, "callback-https", EndpointAnnotationName));
363var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "mybinding");
378var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "https");
392var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "mybinding");
416Assert.Equal("mybinding", endpoints[0].Name);
710.WithEndpointsInEnvironment(e => e.Name != "dontinjectme");
783.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single();
919var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
935var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "https");
951var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
968var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
985var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
1041var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "api");
1059var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
1076var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
1093var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp.Tests (3)
TestProject.AppHost (1)