66 instantiations of EndpointReference
Aspire.Hosting (8)
ApplicationModel\ResourceExtensions.cs (6)
670return endpoints.Select(e => new EndpointReference(resource, e)); 686return endpoints.Select(e => new EndpointReference(resource, e, contextNetworkID)); 705return new EndpointReference(resource, endpointName); 709return new EndpointReference(resource, endpoint); 728return new EndpointReference(resource, endpointName, contextNetworkID); 732return new EndpointReference(resource, endpoint, contextNetworkID);
Orchestrator\ApplicationOrchestrator.cs (1)
247var endpointReference = new EndpointReference(resourceWithEndpoints, endpoint, endpoint.DefaultNetworkID);
ResourceBuilderExtensions.cs (1)
938var endpointReference = new EndpointReference(resourceWithEndpoints, annotation, KnownNetworkIdentifiers.LocalhostNetwork);
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationResource.cs (1)
21private EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBResource.cs (1)
28internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsResource.cs (1)
53internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.KeyVault (1)
AzureKeyVaultResource.cs (1)
44internal EndpointReference EmulatorEndpoint => new(this, "https");
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusResource.cs (1)
43internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRResource.cs (1)
20internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.Storage (3)
AzureStorageResource.cs (3)
23private EndpointReference EmulatorBlobEndpoint => new(this, "blob"); 24private EndpointReference EmulatorQueueEndpoint => new(this, "queue"); 25private EndpointReference EmulatorTableEndpoint => new(this, "table");
Aspire.Hosting.Azure.Tests (1)
AzureStorageExtensionsTests.cs (1)
418=> new(storage.Resource, new EndpointAnnotation(ProtocolType.Tcp, name: name, targetPort: port));
Aspire.Hosting.DevTunnels (2)
DevTunnelResource.cs (1)
71TunnelEndpoint = new(targetEndpoint.Resource, TunnelEndpointAnnotation);
DevTunnelResourceBuilderExtensions.cs (1)
404return new EndpointReference(tunnelResource, endpointName)
Aspire.Hosting.Docker (2)
DockerComposeAspireDashboardResource.cs (2)
18public EndpointReference PrimaryEndpoint => new(this, "http"); 23public EndpointReference OtlpGrpcEndpoint => new(this, "otlp-grpc");
Aspire.Hosting.Garnet (1)
GarnetResource.cs (1)
29public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Kafka (2)
KafkaServerResource.cs (2)
26public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 42public EndpointReference InternalEndpoint => _internalEndpoint ??= new(this, InternalEndpointName);
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
36public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.MongoDB (1)
MongoDBServerResource.cs (1)
34public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.MySql (1)
MySqlServerResource.cs (1)
26PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Nats (1)
NatsServerResource.cs (1)
33public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
23PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.PostgreSQL (3)
PgWebContainerResource.cs (1)
21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
PostgresMcpContainerResource.cs (1)
21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
PostgresServerResource.cs (1)
25PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Qdrant (2)
QdrantServerResource.cs (2)
36public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 51public EndpointReference HttpEndpoint => _httpEndpoint ??= new(this, HttpEndpointName);
Aspire.Hosting.RabbitMQ (2)
RabbitMQServerResource.cs (2)
26PrimaryEndpoint = new(this, PrimaryEndpointName); 39public EndpointReference ManagementEndpoint => _managementEndpoint ??= new(this, ManagementEndpointName);
Aspire.Hosting.Redis (3)
RedisBuilderExtensions.cs (1)
275endpoint = new EndpointReference(redisInstance, secondaryEndpoint);
RedisInsightResource.cs (1)
21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
RedisResource.cs (1)
38public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Seq (1)
SeqResource.cs (1)
19public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
23PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Tests (23)
Dashboard\DashboardLifecycleHookTests.cs (2)
140var httpEndpoint = new EndpointReference(dashboardResource, "http"); 142var otlpGrpcEndpoint = new EndpointReference(dashboardResource, DashboardEventHandlers.OtlpGrpcEndpointName);
EndpointReferenceTests.cs (17)
17var endpointRef = new EndpointReference(resource, annotation); 35var endpointRef = new EndpointReference(resource, annotation); 55var endpointRef = new EndpointReference(resource, annotation); 69var endpointRef = new EndpointReference(resource, annotation); 88var endpointRef = new EndpointReference(resource, annotation); 107var endpointRef = new EndpointReference(resource, annotation); 121var endpointRef = new EndpointReference(resource, annotation); 135var endpointRef = new EndpointReference(resource, annotation); 149var endpointRef = new EndpointReference(resource, annotation); 168var endpointRef = new EndpointReference(resource, annotation); 186var endpointRef = new EndpointReference(resource, annotation); 217var endpointRef = new EndpointReference(resource, annotation); 230var endpointRef = new EndpointReference(resource, annotation); 243var endpointRef = new EndpointReference(resource, annotation); 256var endpointRef = new EndpointReference(resource, annotation); 269var endpointRef = new EndpointReference(resource, annotation); 282var endpointRef = new EndpointReference(resource, annotation);
ExpressionResolverTests.cs (4)
292PrimaryEndpoint = new(this, "http"); 312EndpointReference Endpoint1 => new(this, "endpoint1"); 313EndpointReference Endpoint2 => new(this, "endpoint2"); 314EndpointReference Endpoint3 => new(this, "endpoint3");
Aspire.Hosting.Valkey (1)
ValkeyResource.cs (1)
34public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
256 references to EndpointReference
Aspire.Hosting (80)
ApplicationModel\EndpointHostHelpers.cs (1)
123internal static async ValueTask<string?> GetUrlWithTargetHostAsync(EndpointReference endpoint, CancellationToken cancellationToken = default)
ApplicationModel\EndpointReference.cs (8)
188/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 195/// or host processes calling container via mapped ports). If a <see cref="NetworkIdentifier"/> is specified, the <see cref="EndpointReference"/> 211/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 220/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 242/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 258public class EndpointReferenceExpression(EndpointReference endpointReference, EndpointProperty property) : IManifestExpressionProvider, IValueProvider, IValueWithReferences 261/// Gets the <see cref="EndpointReference"/>. 263public EndpointReference Endpoint { get; } = endpointReference ?? throw new ArgumentNullException(nameof(endpointReference));
ApplicationModel\HostUrl.cs (2)
64var targetEndpoint = model.Resources.Where(r => !r.IsContainer()) 69if (r.GetEndpoints(KnownNetworkIdentifiers.LocalhostNetwork).FirstOrDefault(ep => ep.Port == uri.Port) is EndpointReference ep)
ApplicationModel\HttpCommandContext.cs (4)
9/// or <see cref="ResourceBuilderExtensions.WithHttpCommand{TResource}(IResourceBuilder{TResource}, string, string, Func{EndpointReference}?, string?, HttpCommandOptions?)"/>. 26public required EndpointReference Endpoint { get; init; } 47/// or <see cref="ResourceBuilderExtensions.WithHttpCommand{TResource}(IResourceBuilder{TResource}, string, string, Func{EndpointReference}?, string?, HttpCommandOptions?)"/>. 64public required EndpointReference Endpoint { get; init; }
ApplicationModel\HttpCommandOptions.cs (1)
16public Func<EndpointReference>? EndpointSelector { get; set; }
ApplicationModel\IComputeEnvironmentResource.cs (2)
14/// Gets a <see cref="ReferenceExpression"/> representing the host address or host name for the specified <see cref="EndpointReference"/>. 22ReferenceExpression GetHostAddressExpression(EndpointReference endpointReference) => throw new NotImplementedException();
ApplicationModel\McpServerEndpointAnnotation.cs (1)
42var endpoint = resource.GetEndpoint(endpointName);
ApplicationModel\ProbeAnnotation.cs (1)
76public required EndpointReference EndpointReference { get; init; }
ApplicationModel\ProjectResource.cs (1)
109internal bool ShouldInjectEndpointEnvironment(EndpointReference e)
ApplicationModel\ResourceExtensions.cs (9)
665/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 666public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource) 681/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 682public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource, NetworkIdentifier contextNetworkID) 697/// <returns>An <see cref="EndpointReference"/>object providing resolvable reference for the specified endpoint.</returns> 698public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName) 718/// <param name="contextNetworkID">The network ID of the network that provides the context for the returned <see cref="EndpointReference"/></param> 719/// <returns>An <see cref="EndpointReference"/>object providing resolvable reference for the specified endpoint.</returns> 720public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName, NetworkIdentifier contextNetworkID)
ApplicationModel\ResourceUrlAnnotation.cs (2)
28public EndpointReference? Endpoint { get; init; } 42internal ResourceUrlAnnotation WithEndpoint(EndpointReference endpoint)
ApplicationModel\ResourceUrlsCallbackContext.cs (2)
29public EndpointReference? GetEndpoint(string name) => 42public EndpointReference? GetEndpoint(string name, NetworkIdentifier contextNetworkID) =>
Ats\AtsTypeMappings.cs (1)
23[assembly: AspireExport(typeof(EndpointReference))]
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
297var mcpEndpoint = dashboardResource.GetEndpoint(McpEndpointName);
Backchannel\DashboardUrlsHelper.cs (4)
68var httpsEndpoint = dashboardResource.GetEndpoint("https"); 69var httpEndpoint = dashboardResource.GetEndpoint("http"); 70var apiEndpoint = httpsEndpoint.Exists ? httpsEndpoint : httpEndpoint; 77var mcpEndpoint = dashboardResource.GetEndpoint(McpEndpointName);
Dashboard\DashboardEventHandlers.cs (9)
390var httpsEndpoint = resourceWithEndpoints.GetEndpoint("https"); 391var httpEndpoint = resourceWithEndpoints.GetEndpoint("http"); 393var endpoint = httpsEndpoint.Exists ? httpsEndpoint : httpEndpoint; 655static ReferenceExpression GetTargetUrlExpression(EndpointReference e) => 658var otlpGrpc = dashboardResource.GetEndpoint(OtlpGrpcEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 664var otlpHttp = dashboardResource.GetEndpoint(OtlpHttpEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 670var mcp = dashboardResource.GetEndpoint(McpEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 695foreach (var e in frontendEndpoints.Where(e => e.EndpointName is "http" or "https")) 711var publicEndpoint = frontendEndpoints.FirstOrDefault(e => e.EndpointName is "https") ?? frontendEndpoints.First(e => e.EndpointName is "http");
Orchestrator\ApplicationOrchestrator.cs (1)
247var endpointReference = new EndpointReference(resourceWithEndpoints, endpoint, endpoint.DefaultNetworkID);
ProjectResourceBuilderExtensions.cs (3)
905foreach (var e in builder.Resource.GetEndpoints().Where(builder.Resource.ShouldInjectEndpointEnvironment)) 954foreach (var e in builder.Resource.GetEndpoints().Where(builder.Resource.ShouldInjectEndpointEnvironment)) 985foreach (var e in builder.Resource.GetEndpoints().Where(builder.Resource.ShouldInjectEndpointEnvironment))
ResourceBuilderExtensions.cs (27)
162public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, EndpointReference endpointReference) 460foreach (var endpoint in annotation.Resource.GetEndpoints(annotation.ContextNetworkID)) 779public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, EndpointReference endpointReference) 938var endpointReference = new EndpointReference(resourceWithEndpoints, annotation, KnownNetworkIdentifiers.LocalhostNetwork); 1039/// Gets an <see cref="EndpointReference"/> by name from the resource. These endpoints are declared either using <see cref="WithEndpoint{T}(IResourceBuilder{T}, int?, int?, string?, string?, string?, bool, bool?, ProtocolType?)"/> or by launch settings (for project resources). 1040/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>. 1046/// <returns>An <see cref="EndpointReference"/> that can be used to resolve the address of the endpoint after resource allocation has occurred.</returns> 1047public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name, NetworkIdentifier contextNetworkID) where T : IResourceWithEndpoints 1055/// Gets an <see cref="EndpointReference"/> by name from the resource. These endpoints are declared either using <see cref="WithEndpoint{T}(IResourceBuilder{T}, int?, int?, string?, string?, string?, bool, bool?, ProtocolType?)"/> or by launch settings (for project resources). 1056/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>. 1061/// <returns>An <see cref="EndpointReference"/> that can be used to resolve the address of the endpoint after resource allocation has occurred.</returns> 1063public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints 1264var endpoint = url.ValueProviders.OfType<EndpointReference>().FirstOrDefault(); 1284/// To add another URL for an endpoint, use <see cref="WithUrlForEndpoint{T}(IResourceBuilder{T}, string, Func{EndpointReference, ResourceUrlAnnotation})"/>. 1359public static IResourceBuilder<T> WithUrlForEndpoint<T>(this IResourceBuilder<T> builder, string endpointName, Func<EndpointReference, ResourceUrlAnnotation> callback) 1364var endpoint = builder.GetEndpoint(endpointName); 1879public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, Func<EndpointReference>? endpointSelector, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints 1883var endpoint = endpointSelector() 2229Func<EndpointReference>? endpointSelector, 2236var endpoint = endpointSelector() 2630private static Func<EndpointReference> NamedEndpointSelector<TResource>(IResourceBuilder<TResource> builder, string[] endpointNames, string errorDisplayNoun) 2636EndpointReference? matchingEndpoint = null; 2656private static Func<EndpointReference> DefaultEndpointSelector<TResource>(IResourceBuilder<TResource> builder) 2662EndpointReference? matchingEndpoint = null; 3095public static IResourceBuilder<T> WithHttpProbe<T>(this IResourceBuilder<T> builder, ProbeType type, Func<EndpointReference>? endpointSelector, string? path = null, int? initialDelaySeconds = null, int? periodSeconds = null, int? timeoutSeconds = null, int? failureThreshold = null, int? successThreshold = null) 3100var endpoint = endpointSelector() ?? throw new DistributedApplicationException($"Could not create HTTP probe for resource '{builder.Resource.Name}' as the endpoint selector returned null.");
Aspire.Hosting.Azure (5)
AzureBicepResourceExtensions.cs (1)
301public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, EndpointReference value)
AzureProvisioningResourceExtensions.cs (4)
215/// The <see cref="EndpointReference"/> to use for the value of the <see cref="ProvisioningParameter"/>. 223/// This is useful when assigning a <see cref="BicepValue"/> to the value of an Aspire <see cref="EndpointReference"/>. 225public static ProvisioningParameter AsProvisioningParameter(this EndpointReference endpointReference, AzureResourceInfrastructure infrastructure, string parameterName) 249/// This is useful when assigning a <see cref="BicepValue"/> to the value of an Aspire <see cref="EndpointReference"/>.
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationResource.cs (1)
21private EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppEnvironmentResource.cs (1)
243public ReferenceExpression GetHostAddressExpression(EndpointReference endpointReference)
BaseContainerAppContext.cs (1)
222if (value is EndpointReference ep)
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceEnvironmentResource.cs (1)
392public ReferenceExpression GetHostAddressExpression(EndpointReference endpointReference)
AzureAppServiceWebsiteContext.cs (2)
150if (value is EndpointReference ep) 435if (kv.Value is EndpointReference)
Aspire.Hosting.Azure.CosmosDB (2)
AzureCosmosDBEmulatorConnectionString.cs (1)
11public static ReferenceExpression Create(EndpointReference endpoint, bool isPreviewEmulator) =>
AzureCosmosDBResource.cs (1)
28internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.EventHubs (3)
AzureEventHubsExtensions.cs (2)
291var blobEndpoint = storage.GetEndpoint("blob"); 292var tableEndpoint = storage.GetEndpoint("table");
AzureEventHubsResource.cs (1)
53internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
212var endpoint = resource.GetEndpoint("http"); 298var targetEndpoint = builder.Resource.GetEndpoint(useHttps ? "https" : "http");
Aspire.Hosting.Azure.KeyVault (1)
AzureKeyVaultResource.cs (1)
44internal EndpointReference EmulatorEndpoint => new(this, "https");
Aspire.Hosting.Azure.Kusto (1)
AzureKustoClusterResource.cs (1)
66var endpoint = this.GetEndpoint("http");
Aspire.Hosting.Azure.ServiceBus (2)
AzureServiceBusExtensions.cs (1)
412var sqlEndpoint = sqlServerResource.Resource.GetEndpoint("tcp");
AzureServiceBusResource.cs (1)
43internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRResource.cs (1)
20internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.Storage (7)
AzureStorageEmulatorConnectionString.cs (4)
13public static ReferenceExpression Create(EndpointReference? blobEndpoint = null, EndpointReference? queueEndpoint = null, EndpointReference? tableEndpoint = null) 33static void AppendEndpointExpression(ReferenceExpressionBuilder builder, string key, EndpointReference endpoint)
AzureStorageResource.cs (3)
23private EndpointReference EmulatorBlobEndpoint => new(this, "blob"); 24private EndpointReference EmulatorQueueEndpoint => new(this, "queue"); 25private EndpointReference EmulatorTableEndpoint => new(this, "table");
Aspire.Hosting.Azure.Tests (13)
AzureContainerAppsTests.cs (6)
307var httpEp = project.GetEndpoint("http"); 308var httpsEp = project.GetEndpoint("https"); 309var internalEp = project.GetEndpoint("internal"); 384var httpEp = project.GetEndpoint("http"); 385var httpsEp = project.GetEndpoint("https"); 386var internalEp = project.GetEndpoint("internal");
AzureCosmosDBExtensionsTests.cs (1)
84var endpoint = cosmos.GetEndpoint("data-explorer");
AzureProvisioningResourceExtensionsTests.cs (1)
20var endpointReference = apiProject.GetEndpoint("https");
AzureStorageExtensionsTests.cs (1)
417EndpointReference GetEndpointReference(string name, int port)
src\Aspire.Hosting.Azure.Storage\AzureStorageEmulatorConnectionString.cs (4)
13public static ReferenceExpression Create(EndpointReference? blobEndpoint = null, EndpointReference? queueEndpoint = null, EndpointReference? tableEndpoint = null) 33static void AppendEndpointExpression(ReferenceExpressionBuilder builder, string key, EndpointReference endpoint)
Aspire.Hosting.DevTunnels (17)
DevTunnelResource.cs (3)
59EndpointReference targetEndpoint, 83internal EndpointReference TunnelEndpoint { get; } 85internal EndpointReference TargetEndpoint { get; init; }
DevTunnelResourceBuilderExtensions.cs (14)
254/// To expose only specific endpoints on the referenced resource, use <see cref="WithReference(IResourceBuilder{DevTunnelResource}, EndpointReference, DevTunnelPortOptions?)"/>. 269foreach (var endpoint in resourceBuilder.Resource.GetEndpoints()) 286EndpointReference targetEndpoint) 298EndpointReference targetEndpoint, 311EndpointReference targetEndpoint, 343/// <returns>An <see cref="EndpointReference"/> representing the public tunnel endpoint.</returns> 345public static EndpointReference GetEndpoint<TResource>(this IResourceBuilder<DevTunnelResource> tunnelBuilder, IResourceBuilder<TResource> resourceBuilder, string endpointName) 361/// <returns>An <see cref="EndpointReference"/> representing the public tunnel endpoint.</returns> 362public static EndpointReference GetEndpoint(this IResourceBuilder<DevTunnelResource> tunnelBuilder, IResource resource, string endpointName) 384/// <returns>An <see cref="EndpointReference"/> representing the public tunnel endpoint.</returns> 385public static EndpointReference GetEndpoint(this IResourceBuilder<DevTunnelResource> tunnelBuilder, EndpointReference targetEndpointReference) 402private static EndpointReference CreateEndpointReferenceWithError(DevTunnelResource tunnelResource, IResource targetResource, string endpointName) 470EndpointReference targetEndpoint,
Aspire.Hosting.DevTunnels.Tests (10)
DevTunnelResourceBuilderExtensionsTests.cs (10)
83var tunnelEndpoint = tunnel.GetEndpoint(target.Resource, "https"); 100var tunnelEndpoint = tunnel.GetEndpoint(target, "https"); 117var targetEndpoint = target.GetEndpoint("https"); 118var tunnelEndpoint = tunnel.GetEndpoint(targetEndpoint); 135var endpointRef = tunnel.GetEndpoint(target.Resource, "nonexistent"); 156var target2Endpoint = target2.GetEndpoint("https"); 157var endpointRef = tunnel.GetEndpoint(target2Endpoint); 175var endpointRef = tunnel.GetEndpoint(target.Resource, "https"); 195var httpTunnelEndpoint = tunnel.GetEndpoint(target.Resource, "http"); 196var httpsTunnelEndpoint = tunnel.GetEndpoint(target.Resource, "https");
Aspire.Hosting.Docker (7)
DockerComposeAspireDashboardResource.cs (2)
18public EndpointReference PrimaryEndpoint => new(this, "http"); 23public EndpointReference OtlpGrpcEndpoint => new(this, "otlp-grpc");
DockerComposeEnvironmentContext.cs (1)
157.Where(kvp => kvp.Value is EndpointReference epRef && epRef.Scheme == "https" && kvp.Key.StartsWith("services__"))
DockerComposeEnvironmentResource.cs (1)
191public ReferenceExpression GetHostAddressExpression(EndpointReference endpointReference)
DockerComposeInfrastructure.cs (2)
63if (environment.DashboardEnabled && environment.Dashboard?.Resource.OtlpGrpcEndpoint is EndpointReference otlpGrpcEndpoint) 111private static void ConfigureOtlp(IResource resource, EndpointReference otlpEndpoint)
DockerComposeServiceResourceExtensions.cs (1)
20if (value is EndpointReference ep)
Aspire.Hosting.Garnet (2)
GarnetResource.cs (2)
24private EndpointReference? _primaryEndpoint; 29public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.JavaScript (1)
JavaScriptHostingExtensions.cs (1)
525var targetEndpoint = resource.GetEndpoint("https");
Aspire.Hosting.Kafka (8)
KafkaBuilderExtensions.cs (4)
120var endpoint = kafkaResource.InternalEndpoint; 135static void ConfigureKafkaUIContainer(EnvironmentCallbackContext context, EndpointReference endpoint, int index) 211var primaryEndpoint = resource.PrimaryEndpoint; 213var internalEndpoint = resource.InternalEndpoint;
KafkaServerResource.cs (4)
19private EndpointReference? _primaryEndpoint; 20private EndpointReference? _internalEndpoint; 26public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 42public EndpointReference InternalEndpoint => _internalEndpoint ??= new(this, InternalEndpointName);
Aspire.Hosting.Kubernetes (2)
KubernetesEnvironmentResource.cs (1)
105public ReferenceExpression GetHostAddressExpression(EndpointReference endpointReference)
KubernetesResource.cs (1)
384if (value is EndpointReference ep)
Aspire.Hosting.Milvus (2)
MilvusServerResource.cs (2)
26private EndpointReference? _primaryEndpoint; 36public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.MongoDB (2)
MongoDBServerResource.cs (2)
17private EndpointReference? _primaryEndpoint; 34public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.MySql (3)
MySqlBuilderExtensions.cs (2)
253var endpoint = singleInstance.PrimaryEndpoint; 393var endpoint = mySqlInstance.PrimaryEndpoint;
MySqlServerResource.cs (1)
33public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.Nats (2)
NatsServerResource.cs (2)
16private EndpointReference? _primaryEndpoint; 33public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
30public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.PostgreSQL (6)
PgWebContainerResource.cs (2)
16private EndpointReference? _primaryEndpoint; 21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
PostgresBuilderExtensions.cs (1)
621var endpoint = postgresInstance.PrimaryEndpoint;
PostgresMcpContainerResource.cs (2)
16private EndpointReference? _primaryEndpoint; 21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
PostgresServerResource.cs (1)
33public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
279var endpoint = ((IResourceWithEndpoints)c.Resource).GetEndpoint("http");
Aspire.Hosting.Qdrant (4)
QdrantServerResource.cs (4)
25private EndpointReference? _primaryEndpoint; 26private EndpointReference? _httpEndpoint; 36public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 51public EndpointReference HttpEndpoint => _httpEndpoint ??= new(this, HttpEndpointName);
Aspire.Hosting.RabbitMQ (3)
RabbitMQServerResource.cs (3)
14private EndpointReference? _managementEndpoint; 34public EndpointReference PrimaryEndpoint { get; } 39public EndpointReference ManagementEndpoint => _managementEndpoint ??= new(this, ManagementEndpointName);
Aspire.Hosting.Redis (5)
RedisBuilderExtensions.cs (1)
269var endpoint = redisInstance.PrimaryEndpoint;
RedisInsightResource.cs (2)
16private EndpointReference? _primaryEndpoint; 21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
RedisResource.cs (2)
33private EndpointReference? _primaryEndpoint; 38public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
84var endpoint = redis.GetEndpoint(RedisResource.PrimaryEndpointName); 630var endpoint = redisCommander.GetEndpoint("http");
Aspire.Hosting.Seq (2)
SeqResource.cs (2)
14private EndpointReference? _primaryEndpoint; 19public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
30public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.Testing (3)
DistributedApplicationHostingTestingExtensions.cs (3)
116EndpointReference? endpoint; 143static EndpointReference? GetEndpointOrDefault(IResourceWithEndpoints resourceWithEndpoints, string endpointName, NetworkIdentifier? networkIdentifier = default) 145var reference = resourceWithEndpoints.GetEndpoint(endpointName, networkIdentifier ?? KnownNetworkIdentifiers.LocalhostNetwork);
Aspire.Hosting.Tests (34)
Dashboard\DashboardLifecycleHookTests.cs (2)
140var httpEndpoint = new EndpointReference(dashboardResource, "http"); 142var otlpGrpcEndpoint = new EndpointReference(dashboardResource, DashboardEventHandlers.OtlpGrpcEndpointName);
EndpointReferenceTests.cs (17)
17var endpointRef = new EndpointReference(resource, annotation); 35var endpointRef = new EndpointReference(resource, annotation); 55var endpointRef = new EndpointReference(resource, annotation); 69var endpointRef = new EndpointReference(resource, annotation); 88var endpointRef = new EndpointReference(resource, annotation); 107var endpointRef = new EndpointReference(resource, annotation); 121var endpointRef = new EndpointReference(resource, annotation); 135var endpointRef = new EndpointReference(resource, annotation); 149var endpointRef = new EndpointReference(resource, annotation); 168var endpointRef = new EndpointReference(resource, annotation); 186var endpointRef = new EndpointReference(resource, annotation); 217var endpointRef = new EndpointReference(resource, annotation); 230var endpointRef = new EndpointReference(resource, annotation); 243var endpointRef = new EndpointReference(resource, annotation); 256var endpointRef = new EndpointReference(resource, annotation); 269var endpointRef = new EndpointReference(resource, annotation); 282var endpointRef = new EndpointReference(resource, annotation);
ExpressionResolverTests.cs (4)
295public EndpointReference PrimaryEndpoint { get; } 312EndpointReference Endpoint1 => new(this, "endpoint1"); 313EndpointReference Endpoint2 => new(this, "endpoint2"); 314EndpointReference Endpoint3 => new(this, "endpoint3");
ProjectResourceTests.cs (2)
686var http = resource.GetEndpoint("http"); 687var https = resource.GetEndpoint("https");
WithEndpointTests.cs (3)
235var ep0 = container.GetEndpoint("ep0"); 236var ep1 = container.GetEndpoint("ep1"); 237var ep2 = container.GetEndpoint("ep2");
WithEnvironmentTests.cs (4)
238var endpoint = container.GetEndpoint("primary"); 287var endpoint = container.GetEndpoint("primary"); 322var endpoint = container.GetEndpoint("primary"); 455var endpoint = container.GetEndpoint("primary");
WithUrlsTests.cs (2)
376var httpEndpoint = servicea.Resource.GetEndpoint("http"); 401var httpEndpoint = servicea.Resource.GetEndpoint("http");
Aspire.Hosting.Valkey (2)
ValkeyResource.cs (2)
14private EndpointReference? _primaryEndpoint; 34public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Yarp (5)
ConfigurationBuilder\IYarpConfigurationBuilder.cs (3)
27public YarpCluster AddCluster(EndpointReference endpoint); 87public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, EndpointReference endpoint) 110public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, string path, EndpointReference endpoint)
ConfigurationBuilder\YarpCluster.cs (1)
25internal YarpCluster(EndpointReference endpoint)
ConfigurationBuilder\YarpConfigurationBuilder.cs (1)
27public YarpCluster AddCluster(EndpointReference endpoint)
Aspire.Hosting.Yarp.Tests (6)
YarpClusterTests.cs (4)
27var httpEndpoint = resource.GetEndpoint("testendpoint"); 28var httpsEndpoint = resource.GetEndpoint("anotherendpoint"); 45var httpEndpoint = resource.GetEndpoint("http"); 46var httpsEndpoint = resource.GetEndpoint("https");
YarpFunctionalTests.cs (2)
27private async Task VerifyYarpResource(Action<IResourceBuilder<YarpResource>, EndpointReference> configurator) 51var endpoint = yarp.Resource.GetEndpoint("http");
AspireWithNode.AppHost (1)
AppHost.cs (1)
39var httpsEndpoint = frontend.GetEndpoint("https");
DevTunnels.AppHost (1)
AppHost.cs (1)
18var devTunnelPortEndpoint = privateDevTunnel.GetEndpoint(api, "https");