118 references to EndpointAnnotation
Aspire.Hosting (24)
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)
662ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 688aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
Dcp\ExecutableCreator.cs (2)
154if (!_containerNetworkEndpointProvisioner.CanProvisionEndpoint(endpointReference.EndpointAnnotation)) 167endpoints.Add(endpointReference.EndpointAnnotation);
Orchestrator\ApplicationOrchestrator.cs (2)
362if (additionalUrl is not null && EndpointHostHelpers.IsLocalhostTld(additionalUrl.Endpoint?.EndpointAnnotation.TargetHost)) 496if (url.Endpoint?.EndpointAnnotation == primaryLaunchProfileEndpoint
ProjectResourceBuilderExtensions.cs (9)
1148if (!processedHttpsPort && e.EndpointAnnotation.UriScheme == "https") 1157aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 1195if (e.EndpointAnnotation.UriScheme == scheme && e.EndpointAnnotation != launchDefaults.DefaultHttpsEndpoint) 1197Debug.Assert(!e.EndpointAnnotation.FromLaunchProfile, "Endpoints from launch profile should never make it here"); 1227if (e.EndpointAnnotation == launchDefaults.DefaultHttpsEndpoint) 1235launchDefaults.KestrelEndpointAnnotationHosts.TryGetValue(e.EndpointAnnotation, out var kestrelHost) ? kestrelHost : "*"; 1237var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}"); 1240context.EnvironmentVariables[$"Kestrel__Endpoints__{e.EndpointAnnotation.Name}__Url"] = url;
Aspire.Hosting.Azure.AppContainers (3)
AzureContainerAppEnvironmentResource.cs (3)
264if (!endpointReference.EndpointAnnotation.IsExternal) 380if (!endpointReference.EndpointAnnotation.IsExternal) 397var endpoint = endpointReference.EndpointAnnotation;
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceEnvironmentResource.cs (1)
524var 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)
161var resolvedTargetPort = ResolveEndpointTargetPort(resource, endpointName) ?? endpointReference.EndpointAnnotation.TargetPort;
Aspire.Hosting.Azure.Tests (2)
AzureContainerAppExpressEndpointTests.cs (2)
160Assert.False(api.GetEndpoint("http").EndpointAnnotation.IsExternal); 193Assert.False(api.GetEndpoint("http").EndpointAnnotation.IsExternal);
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
923var isAllocated = endpoint.EndpointAnnotation.AllAllocatedEndpoints.Any(
Aspire.Hosting.DevTunnels.Tests (32)
DevTunnelResourceBuilderExtensionsTests.cs (28)
127tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 128tunnelPort.TargetEndpoint.EndpointAnnotation, 146tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 147tunnelPort.TargetEndpoint.EndpointAnnotation, 166tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 167tunnelPort.TargetEndpoint.EndpointAnnotation, 217tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 218tunnelPort.TargetEndpoint.EndpointAnnotation, 257tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new( 258tunnelPort.TargetEndpoint.EndpointAnnotation, 298port.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(port.TargetEndpoint.EndpointAnnotation, "localhost", 5000); 360port.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(port.TargetEndpoint.EndpointAnnotation, "localhost", 5000); 446var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 468var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 486var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 510Assert.NotSame(httpTunnelEndpoint.EndpointAnnotation, httpsTunnelEndpoint.EndpointAnnotation); 526targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000); 654targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000); 656targetEndpoint.EndpointAnnotation.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint( 658new(targetEndpoint.EndpointAnnotation, "target", 8080, EndpointBindingMode.SingleAddress, networkId: containerNetwork)); 659var contextualTargetEndpoint = new EndpointReference(target.Resource, targetEndpoint.EndpointAnnotation, containerNetwork); 838targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000);
TestDevTunnelMonitor.cs (4)
28targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000); 33otherEndpoint.EndpointAnnotation.AllocatedEndpoint = new(otherEndpoint.EndpointAnnotation, "localhost", 3001);
Aspire.Hosting.Foundry (1)
HostedAgent\AzureHostedAgentResource.cs (1)
491var 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 (6)
Publishing\RadiusInfrastructureBuilder.cs (4)
3370var scheme = endpointReference.EndpointAnnotation.UriScheme; 3397parts.Add(EnvPart.FromLiteral(endpointReference.EndpointAnnotation.TlsEnabled ? bool.TrueString : bool.FalseString)); 3464if (!endpointReference.EndpointAnnotation.TlsEnabled || 4324/// touches <see cref="EndpointReference.EndpointAnnotation"/> (which raises a bare
RadiusEnvironmentResource.cs (2)
176var endpoint = endpointReference.EndpointAnnotation; 240if (!endpointReference.EndpointAnnotation.TlsEnabled ||
Aspire.Hosting.Tests (18)
ApplicationModel\EndpointHostHelpersTests.cs (1)
255container.GetEndpoint("primary").EndpointAnnotation,
Dashboard\DashboardEventHandlersTests.cs (4)
273httpEndpoint.EndpointAnnotation.AllocatedEndpoint = new(httpEndpoint.EndpointAnnotation, "localhost", 8080); 275otlpGrpcEndpoint.EndpointAnnotation.AllocatedEndpoint = new(otlpGrpcEndpoint.EndpointAnnotation, "localhost", 4317);
Dcp\DcpExecutorTests.cs (4)
1482var computeEndpoint = compute.GetEndpoint("tcp").EndpointAnnotation; 1524var endpoint = emulator.GetEndpoint("http").EndpointAnnotation; 9692var endpoint = resource.GetEndpoint(name).EndpointAnnotation; 10262replacement.Annotations.Add(targetEndpoint.EndpointAnnotation);
DistributedApplicationTests.cs (1)
1712var 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);