2 writes to Name
Aspire.Hosting (1)
ApplicationModel\EndpointAnnotation.cs (1)
135Name = name;
Aspire.Hosting.Tests (1)
ExpressionResolverTests.cs (1)
255Name = "http",
246 references to Name
Aspire.Hosting (50)
ApplicationModel\EndpointAnnotation.cs (1)
367AllocatedEndpointSnapshot.SetException(new InvalidOperationException($"The endpoint `{Name}` is not allocated"));
ApplicationModel\EndpointReference.cs (3)
30.Select(a => a.Name) 232.SingleOrDefault(a => string.Equals(a.Name, EndpointName, StringComparisons.EndpointAnnotationName)); 268EndpointName = endpoint.Name;
ApplicationModel\EndpointUpdateContext.cs (1)
19public string Name => _endpointAnnotation.Name;
ApplicationModel\HostUrl.cs (1)
73return r.GetEndpoint(ep.Name, networkContext);
ApplicationModel\IComputeEnvironmentResource.cs (2)
64_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.") 80throw 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)
202endpoint => includedEndpointNames.Contains(endpoint.Name));
Dcp\ContainerCreator.cs (5)
433resourceLogger.LogWarning("Host endpoint '{EndpointName}' on resource '{HostResource}' is referenced by a container resource, but the endpoint is using a network protocol '{Protocol}' other than TCP. Only TCP is supported for container-to-host references.", endpoint.Name, re.Resource.Name, endpoint.Protocol); 443StringComparers.EndpointAnnotationName.Equals(swr.EndpointAnnotation.Name, endpoint.Name) 447throw new InvalidDataException($"Host endpoint '{endpoint.Name}' on resource '{re.Resource.Name}' should have an associated DCP Service resource already set up"); 464svc.Annotate(CustomResource.EndpointNameAnnotation, endpoint.Name);
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";
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."); 71throw new InvalidOperationException($"Resource '{modelResourceName}' uses multiple replicas and a proxy-less endpoint '{ea.Name}'. These features do not work together."); 81$"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."); 87$"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."); 191throw new InvalidOperationException($"Service '{svc.Metadata.Name}' needs to specify a port for endpoint '{sp.EndpointAnnotation.Name}' since it isn't using a proxy."); 311string.Equals(swr.EndpointAnnotation.Name, endpoint.Name, StringComparisons.EndpointAnnotationName) 316throw new InvalidDataException($"The '{endpoint.Name}' on resource '{ts.ResourceName}' should have an associated DCP Service resource already set up"); 341endpoint = endpoints.FirstOrDefault(e => string.Equals(e.Name, endpointName, StringComparisons.EndpointAnnotationName));
Dcp\DcpNameGenerator.cs (2)
123: GetObjectNameForResource(resource, _options.Value, endpoint.Name); 177=> $"{resource.Name}|{endpoint.Name}|{targetNetworkId.Value}";
Devcontainers\DevcontainerPortForwardingEventingSubscriber.cs (1)
47$"{@event.Resource.Name}-{endpoint.Name}");
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);
ProjectResourceBuilderExtensions.cs (3)
764var url = context.Urls.FirstOrDefault(u => string.Equals(u.Endpoint?.EndpointName, endpoint.Name, StringComparisons.EndpointAnnotationName)); 823projectResource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault(sb => sb.UriScheme == scheme || string.Equals(sb.Name, scheme, StringComparisons.EndpointAnnotationName)); 1199context.EnvironmentVariables[$"Kestrel__Endpoints__{e.EndpointAnnotation.Name}__Url"] = url;
Publishing\ManifestPublishingContext.cs (1)
500Writer.WriteStartObject(endpoint.Name);
ResourceBuilderExtensions.cs (3)
1469.SingleOrDefault(ea => string.Equals(ea.Name, endpointName, StringComparisons.EndpointAnnotationName)); 1534!builder.Resource.Annotations.OfType<EndpointAnnotation>().Any(endpoint => string.Equals(endpoint.Name, endpointName, StringComparisons.EndpointAnnotationName))) 1572.FirstOrDefault(sb => string.Equals(sb.Name, resolvedName, StringComparisons.EndpointAnnotationName));
Aspire.Hosting.Azure.AppContainers (5)
AzureContainerAppEnvironmentResource.cs (1)
387_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.")
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)
AzureAppServiceEnvironmentResource.cs (1)
539_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.")
AzureAppServiceWebsiteContext.cs (4)
107throw 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."); 130throw new NotSupportedException($"The endpoint '{endpoint.Name}' on resource '{resource.Name}' is not external. App Service only supports external endpoints."); 140_endpointMapping[endpoint.Name] = new( 154.Select(r => r.Endpoint.Name)
Aspire.Hosting.Azure.Kusto.Tests (2)
AddAzureKustoTests.cs (2)
70var httpEndpoint = endpointAnnotations.SingleOrDefault(e => e.Name == "http"); 360var httpEndpoint = endpointAnnotations.SingleOrDefault(e => e.Name == "http");
Aspire.Hosting.Azure.Sandboxes (9)
AzureSandboxContainerDeployment.cs (7)
1450throw 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."); 1455endpointOptions?.TryGetValue(resolvedEndpoint.Endpoint.Name, out resolvedEndpointOptions); 1456unmatchedEndpointOptions?.Remove(resolvedEndpoint.Endpoint.Name); 1458resolvedEndpoint.Endpoint.Name, 1469throw new NotSupportedException($"Endpoint '{resolvedEndpoint.Endpoint.Name}' on resource '{resource.TargetResource.Name}' shares target port {targetPort} with endpoint '{existingEndpoint.Name}' but uses a different transport. Azure sandbox ports support a single HTTP protocol per target port."); 1474throw new NotSupportedException($"Endpoint '{resolvedEndpoint.Endpoint.Name}' on resource '{resource.TargetResource.Name}' shares target port {targetPort} with endpoint '{existingEndpoint.Name}' but configures a different anonymous-access policy. Azure sandbox ports support a single access policy per target port."); 1503_ => 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 (2)
32throw new InvalidOperationException($"Endpoint '{endpoint.Name}' on resource '{resource.TargetResource.Name}' is not external. Azure sandbox endpoint references are only supported for external HTTP endpoints because ADC only assigns public URLs to exposed ports."); 184if (string.Equals(resolvedEndpoint.Endpoint.Name, endpointName, StringComparison.Ordinal) &&
Aspire.Hosting.Azure.Tests (16)
AzureCosmosDBExtensionsTests.cs (7)
793var emulatorEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "emulator"); 825var emulatorEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "emulator"); 854var dataExplorerEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "data-explorer"); 884var dataExplorerEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "data-explorer"); 996var endpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "data-explorer"); 1054var healthEndpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "emulatorhealth"); 1105var endpoint = Assert.Single(cosmos.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "data-explorer");
AzureEventHubsExtensionsTests.cs (2)
248Assert.Equal("emulator", endpoints[0].Name); 251Assert.Equal("emulatorhealth", endpoints[1].Name);
AzureManagedRedisExtensionsTests.cs (1)
90Assert.Equal("tcp", endpoint.Name);
AzurePostgresExtensionsTests.cs (1)
185Assert.Equal("tcp", endpoint.Name);
AzureRedisExtensionsTests.cs (1)
134Assert.Equal("tcp", endpoint.Name);
AzureSqlExtensionsTests.cs (1)
152Assert.Equal("tcp", endpoint.Name);
DurableTaskResourceExtensionsTests.cs (3)
169var grpc = endpointAnnotations.SingleOrDefault(e => e.Name == "grpc"); 173var http = endpointAnnotations.SingleOrDefault(e => e.Name == "http"); 178var dashboard = endpointAnnotations.SingleOrDefault(e => e.Name == "dashboard");
Aspire.Hosting.Blazor (2)
BlazorGatewayExtensions.cs (1)
729Name: ep.Name,
BrowserDebuggerHelper.cs (1)
115var endpointReference = parentResource.GetEndpoint(endpointAnnotation.Name);
Aspire.Hosting.Blazor.Tests (1)
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)
547.SingleOrDefault(a => string.Equals(a.Name, targetEndpoint.EndpointName, StringComparisons.EndpointAnnotationName)) is { } targetEndpointAnnotation) 553throw 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 (2)
DockerComposeEnvironmentContext.cs (2)
57serviceResource.EndpointMappings.Add(endpoint.Name, 64endpoint.Name));
Aspire.Hosting.Foundry (3)
HostedAgent\AzureHostedAgentResource.cs (1)
473throw 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)
293var existingHttpEndpoint = builder.Resource.Annotations.OfType<EndpointAnnotation>().FirstOrDefault(e => e.Name == "http"); 566targetWithEndpoints.Annotations.OfType<EndpointAnnotation>().Any(e => string.Equals(e.Name, "http", StringComparisons.EndpointAnnotationName)))
Aspire.Hosting.Foundry.Tests (4)
HostedAgentExtensionTests.cs (4)
34Assert.Contains(endpoints, e => e.Name == "http"); 49var httpEndpoints = endpoints.Where(e => e.Name == "http").ToList(); 66var httpEndpoint = endpoints.Single(e => e.Name == "http"); 402Assert.Equal("http", endpoint.Name);
Aspire.Hosting.Garnet.Tests (2)
AddGarnetTests.cs (2)
30Assert.Equal("tcp", endpoint.Name); 58Assert.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 (1)
JavaScriptHostingExtensions.cs (1)
2287var endpointReference = parentResource.GetEndpoint(endpointAnnotation.Name);
Aspire.Hosting.Kafka.Tests (4)
AddKafkaTests.cs (4)
32var primaryEndpoint = Assert.Single(endpoints, e => e.Name == "tcp"); 35Assert.Equal("tcp", primaryEndpoint.Name); 41var internalEndpoint = Assert.Single(endpoints, e => e.Name == "internal"); 44Assert.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 (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)
MauiPlatformExtensionsTests.cs (1)
703var dashboardEndpoint = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.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); 195var grpcEndpoint = milvusResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc");
Aspire.Hosting.MongoDB.Tests (2)
AddMongoDBTests.cs (2)
47Assert.Equal("tcp", endpoint.Name); 75Assert.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); 333var grpcEndpoint = qdrantResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "grpc"); 341var 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 (6)
Publishing\RadiusInfrastructureBuilder.cs (2)
1078if (RadiusServiceDiscovery.ResolveServicePort(resource, endpoint.Name) is not int containerPort) 1101ports[endpoint.Name] = port;
Publishing\RadiusServiceDiscovery.cs (1)
94.FirstOrDefault(r => string.Equals(r.Endpoint.Name, endpointName, StringComparison.OrdinalIgnoreCase));
RadiusEnvironmentResource.cs (3)
157var resolvedServicePort = RadiusServiceDiscovery.ResolveServicePort(endpointReference.Resource, endpoint.Name); 179_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.") 198throw new InvalidOperationException($"Endpoint '{endpoint.Name}' must specify a port for scheme '{scheme}'.");
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
266var secondaryEndpoint = endpoints.FirstOrDefault(ep => string.Equals(ep.Name, RedisResource.SecondaryEndpointName, StringComparisons.EndpointAnnotationName));
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
46Assert.Equal("tcp", endpoint.Name); 74Assert.Equal("tcp", endpoint.Name); 880var endpoint = Assert.Single(redis.Resource.Annotations.OfType<EndpointAnnotation>(), e => e.Name == "tcp");
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)
51Assert.Equal("tcp", endpoint.Name);
Aspire.Hosting.Tests (67)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
2165var endpoint = dashboard.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "http");
Dashboard\DashboardEventHandlersTests.cs (6)
454var endpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == expectedScheme); 456var otlpGrpcEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 458var otlpHttpEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpHttpEndpointName); 536var httpEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == "http"); 538var otlpGrpcEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 540var otlpHttpEndpointAnnotation = dashboardResource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpHttpEndpointName);
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")
Dcp\DcpExecutorTests.cs (1)
3373.WithEndpointsInEnvironment(e => e.Name != "dontinjectme")
EndpointReferenceTests.cs (1)
352var 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"); 457endpoint.AllocatedEndpoint = new AllocatedEndpoint(endpoint, "localhost", endpoint.Port ?? 0, targetPortExpression: $"port_{endpoint.Name}");
ProjectResourceTests.cs (3)
329Assert.Equal("https", a.Name); 335Assert.Equal("http", a.Name); 412.WithEndpointsInEnvironment(filter: e => e.Name != "dontinjectme")
PublishAsDockerfileTests.cs (5)
301Assert.Equal("http", endpoint.Name); 325Assert.Equal("http", endpoint.Name); 343var endpoints = container.Annotations.OfType<EndpointAnnotation>().OrderBy(e => e.Name).ToList(); 348Assert.Equal("http", e.Name); 353Assert.Equal("https", e.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");
WithOtlpExporterTests.cs (6)
107var annotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == endpointName); 137var grpcAnnotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 140var httpAnnotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpHttpEndpointName); 192var grpcAnnotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 249var dashboardAnnotation = dashboard.Resource.Annotations.OfType<EndpointAnnotation>().Single(e => e.Name == KnownEndpointNames.OtlpGrpcEndpointName); 252var 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)
193["Name"] = endpoint.Name,