2 writes to Name
Aspire.Hosting (1)
Aspire.Hosting.Tests (1)
269 references to Name
Aspire.Hosting (50)
Dcp\DcpExecutor.cs (7)
679_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);
709svc.Annotate(CustomResource.EndpointNameAnnotation, endpoint.Name);
847_logger.LogDebug("Using persisted public port {Port} for proxyless endpoint '{EndpointName}' on persistent resource '{ResourceName}'.", persistedPort, endpoint.Name, resource.Name);
852_logger.LogDebug("Allocated public port {Port} for proxyless endpoint '{EndpointName}' on resource '{ResourceName}'.", publicPort, endpoint.Name, resource.Name);
859_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);
901_logger.LogDebug("Ignoring invalid persisted public port value '{Port}' for proxyless endpoint '{EndpointName}' on persistent resource '{ResourceName}'.", configuredPort, endpoint.Name, resource.Name);
909return $"Resources:{resource.Name}:{endpoint.Name}:port";
Orchestrator\ApplicationOrchestrator.cs (7)
324_logger.LogTrace("Setting primary launch profile endpoint to '{EndpointName}' for resource '{ResourceName}'.", endpoint.Name, resource.Name);
416_logger.LogTrace("Added URL '{Url}' for endpoint '{EndpointName}' on resource '{ResourceName}'.", url.Url, endpoint.Name, resource.Name);
423_logger.LogTrace("Added additional URL '{Url}' for endpoint '{EndpointName}' on resource '{ResourceName}'.", additionalUrl.Url, endpoint.Name, resource.Name);
481var primaryUrl = urls.FirstOrDefault(u => string.Equals(u.Endpoint?.EndpointName, primaryLaunchProfileEndpoint.Name, StringComparisons.EndpointAnnotationName));
492_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);
517_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);
525_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)
159throw 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'.");
241_endpointMapping[endpoint.Name] = new(scheme, NormalizedContainerAppName, port, targetPort, true, httpIngress.External,
250.Select(r => r.Endpoint.Name)
274_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.ServiceBus (1)
Aspire.Hosting.Azure.Tests (20)
Aspire.Hosting.Blazor (2)
Aspire.Hosting.Blazor.Tests (5)
Aspire.Hosting.Browsers (2)
Aspire.Hosting.Browsers.Tests (2)
Aspire.Hosting.DevTunnels (2)
Aspire.Hosting.Docker (2)
Aspire.Hosting.Dotnet (1)
Aspire.Hosting.Dotnet.Tests (4)
Aspire.Hosting.Foundry (3)
Aspire.Hosting.Foundry.Tests (4)
Aspire.Hosting.Garnet.Tests (2)
Aspire.Hosting.Java.Tests (2)
Aspire.Hosting.JavaScript (3)
Aspire.Hosting.JavaScript.Tests (2)
Aspire.Hosting.Kafka.Tests (4)
Aspire.Hosting.Keycloak.Tests (6)
Aspire.Hosting.Kubernetes (7)
KubernetesResource.cs (7)
254EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), httpMapping.Port, endpoint.Name);
274EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), HelmValue.Literal(portValue), endpoint.Name, ServicePort: servicePort);
283var paramName = $"port_{endpoint.Name}".ToHelmValuesSectionName();
289EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), helmValue, endpoint.Name);
Aspire.Hosting.Maui.Tests (3)
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 (9)
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)
228var otlpGrpcEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName);
229var otlpHttpEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
262var otlpGrpcEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName);
263var otlpHttpEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
305var otlpGrpcEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName);
306var otlpHttpEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
333var frontendEndpoint = Assert.Single(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name is "http" or "https");
335Assert.Equal(expectedEndpointName, frontendEndpoint.Name);
521Assert.DoesNotContain(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName);
567Assert.Contains(dashboard.Annotations.OfType<EndpointAnnotation>(), e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
882if (endpoint.Name == KnownEndpointNames.OtlpGrpcEndpointName)
886else if (endpoint.Name == KnownEndpointNames.OtlpHttpEndpointName)
890else if (endpoint.Name == "http")
894else 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");
459endpoint.AllocatedEndpoint = new AllocatedEndpoint(endpoint, "localhost", endpoint.Port ?? 0, targetPortExpression: $"port_{endpoint.Name}");
WithEndpointTests.cs (20)
198.Single(endpoint => string.Equals(endpoint.Name, "callback-http", EndpointAnnotationName));
214.Single(endpoint => string.Equals(endpoint.Name, "callback-https", EndpointAnnotationName));
241Assert.Equal("mybinding", endpoints[0].Name);
535.WithEndpointsInEnvironment(e => e.Name != "dontinjectme");
658var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
674var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "https");
690var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
707var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
724var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
780var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "api");
798var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
815var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
832var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
861.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single();
878.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single();
913.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single();
997var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "mybinding");
1012var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "https");
1026var endpoint = Assert.Single(resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "mybinding");
1039.Where(e => string.Equals(e.Name, "mybinding", EndpointAnnotationName)).Single();
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp.Tests (3)
TestProject.AppHost (1)