181 references to EndpointAnnotation
Aspire.Hosting (27)
Aspire.Hosting.Azure.ApiManagement (7)
Aspire.Hosting.Azure.AppContainers (3)
Aspire.Hosting.Azure.AppService (1)
Aspire.Hosting.Azure.FrontDoor (2)
Aspire.Hosting.Azure.Sandboxes (1)
Aspire.Hosting.Azure.Tests (4)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.DevTunnels.Tests (32)
DevTunnelResourceBuilderExtensionsTests.cs (28)
134tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(
135tunnelPort.TargetEndpoint.EndpointAnnotation,
155tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(
156tunnelPort.TargetEndpoint.EndpointAnnotation,
177tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(
178tunnelPort.TargetEndpoint.EndpointAnnotation,
230tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(
231tunnelPort.TargetEndpoint.EndpointAnnotation,
272tunnelPort.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(
273tunnelPort.TargetEndpoint.EndpointAnnotation,
315port.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(port.TargetEndpoint.EndpointAnnotation, "localhost", 5000);
379port.TargetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(port.TargetEndpoint.EndpointAnnotation, "localhost", 5000);
473var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation);
499var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation);
519var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation);
545Assert.NotSame(httpTunnelEndpoint.EndpointAnnotation, httpsTunnelEndpoint.EndpointAnnotation);
563targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000);
695targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000);
697targetEndpoint.EndpointAnnotation.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(
699new(targetEndpoint.EndpointAnnotation, "target", 8080, EndpointBindingMode.SingleAddress, networkId: containerNetwork));
700var contextualTargetEndpoint = new EndpointReference(target.Resource, targetEndpoint.EndpointAnnotation, containerNetwork);
883targetEndpoint.EndpointAnnotation.AllocatedEndpoint = new(targetEndpoint.EndpointAnnotation, "localhost", 3000);
Aspire.Hosting.Docker (1)
Aspire.Hosting.Foundry (1)
Aspire.Hosting.JavaScript (2)
Aspire.Hosting.JavaScript.Tests (4)
Aspire.Hosting.Kubernetes (4)
Aspire.Hosting.Maui (8)
Aspire.Hosting.Maui.Tests (11)
MauiPlatformExtensionsTests.cs (11)
784tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint = new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443);
849tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint =
850new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443);
1007tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint = new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443);
1042tunnelEndpoint.EndpointAnnotation.AllocatedEndpoint =
1043new AllocatedEndpoint(tunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443);
1236Assert.Null(tunnelConfig.TunnelEndpoint.EndpointAnnotation.AllocatedEndpoint);
1253tunnelConfig.TunnelEndpoint.EndpointAnnotation.AllocatedEndpoint =
1254new AllocatedEndpoint(tunnelConfig.TunnelEndpoint.EndpointAnnotation, "mobile-otlp.devtunnels.ms", 443);
Aspire.Hosting.Python (1)
Aspire.Hosting.Radius (9)
Aspire.Hosting.Tests (62)
EndpointReferenceTests.cs (24)
26Assert.Same(web.Resource.Annotations.OfType<EndpointAnnotation>().Single(), endpoint.EndpointAnnotation);
45Assert.Same(web.Resource.Annotations.OfType<EndpointAnnotation>().Single(), endpoint.EndpointAnnotation);
456var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation);
472var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation);
485var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation);
499var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation);
524endpoint.EndpointAnnotation.AllocatedEndpoint = new(endpoint.EndpointAnnotation, "localhost", 8443);
525endpoint.EndpointAnnotation.BrowserUrlsSnapshot.SetValue(
545endpoint.EndpointAnnotation.AllocatedEndpoint = new(endpoint.EndpointAnnotation, "localhost", 8443);
546endpoint.EndpointAnnotation.BrowserUrlsSnapshot.SetValue([]);
558endpoint.EndpointAnnotation.AllocatedEndpoint = new(endpoint.EndpointAnnotation, "frontend.example", 443);
559endpoint.EndpointAnnotation.BrowserUrlsSnapshot.SetValue([new() { Url = "https://frontend.example/path" }]);
563endpoint.EndpointAnnotation.AllocatedEndpoint = new(endpoint.EndpointAnnotation, "replacement.example", 443);
575resource.GetEndpoint("http").EndpointAnnotation.BrowserUrlsSnapshot.SetValue([new() { Url = "http://frontend.example" }]);
576resource.GetEndpoint("https").EndpointAnnotation.BrowserUrlsSnapshot.SetValue([new() { Url = "https://separate.example" }]);
589host.EndpointAnnotation.BrowserUrlsSnapshot.SetValue([new() { Url = "https://public.example/app" }]);
606endpoint.EndpointAnnotation.BrowserUrlsSnapshot.SetValue(
628endpoint.EndpointAnnotation.BrowserUrlsSnapshot.SetValue([new() { Url = url }]);
663endpoint.EndpointAnnotation.BrowserUrlsSnapshot.SetValue([new() { Url = "https://frontend.example/app" }]);
677endpoint.EndpointAnnotation.BrowserUrlsSnapshot.SetValue([new() { Url = "https://local.example" }]);