99 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)
80var 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)
1122if (!processedHttpsPort && e.EndpointAnnotation.UriScheme == "https") 1131aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 1169if (e.EndpointAnnotation.UriScheme == scheme && e.EndpointAnnotation != launchDefaults.DefaultHttpsEndpoint) 1171Debug.Assert(!e.EndpointAnnotation.FromLaunchProfile, "Endpoints from launch profile should never make it here"); 1201if (e.EndpointAnnotation == launchDefaults.DefaultHttpsEndpoint) 1209launchDefaults.KestrelEndpointAnnotationHosts.TryGetValue(e.EndpointAnnotation, out var kestrelHost) ? kestrelHost : "*"; 1211var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}"); 1214context.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)
222.Where(e => e.EndpointAnnotation.UriScheme is "http" or "https") 223.FirstOrDefault(e => e.EndpointAnnotation.IsExternal);
Aspire.Hosting.Azure.Sandboxes (1)
AzureSandboxEndpointPropertyValueProvider.cs (1)
162var resolvedTargetPort = ResolveEndpointTargetPort(resource, endpointName) ?? endpointReference.EndpointAnnotation.TargetPort;
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
910var isAllocated = endpoint.EndpointAnnotation.AllAllocatedEndpoints.Any(
Aspire.Hosting.DevTunnels.Tests (24)
DevTunnelResourceBuilderExtensionsTests.cs (24)
128tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 129tunnelPort.TargetEndpoint.EndpointAnnotation, 147tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 148tunnelPort.TargetEndpoint.EndpointAnnotation, 167tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 168tunnelPort.TargetEndpoint.EndpointAnnotation, 218tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 219tunnelPort.TargetEndpoint.EndpointAnnotation, 258tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 259tunnelPort.TargetEndpoint.EndpointAnnotation, 439var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 461var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 479var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 503Assert.NotSame(httpTunnelEndpoint.EndpointAnnotation, httpsTunnelEndpoint.EndpointAnnotation); 519targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000); 647targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000); 649targetEndpoint.EndpointAnnotation.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint( 651new(targetEndpoint.EndpointAnnotation, "target", 8080, EndpointBindingMode.SingleAddress, networkId: containerNetwork)); 652var contextualTargetEndpoint = new EndpointReference(target.Resource, targetEndpoint.EndpointAnnotation, containerNetwork); 751targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000);
Aspire.Hosting.Foundry (1)
HostedAgent\AzureHostedAgentResource.cs (1)
465var endpoint = endpointReference.EndpointAnnotation;
Aspire.Hosting.JavaScript (2)
DenoHostingExtensions.cs (2)
1421var host = isPublishMode ? "0.0.0.0" : endpoint.EndpointAnnotation.TargetHost; 1423? (endpoint.EndpointAnnotation.TargetPort ?? DenoServeDefaultPort).ToString(CultureInfo.InvariantCulture)
Aspire.Hosting.JavaScript.Tests (4)
AddDenoAppTests.cs (4)
1090Assert.Equal(8000, httpEndpoint.EndpointAnnotation.TargetPort); 1113Assert.Null(denoApp.Resource.GetEndpoint("http").EndpointAnnotation.TargetPort); 1205var callerEndpoint = denoApp.Resource.GetEndpoint("http").EndpointAnnotation; 1240Assert.Equal(8000, httpEndpoint.EndpointAnnotation.TargetPort);
Aspire.Hosting.Kubernetes (1)
Extensions\EndpointRoutingValidation.cs (1)
45if (endpoint.EndpointAnnotation.IsExternal)
Aspire.Hosting.Maui (8)
MauiOtlpExtensions.cs (8)
320if (!endpointReference.Exists || endpointReference.EndpointAnnotation.AllocatedEndpoint is not { } allocatedEndpoint) 339if (IsLocalTunnelTargetHost(endpointReference.EndpointAnnotation.TargetHost) && 344else if (IsLocalTunnelTargetHost(endpointReference.EndpointAnnotation.TargetHost) && 359endpointReference.EndpointAnnotation.AllocatedEndpoint is null || 449endpointReference.EndpointAnnotation.AllocatedEndpoint is null) 456var allocatedEndpoint = endpointReference.EndpointAnnotation.AllocatedEndpoint; 460GetOtlpProtocol(endpointReference.EndpointAnnotation)); 480? new OtlpEndpointTarget(uri.Scheme, uri.Port, GetOtlpProtocol(endpointReference.EndpointAnnotation))
Aspire.Hosting.Maui.Tests (11)
MauiPlatformExtensionsTests.cs (11)
785tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint = new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443); 850tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint = 851new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443); 1008tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint = new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443); 1043tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint = 1044new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443); 1237Assert.Null(tunnelConfig.TunnelEndpoint.EndpointAnnotation.AllocatedEndpoint); 1254tunnelConfig.TunnelEndpoint.EndpointAnnotation.AllocatedEndpoint = 1255new AllocatedEndpoint(tunnelConfig.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)
1129var computeEndpoint = compute.GetEndpoint("tcp").EndpointAnnotation; 1171var endpoint = emulator.GetEndpoint("http").EndpointAnnotation; 9021var endpoint = resource.GetEndpoint(name).EndpointAnnotation;
DistributedApplicationTests.cs (1)
1708var 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);