27 references to EndpointAnnotation
Aspire.Hosting (15)
ApplicationModel\EndpointReference.cs (3)
97public int? TargetPort => EndpointAnnotation.TargetPort; 112public string Scheme => EndpointAnnotation.UriScheme; 120EndpointAnnotation.AllocatedEndpointSnapshot;
ApplicationModel\ProjectResource.cs (1)
28var endpoint = e.EndpointAnnotation;
Dashboard\DashboardEventHandlers.cs (2)
590ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 615aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
ProjectResourceBuilderExtensions.cs (9)
762if (!processedHttpsPort && e.EndpointAnnotation.UriScheme == "https") 771aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 807if (e.EndpointAnnotation.UriScheme == scheme && e.EndpointAnnotation != builder.Resource.DefaultHttpsEndpoint) 809Debug.Assert(!e.EndpointAnnotation.FromLaunchProfile, "Endpoints from launch profile should never make it here"); 838if (e.EndpointAnnotation == builder.Resource.DefaultHttpsEndpoint) 846builder.Resource.KestrelEndpointAnnotationHosts.TryGetValue(e.EndpointAnnotation, out var kestrelHost) ? kestrelHost : "*"; 848var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}"); 851context.EnvironmentVariables[$"Kestrel__Endpoints__{e.EndpointAnnotation.Name}__Url"] = url;
Aspire.Hosting.DevTunnels.Tests (5)
DevTunnelResourceBuilderExtensionsTests.cs (5)
140var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 162var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 180var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 204Assert.NotSame(httpTunnelEndpoint.EndpointAnnotation, httpsTunnelEndpoint.EndpointAnnotation);
Aspire.Hosting.Tests (7)
Dashboard\DashboardLifecycleHookTests.cs (4)
141httpEndpoint.EndpointAnnotation.AllocatedEndpoint = new(httpEndpoint.EndpointAnnotation, "localhost", 8080); 143otlpGrpcEndpoint.EndpointAnnotation.AllocatedEndpoint = new(otlpGrpcEndpoint.EndpointAnnotation, "localhost", 4317);
WithEndpointTests.cs (3)
257Assert.False(ep0.EndpointAnnotation.IsExternal); 258Assert.True(ep1.EndpointAnnotation.IsExternal); 259Assert.True(ep2.EndpointAnnotation.IsExternal);