487 references to GetEndpoint
AksDemo.AppHost (2)
AppHost.cs (2)
50.WithRoute("/api", api.GetEndpoint("http")) 58.WithRoute("/admin", api.GetEndpoint("http"));
Aspire.Hosting (3)
ResourceBuilderExtensions.cs (3)
1511/// with <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string)"/>. 1543/// with <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string)"/>. 2574var endpoint = builder.GetEndpoint(endpointName);
Aspire.Hosting.Azure.EntraId.Tests (24)
EntraIdPolyglotTests.cs (3)
367.WithRedirectUrisForExport(web.GetEndpoint("https"), ["/signin"]); 369Assert.False(web.GetEndpoint("https").IsAllocated); 568var endpoint = builder.AddContainer("web", "image").WithHttpEndpoint(targetPort: 8080).GetEndpoint("http");
EntraIdProvisioningTests.cs (20)
158var endpoint = consumer.GetEndpoint("https"); 959entra.WithRedirectUris(web.GetEndpoint("http"), "/signin-oidc"); 1143var endpoint = web.GetEndpoint("https"); 1165var endpoint = web.GetEndpoint("https"); 1188var endpoint = builder.AddContainer("web", "image").GetEndpoint("https"); 1208.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc", "/signout-callback-oidc"); 1226.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc"); 1250.WithRedirectUris(web.GetEndpoint("web"), "/signin-oidc"); 1276.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc"); 1301.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc"); 1325.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc"); 1344var pendingOrigin = web.GetEndpoint("https").BrowserOrigins.GetValueAsync(cts.Token).AsTask(); 1371.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc"); 1392.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc"); 1449.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc"); 1473.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc"); 1484Endpoint = other.GetEndpoint("https"), 1503.WithRedirectUris(web.GetEndpoint("https"), "/signin-oidc"); 1553Assert.Throws<ArgumentException>("callbackPaths", () => entra.WithRedirectUris(web.GetEndpoint("https"))); 1554Assert.Throws<ArgumentException>("callbackPaths", () => entra.WithRedirectUris(web.GetEndpoint("https"), "signin-oidc"));
EntraIdStarterScenarioPublishTests.cs (1)
53webEntra.WithRedirectUris(webFrontend.GetEndpoint("https"), "/signin-oidc", "/signout-callback-oidc");
Aspire.Hosting.Azure.Kubernetes.Tests (4)
AzureKubernetesFoundryReferenceTests.cs (1)
68.WithEnvironment("AGENT_URL", agent.GetEndpoint("http").Property(EndpointProperty.Url));
AzureKubernetesIngressTests.cs (3)
26ingress.WithPath("/", api.GetEndpoint("http")); 150ingress.WithPath("/", api.GetEndpoint("http")); 172gateway.WithRoute("/", api.GetEndpoint("http"));
Aspire.Hosting.Azure.Tests (74)
AzureAppServiceTests.cs (3)
439.WithEnvironment("AGENT_URL", agent.GetEndpoint("http").Property(EndpointProperty.Url)); 1187var endpointReferenceEx = env.Resource.GetHostAddressExpression(project.GetEndpoint("http")); 1219var expression = env.Resource.GetEndpointPropertyExpression(project.GetEndpoint("http").Property(property));
AzureContainerAppExpressEndpointTests.cs (19)
38var endpoint = api.GetEndpoint("http"); 54context.EnvironmentVariables["SELF_TARGET_PORT"] = web.GetEndpoint("http").Property(EndpointProperty.TargetPort); 84var endpoint = api.GetEndpoint("http"); 136var expression = environment.Resource.GetEndpointPropertyExpression(api.GetEndpoint("http").Property(property)); 160environment.Resource.GetEndpointPropertyExpression(api.GetEndpoint("http").Property(property))); 166Assert.False(api.GetEndpoint("http").EndpointAnnotation.IsExternal); 183ReferenceExpression.Create($"prefix/{ReferenceExpression.Create($"{api.GetEndpoint("http")}")}"), 188web.WithReference(api.GetEndpoint("http")); 199Assert.False(api.GetEndpoint("http").EndpointAnnotation.IsExternal); 211.WithEnvironment("ORIGIN", api.GetEndpoint("http").Property(property)); 248web.WithReference(api.GetEndpoint("http")); 249web.WithEnvironment("HOST", api.GetEndpoint("http").Property(EndpointProperty.Host)); 250web.WithEnvironment("EARLY_HOST", producerEnvironment.Resource.GetHostAddressExpression(api.GetEndpoint("http"))); 281var endpoint = api.GetEndpoint("http"); 318.WithReference(api.GetEndpoint("http")) 319.WithEnvironment("API_URL", api.GetEndpoint("http").Property(EndpointProperty.Url)); 343var endpoint = api.GetEndpoint("http"); 368first.WithReference(second.GetEndpoint("http")); 369second.WithReference(first.GetEndpoint("http"));
AzureContainerAppExpressTests.cs (1)
71.WithReference(api.GetEndpoint("http"));
AzureContainerAppsTests.cs (15)
202.WithEnvironment("AGENT_URL", agent.GetEndpoint("http").Property(EndpointProperty.Url)); 416var httpEp = project.GetEndpoint("http"); 417var httpsEp = project.GetEndpoint("https"); 418var internalEp = project.GetEndpoint("internal"); 420context.EnvironmentVariables["HTTP_EP"] = project.GetEndpoint("http"); 421context.EnvironmentVariables["HTTPS_EP"] = project.GetEndpoint("https"); 422context.EnvironmentVariables["INTERNAL_EP"] = project.GetEndpoint("internal"); 522var httpEp = project.GetEndpoint("http"); 523var httpsEp = project.GetEndpoint("https"); 524var internalEp = project.GetEndpoint("internal"); 526context.EnvironmentVariables["HTTP_EP"] = project.GetEndpoint("http"); 527context.EnvironmentVariables["HTTPS_EP"] = project.GetEndpoint("https"); 528context.EnvironmentVariables["INTERNAL_EP"] = project.GetEndpoint("internal"); 2874var endpointReferenceEx = env.Resource.GetHostAddressExpression(project.GetEndpoint("http")); 2908var expression = env.Resource.GetEndpointPropertyExpression(project.GetEndpoint("http").Property(property));
AzureCosmosDBExtensionsTests.cs (3)
89var endpoint = cosmos.GetEndpoint("data-explorer"); 1248new() { Url = "http://localhost:8080", Endpoint = cosmos.GetEndpoint("emulatorhealth") } 1273new() { Url = "http://localhost:1234", Endpoint = cosmos.GetEndpoint("data-explorer") }
AzureEnvironmentResourceTests.cs (5)
41environment.GetEndpointPropertyExpression(frontend.GetEndpoint("endpoint").Property(property))); 69var origin = frontend.GetEndpoint("http").PrimaryBrowserOrigin; 74.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins) 105var origins = frontend.GetEndpoint("http").PrimaryBrowserOrigin; 110.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins)
AzureFrontDoorPrivateLinkTests.cs (1)
149.WithEnvironment("API_HOST", api.GetEndpoint("https").Property(EndpointProperty.Host));
AzureProvisioningResourceExtensionsTests.cs (1)
22var endpointReference = apiProject.GetEndpoint("https");
AzureResourcePreparerTests.cs (6)
701.WithReference(agent.GetEndpoint("http")); 726.WithReference(agent.GetEndpoint("http")); 781.WithReference(agent1.GetEndpoint("http")) 782.WithReference(agent2.GetEndpoint("http")); 820.WithReference(agent.GetEndpoint("http")); 861.WithReference(agent.GetEndpoint("http"));
AzureSandboxesTests.cs (9)
55api.GetEndpoint("http").Property(property), environment.Resource, out var value)); 2260Assert.True(AzureSandboxContainerDeployment.TryResolveEndpointReferenceValue(api.GetEndpoint("http"), sandboxGroup.Resource, out var urlExpression)); 2265Assert.True(AzureSandboxContainerDeployment.TryResolveEndpointReferenceValue(api.GetEndpoint("http").Property(EndpointProperty.TargetPort), sandboxGroup.Resource, out var targetPortExpression)); 2971var endpointExpression = ReferenceExpression.Create($"{api.GetEndpoint("http")}/v1"); 3101.WithEnvironment("API_URL", ReferenceExpression.Create($"{api.GetEndpoint("http")}/v1")) 3141.WithEnvironment("API_URL", api.GetEndpoint("http")) 3181first.WithEnvironment("SECOND_URL", second.GetEndpoint("http")); 3182second.WithEnvironment("FIRST_URL", first.GetEndpoint("http")); 3260$"https://{api.GetEndpoint("http").Property(EndpointProperty.HostAndPort)}/v1"))
AzureWebPubSubEmulatorTests.cs (4)
41Assert.Equal(8080, webPubSub.GetEndpoint("emulator").TargetPort); 58var endpoint = api.GetEndpoint("http").EndpointAnnotation; 71.AddEventHandler($"{api.GetEndpoint("http")}/events/{{hub}}/{{event}}", systemEvents: ["connect", "connected", "disconnected"]) 151var endpoint = webPubSub.GetEndpoint("emulator").EndpointAnnotation;
AzureWebPubSubExtensionsTests.cs (4)
120wps.AddHub("abc").AddEventHandler($"{serviceA.GetEndpoint("https")}/eventhandler/"); 237.AddEventHandler($"{serviceA.GetEndpoint("https")}/hub/eventhandler1") 238.AddEventHandler($"{serviceA.GetEndpoint("https")}/eventhandler2") 239.AddEventHandler($"{serviceA.GetEndpoint("https")}/eventhandler3", "event1", ["connect", "connected"]);
BicepUtilitiesTests.cs (1)
253.WithParameter("endpoint", container.GetEndpoint("http"));
FoundryExtensionsTests.cs (2)
858context.EnvironmentVariables["WEATHER_HEALTH_URL"] = ReferenceExpression.Create($"{weatherAgent.GetEndpoint("http")}/health"); 898context.EnvironmentVariables["WEATHER_HOST_AND_PORT"] = weatherAgent.GetEndpoint("http").Property(EndpointProperty.HostAndPort);
Aspire.Hosting.Blazor.Tests (27)
GatewayConfigurationBuilderTests.cs (24)
26var gatewayEndpoint = gateway.GetEndpoint("https"); 49var gatewayEndpoint = gateway.GetEndpoint("https"); 71var gatewayEndpoint = gateway.GetEndpoint("https"); 98var gatewayEndpoint = gateway.GetEndpoint("https"); 124var gatewayEndpoint = gateway.GetEndpoint("https"); 144var gatewayEndpoint = gateway.GetEndpoint("https"); 170var gatewayEndpoint = gateway.GetEndpoint("https"); 195var gatewayEndpoint = gateway.GetEndpoint("https"); 221var gatewayEndpoint = gateway.GetEndpoint("https"); 250var gatewayEndpoint = gateway.GetEndpoint("https"); 271var gatewayEndpoint = gateway.GetEndpoint("https"); 272var httpGatewayEndpoint = gateway.GetEndpoint("http"); 298GatewayConfigurationBuilder.EmitProxyConfiguration(env, apps, gateway.GetEndpoint("https"), gateway.GetEndpoint("http")); 322GatewayConfigurationBuilder.EmitProxyConfiguration(env, apps, gateway.GetEndpoint("https"), gateway.GetEndpoint("http")); 344var gatewayEndpoint = gateway.GetEndpoint("https"); 369var gatewayEndpoint = gateway.GetEndpoint("https"); 401GatewayConfigurationBuilder.EmitProxyConfiguration(env, apps, gateway.GetEndpoint("https"), gateway.GetEndpoint("http"), httpOtlpEndpoint: "http://localhost:18890"); 460GatewayConfigurationBuilder.EmitProxyConfiguration(env, apps, gateway.GetEndpoint("https"), gateway.GetEndpoint("http"), httpOtlpEndpoint: "http://localhost:4318"); 488var gatewayEndpoint = gateway.GetEndpoint("https"); 533var hostEndpoint = host.GetEndpoint("https");
WithBlazorAppTests.cs (3)
421.WithReference(weatherApi.GetEndpoint("public")); 462.WithReference(weatherApi.GetEndpoint("public")) 463.WithReference(weatherApi.GetEndpoint("admin"));
Aspire.Hosting.Containers.Tests (1)
ContainerResourceTests.cs (1)
118context.Args.Add(c1.GetEndpoint("ep"));
Aspire.Hosting.DevTunnels.Tests (7)
DevTunnelResourceBuilderExtensionsTests.cs (5)
448var targetEndpoint = target.GetEndpoint("https"); 493var target2Endpoint = target2.GetEndpoint("https"); 562var targetEndpoint = target.GetEndpoint("http"); 694var targetEndpoint = target.GetEndpoint("http"); 882var targetEndpoint = target.GetEndpoint("http");
TestDevTunnelMonitor.cs (2)
28var targetEndpoint = target.GetEndpoint("http"); 33var otherEndpoint = target.GetEndpoint("other");
Aspire.Hosting.Docker.Tests (16)
DockerComposePublisherTests.cs (15)
41consumer.WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins) 47.WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins); 49consumer.WithEnvironment("REPEATED", web.GetEndpoint("http").BrowserOrigins) 80.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins) 81.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins) 82.WithEnvironment("REPEATED", first.GetEndpoint("c").BrowserOrigins); 110var consumer = builder.AddContainer("consumer", "image").WithEnvironment("ORIGINS", web.GetEndpoint("endpoint").Property(property)); 132builder.AddContainer("consumer", "image").WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins); 153.WithEnvironment("ORIGIN", web.GetEndpoint("http").PrimaryBrowserOrigin) 154.WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins); 183var origin = frontend.GetEndpoint("HTTP").BrowserOrigins; 186.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins) 277.WithReference(api.GetEndpoint("http")); 1502.WithEnvironment("CACHE_TLS", cache.GetEndpoint("tls").Property(EndpointProperty.TlsEnabled)) 1503.WithEnvironment("CACHE_PLAIN_TLS", cache.GetEndpoint("tcp").Property(EndpointProperty.TlsEnabled));
DockerComposeTests.cs (1)
283var endpointReferenceEx = env.Resource.GetHostAddressExpression(project.GetEndpoint("http"));
Aspire.Hosting.Dotnet.Tests (2)
DotnetProjectBuildCoordinatorTests.cs (1)
1558.WithEnvironment("API_ENDPOINT", api.GetEndpoint("http"))
ProjectReferenceCompatibilityTests.cs (1)
63consumer.WithReference(source.GetEndpoint("admin"));
Aspire.Hosting.Foundry.Tests (3)
ProjectResourceTests.cs (1)
25var value = ((IComputeEnvironmentResource)project.Resource).GetEndpointPropertyExpression(agent.GetEndpoint("http").Property(property));
ToolboxTests.cs (2)
798.WithMcpTool("inventory", mcp.GetEndpoint("http")); 887.WithMcpTool("inventory", mcp.GetEndpoint("http"))
Aspire.Hosting.Keycloak (1)
KeycloakResourceBuilderExtensions.cs (1)
120context.EnvironmentVariables["KC_HTTPS_PORT"] = keycloak.GetEndpoint(KeycloakResource.PrimaryEndpointName).Property(EndpointProperty.TargetPort);
Aspire.Hosting.Kubernetes.Tests (84)
CertManagerTests.cs (1)
478.WithRoute("/", api.GetEndpoint("http"))
KubernetesEnvironmentResourceTests.cs (1)
128var endpointReferenceEx = env.Resource.GetHostAddressExpression(project.GetEndpoint("http"));
KubernetesGatewayTests.cs (19)
28gateway.WithRoute("/api", api.GetEndpoint("http")); 70gateway.WithRoute("api.example.com", "/", api.GetEndpoint("http")); 101gateway.WithRoute("/api", api.GetEndpoint("http")); 131gateway.WithRoute("/api", api.GetEndpoint("http")); 162gateway.WithRoute("/", api.GetEndpoint("http")); 189gateway.WithRoute("/", api.GetEndpoint("http")); 225gateway.WithRoute(hostname, "/", api.GetEndpoint("http")); 249.WithRoute("api.example.com", "/", api.GetEndpoint("http")) 284.WithRoute("api.example.com", "/", api.GetEndpoint("http")) 314gateway.WithRoute("example.com", "/api", api.GetEndpoint("http")); 315gateway.WithRoute("example.com", "/", web.GetEndpoint("http")); 317gateway.WithRoute("other.com", "/", api.GetEndpoint("http")); 405gateway.WithRoute("no-leading-slash", api.GetEndpoint("http"))); 457.WithRoute("/", api.GetEndpoint("http")) 506.WithRoute("/", api.GetEndpoint("http")) 543gateway.WithRoute("/api", api.GetEndpoint("http")); 566gateway.WithRoute("api.example.com", "/", api.GetEndpoint("http")); 590gateway.WithRoute("/api", api.GetEndpoint("http")); 622gateway.WithRoute("/api", api.GetEndpoint("http"));
KubernetesIngressTests.cs (25)
28ingress.WithPath("/api", api.GetEndpoint("http")); 59ingress.WithPath("api.example.com", "/", api.GetEndpoint("http")); 103ingress.WithPath("/api", api.GetEndpoint("http")); 144ingress.WithPath("/api", api.GetEndpoint("http")); 172ingress.WithPath("/api", api.GetEndpoint("http")); 199ingress.WithPath("/api", api.GetEndpoint("http")); 223ingress.WithDefaultBackend(api.GetEndpoint("http")); 247.WithPath("api.example.com", "/", api.GetEndpoint("http")) 275.WithPath("api.example.com", "/", api.GetEndpoint("http")) 309ingress.WithPath("example.com", "/api", api.GetEndpoint("http")); 310ingress.WithPath("example.com", "/", web.GetEndpoint("http")); 338ingress.WithPath("/", api.GetEndpoint("http")); 362ingress.WithPath("/exact", api.GetEndpoint("http"), IngressPathType.Exact); 454ingress.WithPath("/", api.GetEndpoint("http")); 492ingress.WithPath("/", api.GetEndpoint("http")); 525ingress.WithPath("/", api.GetEndpoint("http")); 605publicIngress.WithPath("/", api.GetEndpoint("http")); 606internalIngress.WithPath("/admin", admin.GetEndpoint("http")); 641.WithDefaultBackend(web.GetEndpoint("http")) 675.WithPath("app.example.com", "/", web.GetEndpoint("http")) 676.WithDefaultBackend(web.GetEndpoint("http")) 702ingress.WithPath("no-leading-slash", api.GetEndpoint("http"))); 743ingress.WithPath("/", api.GetEndpoint("http")); 766ingress.WithDefaultBackend(web.GetEndpoint("http")); 791ingress.WithPath("/", api.GetEndpoint("http"));
KubernetesPublisherTests.cs (38)
37builder.AddContainer("consumer", "image").WithEnvironment("ORIGINS", web.GetEndpoint("endpoint").Property(property)); 58environment.AddIngress("public").WithHostname("public.example").WithHostname("alias.example").WithPath("/", web.GetEndpoint("http")); 71.WithEnvironment("PORT", web.GetEndpoint("HTTP").Property(EndpointProperty.Port)); 125.WithTls("certificate").WithRoute("web.example.com", "/", web.GetEndpoint("http")); 130.WithTls("certificate").WithPath("web.example.com", "/", web.GetEndpoint("http")); 133.WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins); 159var consumer = builder.AddContainer("consumer", "image").WithEnvironment("ORIGIN", web.GetEndpoint("http").BrowserOrigins); 163.WithTls("certificate").WithRoute(hostname, "/", web.GetEndpoint("http")); 168.WithTls("certificate").WithPath(hostname, "/", web.GetEndpoint("http")); 197environment.AddIngress("first-ingress").WithPath("first.example", "/", first.GetEndpoint("c")); 198environment.AddIngress("second-ingress").WithPath("second.example", "/", second.GetEndpoint("b-c")); 200.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins) 201.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins) 202.WithEnvironment("REPEATED", first.GetEndpoint("c").BrowserOrigins); 229var endpoint = web.GetEndpoint("http"); 277.WithRoute("web.example", "/", web.GetEndpoint("http")) 278.WithRoute("other.example", "/", other.GetEndpoint("http")) 279.WithRoute("web.example", "/duplicate", web.GetEndpoint("http")); 288.WithPath("web.example", "/", web.GetEndpoint("http")) 289.WithPath("other.example", "/", other.GetEndpoint("http")) 290.WithPath("web.example", "/duplicate", web.GetEndpoint("http")); 296var consumer = builder.AddContainer("consumer", "image").WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins); 313environment.AddIngress("public").WithHostname("public.example").WithPath("/", web.GetEndpoint("http")); 317.WithEnvironment("ORIGIN", web.GetEndpoint("http").PrimaryBrowserOrigin) 318.WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins); 343var ingress = environment.AddIngress("public").WithPath("/", web.GetEndpoint("http")); 353.WithEnvironment("ORIGIN", web.GetEndpoint("http").PrimaryBrowserOrigin) 354.WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins); 376var origin = frontend.GetEndpoint("http").BrowserOrigins; 379.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins) 468.WithReference(api.GetEndpoint("http")); 568.WithReference(api.GetEndpoint("http")); 1439.WithReference(api.GetEndpoint("http")); 1548.WithEnvironment("QDB_CLIENT_CONF", questdb.GetEndpoint("http")); 1601ingress.WithPath("/api", api.GetEndpoint("http")); 1602gateway.WithRoute("/api", api.GetEndpoint("http")); 2109.WithEnvironment("CACHE_TLS", cache.GetEndpoint("tls").Property(EndpointProperty.TlsEnabled)) 2110.WithEnvironment("CACHE_PLAIN_TLS", cache.GetEndpoint("tcp").Property(EndpointProperty.TlsEnabled));
Aspire.Hosting.Radius.Tests (36)
Publishing\BackingResourceContractTests.cs (6)
134var endpoint = cache.GetEndpoint("tcp"); 155() => environment.GetHostAddressExpression(cache.GetEndpoint("tcp"))); 158.GetEndpointPropertyExpression(cache.GetEndpoint("tcp").Property(EndpointProperty.Host))); 176() => environment.GetHostAddressExpression(pg.GetEndpoint("tcp"))); 192var expression = environment.GetHostAddressExpression(backend.GetEndpoint("http")); 214var endpoint = cache.GetEndpoint("tcp");
Publishing\BackingResourceProjectionTests.cs (4)
90.WithEnvironment("CUSTOM_HOST", cache.GetEndpoint("tcp").Property(EndpointProperty.Host)) 91.WithEnvironment("CUSTOM_PORT", cache.GetEndpoint("tcp").Property(EndpointProperty.Port)) 92.WithEnvironment("CUSTOM_URL", cache.GetEndpoint("tcp").Property(EndpointProperty.Url)); 112.WithEnvironment("BACKEND_HOST", backend.GetEndpoint("http").Property(EndpointProperty.Host));
Publishing\BackingResourceValueResolutionTests.cs (11)
125.WithEnvironment("MISSING", backend.GetEndpoint("does-not-exist").Property(EndpointProperty.Host)) 126.WithEnvironment("PRESENT", backend.GetEndpoint("http").Property(EndpointProperty.Host)); 415.WithEnvironment("MGMT_URL", rabbit.GetEndpoint("management").Property(EndpointProperty.Url)); 434.WithEnvironment("AMQP_HOST", rabbit.GetEndpoint("tcp").Property(EndpointProperty.Host)); 967.WithEnvironment("CACHE_URL", cache.GetEndpoint("tcp").Property(EndpointProperty.Url)); 986.WithEnvironment("CACHE_HOST", cache.GetEndpoint("tcp").Property(EndpointProperty.Host)) 987.WithEnvironment("CACHE_PORT", cache.GetEndpoint("tcp").Property(EndpointProperty.Port)); 1190var port = cache.GetEndpoint("tcp").Property(EndpointProperty.Port); 1217ReferenceExpression.Create($"primary-{cache.GetEndpoint("tcp").Property(EndpointProperty.Host)}"), 1254.WithEnvironment("BACKEND_URL", backend.GetEndpoint("custom")); 1476.WithEnvironment("STORE_HOST", store.GetEndpoint("tcp").Property(EndpointProperty.Host));
Publishing\ContainerEnvironmentEmissionTests.cs (3)
51.WithReference(backend.GetEndpoint("http")); 74.WithReference(backend.GetEndpoint("http")); 99.WithReference(backend.GetEndpoint("http"))
Publishing\RadiusDeployParametersTests.cs (7)
45.WithEnvironment("ORIGINS", producer.GetEndpoint("endpoint").Property(property)); 69.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins) 70.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins) 71.WithEnvironment("REPEATED", first.GetEndpoint("c").BrowserOrigins); 100.WithEnvironment("ORIGIN", web.GetEndpoint("http").PrimaryBrowserOrigin) 101.WithEnvironment("ORIGINS", web.GetEndpoint("http").BrowserOrigins) 102.WithEnvironment("CONFIG", ReferenceExpression.Create($"origin={web.GetEndpoint("http").PrimaryBrowserOrigin}"));
RadiusEnvironmentResourceTests.cs (5)
24((IComputeEnvironmentResource)environment.Resource).GetEndpointPropertyExpression(web.GetEndpoint("http").Property(property))); 108var endpoint = api.GetEndpoint("http"); 138var endpoint = cache.GetEndpoint("tcp"); 163var endpoint = api.GetEndpoint("https"); 185var endpoint = cache.GetEndpoint("tcp");
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
86var endpoint = redis.GetEndpoint(RedisResource.PrimaryEndpointName); 90endpoint = redis.GetEndpoint(RedisResource.SecondaryEndpointName);
Aspire.Hosting.Tests (161)
AddConnectionStringTests.cs (1)
80ReferenceExpression.Create($"Endpoint={redis.GetEndpoint("tcp")};key={key};{rwl}"));
ApplicationModel\EndpointHostHelpersTests.cs (2)
230var url = await EndpointHostHelpers.GetUrlWithTargetHostAsync(container.GetEndpoint("primary")) 255container.GetEndpoint("primary").EndpointAnnotation,
ContainerTunnelTests.cs (3)
131.WithEnvironment("SERVICEA_URL", servicea.GetEndpoint("http")); 137.WithEnvironment("SERVICEA_URL", servicea.GetEndpoint("http")) 167.WithEnvironment("UPSTREAM_SERVICE_URL", upstreamService.GetEndpoint("http"))
Dcp\DcpExecutorTests.cs (29)
768var endpoint = project.GetEndpoint("http"); 811c.Args.Add(executable.GetEndpoint("http").Property(EndpointProperty.Port)); 1524var computeEndpoint = compute.GetEndpoint("tcp").EndpointAnnotation; 1566var endpoint = emulator.GetEndpoint("http").EndpointAnnotation; 5016Assert.Equal(allocatedPort.ToString(CultureInfo.InvariantCulture), await database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port).GetValueAsync()); 5032database.WithEnvironment("PUBLIC_PORT", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port)); 5033database.WithEnvironment("PUBLIC_PORT_AGAIN", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port)); 5080database.WithEnvironment("PUBLIC_HOST_AND_PORT", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.HostAndPort)); 5119var url = await database.GetEndpoint("NoPortTargetPortSet").GetValueAsync(new ValueProviderContext 5165var url = await database.GetEndpoint("NoPortTargetPortSet").GetValueAsync(context.CancellationToken).ConfigureAwait(false); 5215Assert.Equal($"https://frontend.example,{frontend.GetEndpoint("http").Url}", await frontend.GetEndpoint("http").BrowserOrigins.GetValueAsync(ct)); 5216Assert.Equal($"https://backend.example,{backend.GetEndpoint("http").Url}", await backend.GetEndpoint("http").BrowserOrigins.GetValueAsync(ct)); 10293.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 10294.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port)); 10300.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 10301.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port)); 10484c.EnvironmentVariables["EXEC_PORT"] = executable.GetEndpoint("http").Property(EndpointProperty.Port); 10519c.EnvironmentVariables["EXEC_PORT"] = executable.GetEndpoint("http").Property(EndpointProperty.Port); 10560c.Args.Add(executable.GetEndpoint("http").Property(EndpointProperty.Port)); 10796c.Args.Add(executable.GetEndpoint("http").Property(EndpointProperty.Port)); 10833.WithEnvironment("EXEC_PORT", executable.GetEndpoint("http").Property(EndpointProperty.Port)); 10864.WithEnvironment("EXECUTABLE_PORT", executable.GetEndpoint("http").Property(EndpointProperty.Port)); 10898.WithEnvironment("HOST_PORT", executable.GetEndpoint("unused").Property(EndpointProperty.Port)); 11318.WithEnvironment("TARGET_PORT", target.GetEndpoint("http").Property(EndpointProperty.Port)); 11374.WithEnvironment("EXEC_A_PORT", executableA.GetEndpoint("http").Property(EndpointProperty.Port)); 11380.WithEnvironment("EXEC_B_PORT", executableB.GetEndpoint("http").Property(EndpointProperty.Port)) 11437.WithEnvironment("UPSTREAM_PORT", upstreamExecutable.GetEndpoint("http").Property(EndpointProperty.Port))
EndpointReferenceTests.cs (4)
23: web.GetEndpoint("HTTP"); 39: web.GetEndpoint("http"); 656var endpoint = frontend.GetEndpoint("http"); 674var endpoint = frontend.GetEndpoint("http");
ExecutableResourceTests.cs (2)
28var exe2 = appBuilder.AddExecutable("e2", "python", ".", "app.py", exe1.GetEndpoint("ep")) 38context.Args.Add(exe1.GetEndpoint("ep"));
ExpressionResolverTests.cs (1)
334.WithReference(dependency.GetEndpoint("hostEndpoint"));
HealthCheckTests.cs (2)
49container.WithHttpHealthCheck(() => container.GetEndpoint("nonhttp")); 90var endpoint = resource.GetEndpoint("http").EndpointAnnotation;
ManifestExpressionTests.cs (17)
62consumer.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins); 63consumer.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins); 67consumer.WithEnvironment("FIRST", first.GetEndpoint("c").BrowserOrigins); 68consumer.WithEnvironment("SECOND", second.GetEndpoint("b-c").BrowserOrigins); 89var origin = frontend.GetEndpoint("http").BrowserOrigins; 164var endpoint = frontend.GetEndpoint("http"); 306backend.WithEnvironment("TLS", backend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled)); 405var endpoint = frontend.GetEndpoint("http"); 410ReferenceExpression.Create($"{frontend.GetEndpoint("HTTP").Property(property)}"), 437var origin = frontend.GetEndpoint("http").BrowserOrigins; 456.WithEnvironment("ORIGIN", frontend.GetEndpoint("http").BrowserOrigins); 472var origin = ReferenceExpression.Create($"{frontend.GetEndpoint("http").Property(EndpointProperty.BrowserOrigins)}"); 475frontend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled), 486Assert.False(frontend.GetEndpoint("http").EndpointAnnotation.BrowserUrlsSnapshot.IsValueSet); 500frontend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled), bool.TrueString, 545var conditional = ReferenceExpression.CreateConditional(frontend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled), 607ReferenceExpression.Create($"https://login.example/?redirect_uri={web.GetEndpoint("https"):uri}"));
Orchestrator\ApplicationOrchestratorTests.cs (38)
37await requested.GetEndpoint("http").BrowserOrigins.GetValueAsync(context.CancellationToken); 41var endpoint = resource.GetEndpoint("http").EndpointAnnotation; 54await first.GetEndpoint("http").BrowserOrigins.GetValueAsync(cts.Token)); 59Assert.Equal("http://localhost:8080", await second.GetEndpoint("http").BrowserOrigins.GetValueAsync(cts.Token)); 72observed = await first.GetEndpoint("http").BrowserOrigins.GetValueAsync(context.CancellationToken); 76var endpoint = resource.GetEndpoint("http").EndpointAnnotation; 88Assert.Equal("http://localhost:8080", await second.GetEndpoint("http").BrowserOrigins.GetValueAsync()); 105var read = second.GetEndpoint("http").BrowserOrigins.GetValueAsync(context.CancellationToken).AsTask(); 112var endpoint = resource.GetEndpoint("http").EndpointAnnotation; 142var endpoint = item.GetEndpoint("http").EndpointAnnotation; 152var pending = other.GetEndpoint("http").BrowserOrigins.GetValueAsync(cts.Token).AsTask(); 172var endpoint = frontend.GetEndpoint("http"); 208var endpoint = frontend.GetEndpoint("http"); 240var browserEndpoint = frontend.GetEndpoint("http").BrowserOrigins; 247var endpoint = frontend.GetEndpoint("http").EndpointAnnotation; 297var endpoint = frontend.GetEndpoint("http").EndpointAnnotation; 303var browserEndpoint = frontend.GetEndpoint("http").BrowserOrigins; 307.WithEnvironment("SERVICE_ENDPOINT", frontend.GetEndpoint("http")); 323Assert.Equal("http://localhost:8080", frontend.GetEndpoint("http").Url); 351.WithUrlForEndpoint(frontend.GetEndpoint("http"), url => url.Url = "https://manager.example/admin"); 352var endpoint = frontend.GetEndpoint("http").EndpointAnnotation; 362Assert.Equal("https://admin.example,https://frontend.example,http://localhost:8080", await frontend.GetEndpoint("http").BrowserOrigins.GetValueAsync()); 379var endpoint = frontend.GetEndpoint("http").EndpointAnnotation; 386var pendingOrigin = frontend.GetEndpoint("http").BrowserOrigins.GetValueAsync(); 417var endpoint = frontend.GetEndpoint("http").EndpointAnnotation; 425var origins = frontend.GetEndpoint("http").BrowserOrigins; 427Assert.Equal("http://localhost:8080", frontend.GetEndpoint("http").Url); 435var browserEndpoint = frontend.GetEndpoint("http").BrowserOrigins; 437var endpoint = frontend.GetEndpoint("http").EndpointAnnotation; 449Assert.Equal("http://localhost:8080", frontend.GetEndpoint("http").Url); 462var endpoint = frontend.GetEndpoint("http").EndpointAnnotation; 464var httpsEndpoint = frontend.GetEndpoint("https").EndpointAnnotation; 473Assert.Equal("http://localhost:8080", await frontend.GetEndpoint("http").BrowserOrigins.GetValueAsync().DefaultTimeout()); 474Assert.Equal("https://frontend.example,https://localhost:8443", await frontend.GetEndpoint("https").BrowserOrigins.GetValueAsync().DefaultTimeout()); 485var endpoint = frontend.GetEndpoint("http").EndpointAnnotation; 494Assert.Equal("http://localhost:8080", await frontend.GetEndpoint("http").BrowserOrigins.GetValueAsync()); 512var endpoint = frontend.GetEndpoint("http").EndpointAnnotation; 514var browserEndpoint = frontend.GetEndpoint("http").BrowserOrigins;
ProjectResourceTests.cs (1)
732context.Args.Add(c1.GetEndpoint("ep"));
ResourceDependencyTests.cs (34)
38.WithEnvironment("API_URL", api.GetEndpoint("http")); 55.WithEnvironment("API_PORT", api.GetEndpoint("http").Property(EndpointProperty.Port)); 382.WithEnvironment("C_HOST", c.GetEndpoint("redisc")); 384.WithEnvironment("B_HOST", b.GetEndpoint("httpb")); 444.WithEnvironment("B_URL", b.GetEndpoint("http")); 446.WithEnvironment("C_URL", c.GetEndpoint("http")); 447b.WithEnvironment("D_URL", d.GetEndpoint("http")); // Completes the cycle 449.WithEnvironment("B_URL", b.GetEndpoint("http")); 468.WithEnvironment("BACKEND_URL", backend.GetEndpoint("http")) // Endpoint reference 533.WithReference(container.GetEndpoint("http")); // Reverse direction 617.WithReference(b.GetEndpoint("http")); 637.WithReference(b.GetEndpoint("http")); 658.WithReference(d.GetEndpoint("http")); 661.WithReference(c.GetEndpoint("http")); 663.WithReference(b.GetEndpoint("http")); 705.WithReference(b.GetEndpoint("http")) 728.WithReference(b.GetEndpoint("http")); 751var a = builder.AddContainer("a", "alpine").WithEnvironment("X_URL", x.GetEndpoint("http")); 752var b = builder.AddContainer("b", "alpine").WithEnvironment("Y_URL", y.GetEndpoint("http")); 771var a = builder.AddContainer("a", "alpine").WithEnvironment("X_URL", x.GetEndpoint("http")); 772var b = builder.AddContainer("b", "alpine").WithEnvironment("X_URL", x.GetEndpoint("http")); 791.WithReference(b.GetEndpoint("http")); 814.WithReference(b.GetEndpoint("http")); 894.WithReference(b.GetEndpoint("http")); 901.WithReference(e.GetEndpoint("http")); 930.WithEnvironment("A_URL", a.GetEndpoint("http")); 933.WithEnvironment("B_URL", b.GetEndpoint("http")) 934.WithEnvironment("D_URL", d.GetEndpoint("http")); 935a.WithEnvironment("C_URL", c.GetEndpoint("http")); 985.WithEnvironment("Y_URL", y.GetEndpoint("http")); 987.WithEnvironment("Z_URL", z.GetEndpoint("http")); 1010.WithReference(b.GetEndpoint("http")); 1065ReferenceExpression.Create($"{primary.GetEndpoint("http")}"), 1066ReferenceExpression.Create($"{secondary.GetEndpoint("http")}"));
Schema\SchemaTests.cs (3)
55var tls = frontend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled); 66.WithEnvironment("ORIGIN", frontend.GetEndpoint("http").PrimaryBrowserOrigin) 67.WithEnvironment("ORIGINS", frontend.GetEndpoint("http").BrowserOrigins)
WithEndpointTests.cs (3)
257var ep0 = container.GetEndpoint("ep0"); 258var ep1 = container.GetEndpoint("ep1"); 259var ep2 = container.GetEndpoint("ep2");
WithEnvironmentTests.cs (5)
64var endpoint = container.GetEndpoint("primary"); 113var endpoint = container.GetEndpoint("primary"); 146var endpoint = container.GetEndpoint("primary"); 216.WithEnvironment("myName", projectA.GetEndpoint("mybinding")); 467var endpoint = container.GetEndpoint("primary");
WithHttpCommandTests.cs (2)
185container.WithHttpCommand("/some-path", "Do The Thing", () => container.GetEndpoint("nonhttp")); 618return serviceA.GetEndpoint("http");
WithReferenceTests.cs (10)
266var primaryRef = container.GetEndpoint("primary"); 267var managementRef = container.GetEndpoint("management"); 294var projectB = AddProject<ProjectB>(builder, "b").WithReference(projectA.GetEndpoint(endpointName)); 415.WithReference(projectA.GetEndpoint("mybinding")) 416.WithReference(projectA.GetEndpoint("myconflictingbinding")); 443.WithReference(projectA.GetEndpoint("mybinding")) 444.WithReference(projectA.GetEndpoint("mynonconflictingbinding")); 1217.WithReference(projectA.GetEndpoint("management")); 1247.WithReference(projectA.GetEndpoint("management")); 1308.WithReference(projectA.GetEndpoint("data"));
WithUrlsTests.cs (4)
213.WithUrlForEndpoint(manager.GetEndpoint("http"), url => url.DisplayText = "Manage"); 216Endpoint = otherManager.GetEndpoint("http"), 1033managed.WithUrlForEndpoint(manager.GetEndpoint("http"), url => 1053Assert.Equal($"{manager.GetEndpoint("http").Url.TrimEnd('/')}/admin", url.Url);
Aspire.Hosting.Yarp.Tests (9)
YarpClusterTests.cs (6)
30var httpEndpoint = resource.GetEndpoint("testendpoint"); 31var httpsEndpoint = resource.GetEndpoint("anotherendpoint"); 48var httpEndpoint = resource.GetEndpoint("http"); 49var httpsEndpoint = resource.GetEndpoint("https"); 66var prometheusCluster = new YarpCluster(resource.GetEndpoint("prometheus")); 69var managementCluster = new YarpCluster(resource.GetEndpoint("management"));
YarpConfigGeneratorTests.cs (2)
279var backendCluster = yarp.AddCluster(backend.GetEndpoint("http")) 282yarp.AddRoute(frontend.GetEndpoint("http"))
YarpFunctionalTests.cs (1)
46configurator(yarp, backend.GetEndpoint("http"));
AspireWithMaui.AppHost (1)
AppHost.cs (1)
9.WithReference(weatherApi.GetEndpoint("https"));
AspireWithNode.AppHost (1)
AppHost.cs (1)
43var httpsEndpoint = frontend.GetEndpoint("https");
BlazorStandalone.AppHost (1)
AppHost.cs (1)
16.WithReference(timeApi.GetEndpoint("api"));
CertManagerDemo.AppHost (2)
AppHost.cs (2)
57.WithRoute("/api", api.GetEndpoint("http")) 64.WithRoute("/admin", api.GetEndpoint("http"));
DevTunnels.AppHost (3)
AppHost.cs (3)
11.WithReference(frontend.GetEndpoint("https")); 14.WithReference(frontend.GetEndpoint("https")) 15.WithReference(api.GetEndpoint("https"));
EntraId.AppHost (3)
AppHost.cs (3)
64nodeWeb.WithEnvironment("NODE_WEB_BASE_URL", nodeWeb.GetEndpoint("https").PrimaryBrowserOrigin); 69entraWeb.WithRedirectUris(webFrontend.GetEndpoint("https"), "/signin-oidc", "/signout-callback-oidc"); 70entraWeb.WithRedirectUris(nodeWeb.GetEndpoint("https"), "/auth/redirect", "/auth/signout-callback");
Stress.AppHost (17)
AppHost.cs (4)
22var manualArgEndpoint = manualArgSource.GetEndpoint("http"); 75.WithEnvironment("HOST", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Host)}") 76.WithEnvironment("PORT", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Port)}") 77.WithEnvironment("URL", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Url)}");
CommandResources.cs (13)
918endpointSelector: () => serviceBuilder.GetEndpoint("http"), 929endpointSelector: () => serviceBuilder.GetEndpoint("http"), 940endpointSelector: () => serviceBuilder.GetEndpoint("http"), 951endpointSelector: () => serviceBuilder.GetEndpoint("http"), 962endpointSelector: () => serviceBuilder.GetEndpoint("http"), 973endpointSelector: () => serviceBuilder.GetEndpoint("http"), 984endpointSelector: () => serviceBuilder.GetEndpoint("http"), 1002endpointSelector: () => serviceBuilder.GetEndpoint("http"), 1007endpointSelector: () => serviceBuilder.GetEndpoint("http"), 1012endpointSelector: () => serviceBuilder.GetEndpoint("http"), 1017endpointSelector: () => serviceBuilder.GetEndpoint("http"), 1022endpointSelector: () => serviceBuilder.GetEndpoint("http"), 1027endpointSelector: () => serviceBuilder.GetEndpoint("http"),
TestShop.AppHost (2)
AppHost.cs (2)
235builder.AddRoute("/catalog/{**catch-all}", catalogService.GetEndpoint("http")) 238builder.AddRoute("/basket/{**catch-all}", basketService.GetEndpoint("http"))
WebPubSub.AppHost (1)
AppHost.cs (1)
12var callbackEndpoint = web.GetEndpoint("https");