2 writes to Name
Aspire.Hosting (1)
ApplicationModel\EndpointAnnotation.cs (1)
138Name = name;
Aspire.Hosting.Tests (1)
ExpressionResolverTests.cs (1)
284Name = "http",
279 references to Name
Aspire.Hosting (52)
ApplicationModel\EndpointAnnotation.cs (1)
370AllocatedEndpointSnapshot.SetException(new InvalidOperationException($"The endpoint `{Name}` is not allocated"));
ApplicationModel\EndpointReference.cs (3)
31.Select(a => a.Name) 267.SingleOrDefault(a => string.Equals(a.Name, EndpointName, StringComparisons.EndpointAnnotationName)); 303EndpointName = endpoint.Name;
ApplicationModel\EndpointUpdateContext.cs (1)
19public string Name => _endpointAnnotation.Name;
ApplicationModel\HostUrl.cs (1)
147return resource.GetEndpoint(endpoint.Name, networkContext);
ApplicationModel\IComputeEnvironmentResource.cs (3)
55$"Compute environment '{Name}' cannot provide browser origins for endpoint '{endpoint.Name}' on resource '{endpointReference.Resource.Name}' because it does not implement deployed browser-origin resolution. " + 75_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.") 91throw new InvalidOperationException($"Endpoint '{endpoint.Name}' must specify a port for scheme '{scheme}'.");
ApplicationModel\ResourceExtensions.cs (2)
793endpoints.FirstOrDefault(e => string.Equals(e.Name, endpointName, StringComparisons.EndpointAnnotationName)) : 817endpoints.FirstOrDefault(e => string.Equals(e.Name, endpointName, StringComparisons.EndpointAnnotationName)) :
Ats\CoreExports.cs (1)
204endpoint => includedEndpointNames.Contains(endpoint.Name));
Dcp\ContainerCreator.cs (1)
398return dashboard.Endpoints.Where(endpoint => endpointNames.Contains(endpoint.Name)).ToArray();
Dcp\ContainerNetworkEndpointProvisioner.cs (5)
190StringComparers.EndpointAnnotationName.Equals(serviceWithResource.EndpointAnnotation.Name, endpoint.Name)); 193throw new InvalidDataException($"Host endpoint '{endpoint.Name}' on resource '{hostResource.Resource.Name}' should have an associated DCP Service resource already set up"); 210service.Annotate(CustomResource.EndpointNameAnnotation, endpoint.Name); 253endpoint.Name,
Dcp\DcpExecutor.cs (4)
693_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); 730svc.Annotate(CustomResource.EndpointNameAnnotation, endpoint.Name); 834_logger.LogDebug("Allocated public port {Port} for proxyless endpoint '{EndpointName}' on resource '{ResourceName}'.", publicPort, endpoint.Name, resource.Name); 845return new PersistentPortAllocationKey(resource.Name, endpoint.Name);
Dcp\DcpModelUtilities.cs (10)
39throw new InvalidOperationException($"The endpoint '{endpoint.Name}' for container resource '{modelResourceName}' must specify the {nameof(EndpointAnnotation.TargetPort)} value"); 44throw new InvalidOperationException($"The endpoint '{endpoint.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."); 113throw new InvalidOperationException($"Resource '{modelResourceName}' uses multiple replicas and a proxy-less endpoint '{ea.Name}'. These features do not work together."); 123$"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."); 129$"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."); 238throw new InvalidOperationException($"Service '{svc.Metadata.Name}' needs to specify a port for endpoint '{sp.EndpointAnnotation.Name}' since it isn't using a proxy."); 358string.Equals(swr.EndpointAnnotation.Name, endpoint.Name, StringComparisons.EndpointAnnotationName) 363throw new InvalidDataException($"The '{endpoint.Name}' on resource '{ts.ResourceName}' should have an associated DCP Service resource already set up"); 388endpoint = endpoints.FirstOrDefault(e => string.Equals(e.Name, endpointName, StringComparisons.EndpointAnnotationName));
Dcp\DcpNameGenerator.cs (2)
127: GetObjectNameForResource(resource, _options.Value, endpoint.Name); 191=> $"{resource.Name}|{endpoint.Name}|{targetNetworkId.Value}";
Dcp\PersistentPortAllocator.cs (1)
142var publicPortKey = new PersistentPortAllocationKey(resource.Name, endpoint.Name);
Devcontainers\DevcontainerPortForwardingEventingSubscriber.cs (1)
47$"{@event.Resource.Name}-{endpoint.Name}");
Orchestrator\ApplicationOrchestrator.cs (8)
345_logger.LogTrace("Setting primary launch profile endpoint to '{EndpointName}' for resource '{ResourceName}'.", endpoint.Name, resource.Name); 437_logger.LogTrace("Added URL '{Url}' for endpoint '{EndpointName}' on resource '{ResourceName}'.", url.Url, endpoint.Name, resource.Name); 444_logger.LogTrace("Added additional URL '{Url}' for endpoint '{EndpointName}' on resource '{ResourceName}'.", additionalUrl.Url, endpoint.Name, resource.Name); 505var primaryUrl = urls.FirstOrDefault(u => string.Equals(u.Endpoint?.EndpointName, primaryLaunchProfileEndpoint.Name, StringComparisons.EndpointAnnotationName)); 516_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); 541_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); 549_logger.LogTrace("Could not find URL for primary launch profile endpoint '{EndpointName}' for resource '{ResourceName}'.", primaryLaunchProfileEndpoint.Name, resource.Name); 600.Where(url => string.Equals(url.Annotation.Endpoint!.EndpointName, endpoint.Name, StringComparisons.EndpointAnnotationName))
ProjectResourceBuilderExtensions.cs (3)
845var url = context.Urls.FirstOrDefault(u => string.Equals(u.Endpoint?.EndpointName, endpoint.Name, StringComparisons.EndpointAnnotationName)); 904projectResource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault(sb => sb.UriScheme == scheme || string.Equals(sb.Name, scheme, StringComparisons.EndpointAnnotationName)); 1299context.EnvironmentVariables[$"Kestrel__Endpoints__{e.EndpointAnnotation.Name}__Url"] = url;
Publishing\ManifestPublishingContext.cs (2)
565Writer.WriteStartObject(endpoint.Name); 1295endpoint.Endpoint.Resource.Name, endpoint.Endpoint.EndpointAnnotation.Name, endpoint.Property.ToString(),
ResourceBuilderExtensions.cs (3)
1774.SingleOrDefault(ea => string.Equals(ea.Name, endpointName, StringComparisons.EndpointAnnotationName)); 1839!builder.Resource.Annotations.OfType<EndpointAnnotation>().Any(endpoint => string.Equals(endpoint.Name, endpointName, StringComparisons.EndpointAnnotationName))) 1877.FirstOrDefault(sb => string.Equals(sb.Name, resolvedName, StringComparisons.EndpointAnnotationName));
Aspire.Hosting.Azure.AppContainers (6)
AzureContainerAppEnvironmentResource.cs (2)
437$"Azure Container Apps environment '{Name}' cannot provide browser origins for endpoint '{endpoint.Name}' on resource '{endpointReference.Resource.Name}' because it is not an external HTTP(S) endpoint. " + 458_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.")
ContainerAppContext.cs (4)
156throw 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'."); 238_endpointMapping[endpoint.Name] = new(scheme, NormalizedContainerAppName, port, targetPort, true, httpIngress.External, 247.Select(r => r.Endpoint.Name) 271_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 (6)
AzureAppServiceEnvironmentResource.cs (2)
565$"Azure App Service environment '{Name}' cannot provide browser origins for endpoint '{endpoint.Name}' on resource '{endpointReference.Resource.Name}' because it is not an external HTTP(S) endpoint. " + 586_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.")
AzureAppServiceWebsiteContext.cs (4)
139throw new NotSupportedException($"The endpoint(s) {string.Join(", ", unsupportedEndpoints.Select(r => $"'{r.Endpoint.Name}'"))} on resource '{resource.Name}' specifies an unsupported scheme. Only http and https are supported in App Service."); 162throw new NotSupportedException($"The endpoint '{endpoint.Name}' on resource '{resource.Name}' is not external. App Service only supports external endpoints."); 172_endpointMapping[endpoint.Name] = new( 186.Select(r => r.Endpoint.Name)
Aspire.Hosting.Azure.Kusto.Tests (2)
AddAzureKustoTests.cs (2)
68var httpEndpoint = endpointAnnotations.SingleOrDefault(e => e.Name == "http"); 358var httpEndpoint = endpointAnnotations.SingleOrDefault(e => e.Name == "http");
Aspire.Hosting.Azure.Sandboxes (9)
AzureSandboxContainerDeployment.cs (8)
1495$"Endpoint '{resolvedEndpoint.Endpoint.Name}' on project resource '{resource.TargetResource.Name}' is exposed through Azure sandbox ingress, which terminates TLS and forwards plaintext HTTP. " + 1503throw new InvalidOperationException($"Endpoint '{resolvedEndpoint.Endpoint.Name}' on resource '{resource.TargetResource.Name}' does not have a target port. Configure a target port before deploying it to an Azure sandbox."); 1508endpointOptions?.TryGetValue(resolvedEndpoint.Endpoint.Name, out resolvedEndpointOptions); 1509unmatchedEndpointOptions?.Remove(resolvedEndpoint.Endpoint.Name); 1511resolvedEndpoint.Endpoint.Name, 1522throw new NotSupportedException($"Endpoint '{resolvedEndpoint.Endpoint.Name}' on resource '{resource.TargetResource.Name}' shares target port {resolvedTargetPort} with endpoint '{existingEndpoint.Name}' but uses a different transport. Azure sandbox ports support a single HTTP protocol per target port."); 1529throw new NotSupportedException($"Endpoint '{resolvedEndpoint.Endpoint.Name}' on resource '{resource.TargetResource.Name}' shares target port {resolvedTargetPort} with endpoint '{existingEndpoint.Name}' but configures a different anonymous-access policy. Azure sandbox ports support a single access policy per target port."); 1579_ => throw new NotSupportedException($"Endpoint '{endpoint.Name}' on resource '{resource.Name}' uses transport '{endpoint.Transport}'. Azure sandbox ports currently support only HTTP and HTTP/2 endpoints.")
AzureSandboxEndpointPropertyValueProvider.cs (1)
191if (string.Equals(resolvedEndpoint.Endpoint.Name, endpointName, StringComparison.Ordinal))
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusExtensions.cs (1)
466if (!sqlServerBuilder.Resource.Annotations.OfType<EndpointAnnotation>().Any(e => e.Name == SqlServerEndpointName))
Aspire.Hosting.Azure.Tests (20)
AzureCosmosDBExtensionsTests.cs (7)
820var emulatorEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "emulator"); 852var emulatorEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "emulator"); 881var dataExplorerEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "data-explorer"); 911var dataExplorerEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "data-explorer"); 1024var endpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "data-explorer"); 1084var healthEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "emulatorhealth"); 1135var endpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "data-explorer");
AzureEventHubsExtensionsTests.cs (2)
247Assert.Equal("emulator", endpoints[0].Name); 250Assert.Equal("emulatorhealth", endpoints[1].Name);
AzureFunctionsTests.cs (2)
461Assert.DoesNotContain(functionsResource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "debug"); 488var endpoint = Assert.Single(funcApp.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "http");
AzureManagedRedisExtensionsTests.cs (1)
90Assert.Equal("tcp", endpoint.Name);
AzurePostgresExtensionsTests.cs (1)
185Assert.Equal("tcp", endpoint.Name);
AzureRedisExtensionsTests.cs (1)
134Assert.Equal("tcp", endpoint.Name);
AzureServiceBusExtensionsTests.cs (2)
807var endpoint = sql.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "tcp"); 984var endpoint = resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "tcp");
AzureSqlExtensionsTests.cs (1)
343Assert.Equal("tcp", endpoint.Name);
DurableTaskResourceExtensionsTests.cs (3)
220var grpc = endpointAnnotations.SingleOrDefault(e => e.Name == "grpc"); 224var http = endpointAnnotations.SingleOrDefault(e => e.Name == "http"); 229var dashboard = endpointAnnotations.SingleOrDefault(e => e.Name == "dashboard");
Aspire.Hosting.Blazor (2)
BlazorGatewayExtensions.cs (1)
884Name: ep.Name,
BrowserDebuggerHelper.cs (1)
115var endpointReference = parentResource.GetEndpoint(endpointAnnotation.Name);
Aspire.Hosting.Blazor.Tests (5)
AddBlazorGatewayTests.cs (4)
77gateway.Resource.Annotations.OfType<EndpointAnnotation>().OrderBy(endpoint => endpoint.Name), 78endpoint => Assert.Equal("http", endpoint.Name), 79endpoint => Assert.Equal("https", endpoint.Name)); 250gateway.Resource.Annotations.Remove(gateway.Resource.Annotations.OfType<EndpointAnnotation>().Single(endpoint => endpoint.Name == "https"));
AddDotnetProjectBlazorGatewayTests.cs (1)
29gateway.Resource.Annotations.OfType<EndpointAnnotation>().Select(e => e.Name));
Aspire.Hosting.Browsers (2)
BrowserLogsBuilderExtensions.cs (2)
333var endpointReference = resource.GetEndpoint(endpointAnnotation.Name); 336throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsEndpointNotAllocated, endpointAnnotation.Name, resource.Name));
Aspire.Hosting.Browsers.Tests (2)
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (2)
333var endpointReference = resource.GetEndpoint(endpointAnnotation.Name); 336throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsEndpointNotAllocated, endpointAnnotation.Name, resource.Name));
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
576.SingleOrDefault(a => string.Equals(a.Name, targetEndpoint.EndpointName, StringComparisons.EndpointAnnotationName)) is { } targetEndpointAnnotation) 582throw new ArgumentException($"Cannot tunnel endpoint '{targetEndpointAnnotation.Name}' with host '{targetEndpointAnnotation.TargetHost}' on resource '{targetResource.Name}' because it is not a localhost endpoint.", nameof(targetEndpoint));
Aspire.Hosting.Docker (3)
DockerComposeEnvironmentContext.cs (2)
57serviceResource.EndpointMappings.Add(endpoint.Name, 64endpoint.Name));
src\Shared\EndpointPropertyInputCache.cs (1)
34reference.Endpoint.Resource.Name, reference.Endpoint.EndpointAnnotation.Name, reference.Property.ToString(), 64);
Aspire.Hosting.Dotnet (1)
DotnetProjectHostingExtensions.cs (1)
272return builder.WithEndpointsInEnvironment(endpoint => includedEndpointNames.Contains(endpoint.Name));
Aspire.Hosting.Dotnet.Tests (4)
DotnetProjectFacadeTests.cs (3)
23Assert.Same(resource, resource.WithEndpointsInEnvironment(endpoint => endpoint.Name == "http")); 119Assert.Same(resource, resource.WithEndpointsInEnvironment(endpoint => endpoint.Name != "admin")); 121resource.WithEndpointsInEnvironment(endpoint => endpoint.Name != "metrics");
DotnetProjectOptionsTests.cs (1)
61Assert.Equal("http", endpoint.Name);
Aspire.Hosting.Foundry (3)
HostedAgent\AzureHostedAgentResource.cs (1)
497throw CreateEndpointResolutionException(hostedAgent, resource, environmentVariableName, endpointReference, $"Endpoint '{endpoint.Name}' is internal. Foundry hosted agents can only reference externally exposed endpoints during publish.");
HostedAgent\HostedAgentBuilderExtension.cs (2)
295var existingHttpEndpoint = builder.Resource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault(e => e.Name == "http"); 570targetWithEndpoints.Annotations.OfType<EndpointAnnotation>().Any(e => string.Equals(e.Name, "http", StringComparisons.EndpointAnnotationName)))
Aspire.Hosting.Foundry.Tests (4)
HostedAgentExtensionTests.cs (4)
38Assert.Contains(endpoints, e => e.Name == "http"); 53var httpEndpoints = endpoints.Where(e => e.Name == "http").ToList(); 70var httpEndpoint = endpoints.Single(e => e.Name == "http"); 406Assert.Equal("http", endpoint.Name);
Aspire.Hosting.Garnet.Tests (2)
AddGarnetTests.cs (2)
31Assert.Equal("tcp", endpoint.Name); 59Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Java.Tests (2)
AddQuarkusAppTests.cs (1)
145Assert.Equal("http", endpoint.Name);
AddSpringBootAppTests.cs (1)
157Assert.Equal("http", endpoint.Name);
Aspire.Hosting.JavaScript (3)
DenoHostingExtensions.cs (2)
407.FirstOrDefault(e => string.Equals(e.Name, "http", StringComparison.OrdinalIgnoreCase)); 416.First(e => string.Equals(e.Name, "http", StringComparison.OrdinalIgnoreCase));
JavaScriptHostingExtensions.cs (1)
2988var endpointReference = parentResource.GetEndpoint(endpointAnnotation.Name);
Aspire.Hosting.JavaScript.Tests (2)
AddDenoAppTests.cs (2)
1157Assert.Equal("http", endpoint.Name); 1186Assert.Equal("api", endpoint.Name);
Aspire.Hosting.Kafka.Tests (4)
AddKafkaTests.cs (4)
93var primaryEndpoint = Assert.Single(endpoints, e => e.Name == "tcp"); 96Assert.Equal("tcp", primaryEndpoint.Name); 102var internalEndpoint = Assert.Single(endpoints, e => e.Name == "internal"); 105Assert.Equal("internal", internalEndpoint.Name);
Aspire.Hosting.Keycloak.Tests (6)
KeycloakResourceBuilderTests.cs (6)
34var endpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == defaultEndpointName); 37Assert.Equal(defaultEndpointName, endpoint.Name); 45var healthEndpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == managementEndpointName); 48Assert.Equal(managementEndpointName, healthEndpoint.Name); 85var primaryEndpoint = Assert.Single(endpoints, e => e.Name == "http"); 90Assert.DoesNotContain(endpoints, e => e.Name == "https");
Aspire.Hosting.Kubernetes (8)
KubernetesResource.cs (7)
296EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), httpMapping.Port, endpoint.Name); 316EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), HelmValue.Literal(portValue), endpoint.Name, ServicePort: servicePort); 325var paramName = $"port_{endpoint.Name}".ToHelmValuesSectionName(); 331EndpointMappings[endpoint.Name] = new(endpoint.UriScheme, GetKubernetesProtocolName(endpoint.Protocol), resource.Name.ToServiceName(), helmValue, endpoint.Name);
src\Shared\EndpointPropertyInputCache.cs (1)
34reference.Endpoint.Resource.Name, reference.Endpoint.EndpointAnnotation.Name, reference.Property.ToString(), 64);
Aspire.Hosting.Maui.Tests (3)
MauiPlatformExtensionsTests.cs (3)
773var dashboardEndpoint = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 825.Single(endpoint => endpoint.Name == KnownEndpointNames.OtlpHttpEndpointName); 828.Single(endpoint => endpoint.Name == KnownEndpointNames.OtlpGrpcEndpointName);
Aspire.Hosting.Milvus.Tests (5)
AddMilvusTests.cs (5)
36.FirstOrDefault(e => e.Name == "grpc"); 40Assert.Equal("grpc", endpoint.Name); 66.FirstOrDefault(e => e.Name == "grpc"); 70Assert.Equal("grpc", endpoint.Name); 203var grpcEndpoint = milvusResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc");
Aspire.Hosting.MongoDB.Tests (2)
AddMongoDBTests.cs (2)
54Assert.Equal("tcp", endpoint.Name); 82Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
57Assert.Equal("tcp", endpoint.Name); 96Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Nats.Tests (2)
AddNatsTests.cs (2)
107Assert.Equal("tcp", endpoint.Name); 153Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Oracle.Tests (3)
AddOracleTests.cs (3)
55Assert.Equal("tcp", endpoint.Name); 94Assert.Equal("tcp", endpoint.Name); 176Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.PostgreSQL.Tests (4)
AddPostgresTests.cs (3)
66Assert.Equal("tcp", endpoint.Name); 120Assert.Equal("tcp", endpoint.Name); 236Assert.Equal("tcp", endpoint.Name);
PostgresMcpBuilderTests.cs (1)
33Assert.Equal(PostgresMcpContainerResource.PrimaryEndpointName, endpoint.Name);
Aspire.Hosting.Qdrant.Tests (8)
AddQdrantTests.cs (8)
63.FirstOrDefault(e => e.Name == "grpc"); 67Assert.Equal("grpc", endpoint.Name); 102.FirstOrDefault(e => e.Name == "http"); 107Assert.Equal("http", endpoint.Name); 135.FirstOrDefault(e => e.Name == "grpc"); 139Assert.Equal("grpc", endpoint.Name); 428var grpcEndpoint = qdrantResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc"); 436var httpEndpoint = qdrantResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "http");
Aspire.Hosting.RabbitMQ.Tests (4)
AddRabbitMQTests.cs (4)
55var primaryEndpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "tcp"); 58Assert.Equal("tcp", primaryEndpoint.Name); 66var mangementEndpoint = Assert.Single(containerResource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "management"); 69Assert.Equal("management", mangementEndpoint.Name);
Aspire.Hosting.Radius (11)
Publishing\RadiusInfrastructureBuilder.cs (5)
3503string.Equals(endpoints[0].Name, endpointReference.EndpointName, StringComparison.OrdinalIgnoreCase)) 3511$"address — that of its '{endpoints[0].Name}' endpoint. The reference to its '{endpointReference.EndpointName}' " + 3513$"for it would hand the consumer a wrong one. Reference the '{endpoints[0].Name}' endpoint, or deploy " + 3607if (RadiusServiceDiscovery.ResolveServicePort(resource, endpoint.Name) is not int containerPort) 3630ports[endpoint.Name] = port;
Publishing\RadiusServiceDiscovery.cs (1)
94.FirstOrDefault(r => string.Equals(r.Endpoint.Name, endpointName, StringComparison.OrdinalIgnoreCase));
RadiusEnvironmentResource.cs (4)
196var resolvedServicePort = new Lazy<int?>(() => RadiusServiceDiscovery.ResolveServicePort(endpointReference.Resource, endpoint.Name)); 204$"Radius environment '{Name}' cannot provide browser origins for endpoint '{endpoint.Name}' on resource '{endpointReference.Resource.Name}' because its service DNS is cluster-local and does not establish a browser-facing address. " + 222_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.") 327throw new InvalidOperationException($"Endpoint '{endpoint.Name}' must specify a port for scheme '{scheme}'.");
src\Shared\EndpointPropertyInputCache.cs (1)
34reference.Endpoint.Resource.Name, reference.Endpoint.EndpointAnnotation.Name, reference.Property.ToString(), 64);
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
326var secondaryEndpoint = endpoints.FirstOrDefault(ep => string.Equals(ep.Name, RedisResource.SecondaryEndpointName, StringComparisons.EndpointAnnotationName));
Aspire.Hosting.Redis.Tests (5)
AddRedisTests.cs (5)
48Assert.Equal("tcp", endpoint.Name); 76Assert.Equal("tcp", endpoint.Name); 1014var endpoint = Assert.Single(redis.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "tcp"); 1042var primaryEndpoint = Assert.Single(endpoints, e => e.Name == "tcp"); 1047var secondaryEndpoint = Assert.Single(endpoints, e => e.Name == "secondary");
Aspire.Hosting.Seq.Tests (4)
AddSeqTests.cs (4)
29Assert.Equal("http", endpoint.Name); 57Assert.Equal("http", endpoint.Name); 183Assert.Equal("http", endpoint.Name); 216Assert.Equal("http", endpoint.Name);
Aspire.Hosting.SqlServer.Tests (1)
AddSqlServerTests.cs (1)
56Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Tests (67)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
2262var endpoint = dashboard.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "http");
Dashboard\DashboardEventHandlersTests.cs (6)
633var endpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == expectedScheme); 635var otlpGrpcEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 637var otlpHttpEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpHttpEndpointName); 715var httpEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "http"); 717var otlpGrpcEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 719var otlpHttpEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
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")
Dcp\DcpExecutorTests.cs (1)
4573.WithEndpointsInEnvironment(e => e.Name != "dontinjectme")
EndpointReferenceTests.cs (1)
413var expression = destination.GetEndpoint(annotation.Name).Property(property);
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}");
ProjectResourceTests.cs (3)
358Assert.Equal("https", a.Name); 364Assert.Equal("http", a.Name); 441.WithEndpointsInEnvironment(filter: e => e.Name != "dontinjectme")
PublishAsDockerfileTests.cs (5)
305Assert.Equal("http", endpoint.Name); 331Assert.Equal("http", endpoint.Name); 351var endpoints = container.Annotations.OfType<EndpointAnnotation>().OrderBy(e => e.Name).ToList(); 356Assert.Equal("http", e.Name); 361Assert.Equal("https", e.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();
WithOtlpExporterTests.cs (6)
176var annotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == endpointName); 206var grpcAnnotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 209var httpAnnotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpHttpEndpointName); 261var grpcAnnotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 318var dashboardAnnotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 321var collectorAnnotation = collector.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "otlp-grpc");
Aspire.Hosting.Valkey.Tests (2)
AddValkeyTests.cs (2)
30Assert.Equal("tcp", endpoint.Name); 58Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Yarp.Tests (3)
AddYarpTests.cs (3)
30Assert.Equal("http", endpoint.Name); 446var httpsEndpoint = Assert.Single(yarp.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "https"); 471Assert.DoesNotContain(yarp.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "https");
TestProject.AppHost (1)
TestProgram.cs (1)
196["Name"] = endpoint.Name,