76 references to EndpointAnnotation
Aspire.Hosting (22)
ApplicationModel\EndpointHostHelpers.cs (1)
144var targetHost = endpoint.EndpointAnnotation.TargetHost;
ApplicationModel\EndpointReference.cs (6)
88public bool TlsEnabled => Exists && EndpointAnnotation.TlsEnabled; 106public bool ExcludeReferenceEndpoint => Exists && EndpointAnnotation.ExcludeReferenceEndpoint; 198public int? TargetPort => EndpointAnnotation.TargetPort; 208public string Scheme => EndpointAnnotation.UriScheme; 217EndpointAnnotation.AllocatedEndpointSnapshot; 374var allocatedEndpoint = await Endpoint.EndpointAnnotation.AllAllocatedEndpoints.GetAllocatedEndpointAsync(networkContext, cancellationToken).ConfigureAwait(false);
ApplicationModel\IComputeEnvironmentResource.cs (1)
46var endpoint = endpointReference.EndpointAnnotation;
ApplicationModel\ProjectLaunchDefaultsAnnotation.cs (1)
75var endpoint = e.EndpointAnnotation;
Dashboard\DashboardEventHandlers.cs (2)
817ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 843aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
Orchestrator\ApplicationOrchestrator.cs (2)
364if (additionalUrl is not null && EndpointHostHelpers.IsLocalhostTld(additionalUrl.Endpoint?.EndpointAnnotation.TargetHost)) 498if (url.Endpoint?.EndpointAnnotation == primaryLaunchProfileEndpoint
ProjectResourceBuilderExtensions.cs (9)
1107if (!processedHttpsPort && e.EndpointAnnotation.UriScheme == "https") 1116aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 1154if (e.EndpointAnnotation.UriScheme == scheme && e.EndpointAnnotation != launchDefaults.DefaultHttpsEndpoint) 1156Debug.Assert(!e.EndpointAnnotation.FromLaunchProfile, "Endpoints from launch profile should never make it here"); 1186if (e.EndpointAnnotation == launchDefaults.DefaultHttpsEndpoint) 1194launchDefaults.KestrelEndpointAnnotationHosts.TryGetValue(e.EndpointAnnotation, out var kestrelHost) ? kestrelHost : "*"; 1196var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}"); 1199context.EnvironmentVariables[$"Kestrel__Endpoints__{e.EndpointAnnotation.Name}__Url"] = url;
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppEnvironmentResource.cs (2)
353if (!endpointReference.EndpointAnnotation.IsExternal) 370var endpoint = endpointReference.EndpointAnnotation;
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceEnvironmentResource.cs (1)
522var endpoint = endpointReference.EndpointAnnotation;
Aspire.Hosting.Azure.FrontDoor (2)
AzureFrontDoorExtensions.cs (2)
217.Where(e => e.EndpointAnnotation.UriScheme is "http" or "https") 218.FirstOrDefault(e => e.EndpointAnnotation.IsExternal);
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
875var isAllocated = endpoint.EndpointAnnotation.AllAllocatedEndpoints.Any(
Aspire.Hosting.DevTunnels.Tests (22)
DevTunnelResourceBuilderExtensionsTests.cs (22)
128tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 129tunnelPort.TargetEndpoint.EndpointAnnotation, 147tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 148tunnelPort.TargetEndpoint.EndpointAnnotation, 167tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 168tunnelPort.TargetEndpoint.EndpointAnnotation, 217tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 218tunnelPort.TargetEndpoint.EndpointAnnotation, 342var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 364var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 382var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 406Assert.NotSame(httpTunnelEndpoint.EndpointAnnotation, httpsTunnelEndpoint.EndpointAnnotation); 422targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000); 550targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000); 552targetEndpoint.EndpointAnnotation.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint( 554new(targetEndpoint.EndpointAnnotation, "target", 8080, EndpointBindingMode.SingleAddress, networkId: containerNetwork)); 555var contextualTargetEndpoint = new EndpointReference(target.Resource, targetEndpoint.EndpointAnnotation, containerNetwork); 654targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000);
Aspire.Hosting.Foundry (1)
HostedAgent\AzureHostedAgentResource.cs (1)
469var endpoint = endpointReference.EndpointAnnotation;
Aspire.Hosting.Kubernetes (1)
Extensions\EndpointRoutingValidation.cs (1)
45if (endpoint.EndpointAnnotation.IsExternal)
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
212if (!endpointReference.Exists || endpointReference.EndpointAnnotation.AllocatedEndpoint is not { } allocatedEndpoint)
Aspire.Hosting.Maui.Tests (4)
MauiPlatformExtensionsTests.cs (4)
713tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint = new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443); 778tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint = new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443);
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
296c.Args.Add(endpoint.EndpointAnnotation.TargetHost);
Aspire.Hosting.Radius (1)
RadiusEnvironmentResource.cs (1)
150var endpoint = endpointReference.EndpointAnnotation;
Aspire.Hosting.Tests (17)
ApplicationModel\EndpointHostHelpersTests.cs (1)
255container.GetEndpoint("primary").EndpointAnnotation,
Dashboard\DashboardEventHandlersTests.cs (4)
250httpEndpoint.EndpointAnnotation.AllocatedEndpoint = new(httpEndpoint.EndpointAnnotation, "localhost", 8080); 252otlpGrpcEndpoint.EndpointAnnotation.AllocatedEndpoint = new(otlpGrpcEndpoint.EndpointAnnotation, "localhost", 4317);
Dcp\DcpExecutorTests.cs (3)
1078var computeEndpoint = compute.GetEndpoint("tcp").EndpointAnnotation; 1120var endpoint = emulator.GetEndpoint("http").EndpointAnnotation; 8914var endpoint = resource.GetEndpoint(name).EndpointAnnotation;
DistributedApplicationTests.cs (1)
1701var allocatedEndpointSnapshot = Assert.Single(endpoint.EndpointAnnotation.AllAllocatedEndpoints);
EndpointReferenceTests.cs (4)
420var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation); 436var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation); 449var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation); 463var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation);
HealthCheckTests.cs (1)
90var endpoint = resource.GetEndpoint("http").EndpointAnnotation;
WithEndpointTests.cs (3)
436Assert.False(ep0.EndpointAnnotation.IsExternal); 437Assert.True(ep1.EndpointAnnotation.IsExternal); 438Assert.True(ep2.EndpointAnnotation.IsExternal);