2 writes to Name
Aspire.Hosting (1)
Aspire.Hosting.Tests (1)
160 references to Name
Aspire.Hosting (41)
Dcp\DcpExecutor.cs (17)
1036throw new InvalidOperationException($"Service '{svc.Metadata.Name}' needs to specify a port for endpoint '{sp.EndpointAnnotation.Name}' since it isn't using a proxy.");
1122string.Equals(swr.EndpointAnnotation.Name, endpoint.Name, StringComparisons.EndpointAnnotationName)
1127throw new InvalidDataException($"The '{endpoint.Name}' on resource '{ts.ResourceName}' should have an associated DCP Service resource already set up");
1235svc.Annotate(CustomResource.EndpointNameAnnotation, endpoint.Name);
1299if (!processedEndpoints.Add((re.Resource.Name, endpoint.Name)))
1309endpoint.Name,
1325string.Equals(swr.EndpointAnnotation.Name, endpoint.Name, StringComparisons.EndpointAnnotationName)
1330throw new InvalidDataException($"Host endpoint '{endpoint.Name}' on resource '{re.Resource.Name}' should have an associated DCP Service resource already set up");
1349svc.Annotate(CustomResource.EndpointNameAnnotation, endpoint.Name);
2464throw new InvalidOperationException($"The endpoint '{ea.Name}' for container resource '{modelResourceName}' must specify the {nameof(EndpointAnnotation.TargetPort)} value");
2471throw new InvalidOperationException($"Resource '{modelResourceName}' uses multiple replicas and a proxy-less endpoint '{ea.Name}'. These features do not work together.");
2476throw new InvalidOperationException($"The endpoint '{ea.Name}' for resource '{modelResourceName}' is not using a proxy, and it has a value of {nameof(EndpointAnnotation.Port)} property that is different from the value of {nameof(EndpointAnnotation.TargetPort)} property. For proxy-less endpoints they must match.");
2486$"The endpoint '{ea.Name}' for resource '{modelResourceName}' requested a proxy ({nameof(ea.IsProxied)} is true). Non-container resources cannot be proxied when both {nameof(ea.TargetPort)} and {nameof(ea.Port)} are specified with the same value.");
2492$"Resource '{modelResourceName}' can have multiple replicas, and it uses endpoint '{ea.Name}' that has {nameof(ea.TargetPort)} property set. Each replica must have a unique port; setting {nameof(ea.TargetPort)} is not allowed.");
3039endpoint = endpoints.FirstOrDefault(e => string.Equals(e.Name, endpointName, StringComparisons.EndpointAnnotationName));
Orchestrator\ApplicationOrchestrator.cs (7)
237_logger.LogTrace("Setting primary launch profile endpoint to '{EndpointName}' for resource '{ResourceName}'.", endpoint.Name, resource.Name);
329_logger.LogTrace("Added URL '{Url}' for endpoint '{EndpointName}' on resource '{ResourceName}'.", url.Url, endpoint.Name, resource.Name);
336_logger.LogTrace("Added additional URL '{Url}' for endpoint '{EndpointName}' on resource '{ResourceName}'.", additionalUrl.Url, endpoint.Name, resource.Name);
394var primaryUrl = urls.FirstOrDefault(u => string.Equals(u.Endpoint?.EndpointName, primaryLaunchProfileEndpoint.Name, StringComparisons.EndpointAnnotationName));
405_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);
430_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);
438_logger.LogTrace("Could not find URL for primary launch profile endpoint '{EndpointName}' for resource '{ResourceName}'.", primaryLaunchProfileEndpoint.Name, resource.Name);
Aspire.Hosting.Azure.AppContainers (4)
ContainerAppContext.cs (4)
154throw 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'.");
236_endpointMapping[endpoint.Name] = new(scheme, NormalizedContainerAppName, port, targetPort, true, httpIngress.External, endpoint.TlsEnabled);
244.Select(r => r.Endpoint.Name)
268_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 (3)
Aspire.Hosting.Azure.Kusto.Tests (2)
Aspire.Hosting.Azure.Tests (10)
Aspire.Hosting.DevTunnels (2)
Aspire.Hosting.Docker (2)
Aspire.Hosting.Foundry.Tests (1)
Aspire.Hosting.Garnet.Tests (2)
Aspire.Hosting.JavaScript (1)
Aspire.Hosting.Kafka.Tests (4)
Aspire.Hosting.Keycloak.Tests (4)
Aspire.Hosting.Kubernetes (7)
KubernetesResource.cs (7)
191EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), httpMapping.Port, endpoint.Name);
201EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), HelmValue.Literal(portValue), endpoint.Name);
210var paramName = $"port_{endpoint.Name}".ToHelmValuesSectionName();
216EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), helmValue, endpoint.Name);
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.Redis (1)
Aspire.Hosting.Redis.Tests (3)
Aspire.Hosting.Seq.Tests (4)
Aspire.Hosting.SqlServer.Tests (1)
Aspire.Hosting.Tests (32)
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}");
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp.Tests (3)
TestProject.AppHost (1)