71 instantiations of EndpointReference
Aspire.Hosting (12)
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);
Dcp\OtlpEndpointReferenceGatherer.cs (4)
62(OtlpProtocol.Grpc, not null, _) => new EndpointReference(dashboardResource, grpcEndpoint, resourceNetwork), 63(OtlpProtocol.HttpProtobuf or OtlpProtocol.HttpJson, _, not null) => new EndpointReference(dashboardResource, httpEndpoint, resourceNetwork), 64(_, not null, _) => new EndpointReference(dashboardResource, grpcEndpoint, resourceNetwork), 65(_, _, not null) => new EndpointReference(dashboardResource, httpEndpoint, resourceNetwork),
Orchestrator\ApplicationOrchestrator.cs (1)
247var endpointReference = new EndpointReference(resourceWithEndpoints, endpoint, endpoint.DefaultNetworkID);
ResourceBuilderExtensions.cs (1)
958var 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)
419=> 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)
408return 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, KnownNetworkIdentifiers.LocalhostNetwork); 42public EndpointReference InternalEndpoint => _internalEndpoint ??= new(this, InternalEndpointName, KnownNetworkIdentifiers.DefaultAspireContainerNetwork);
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 (24)
Dashboard\DashboardLifecycleHookTests.cs (2)
140var httpEndpoint = new EndpointReference(dashboardResource, "http"); 142var otlpGrpcEndpoint = new EndpointReference(dashboardResource, KnownEndpointNames.OtlpGrpcEndpointName);
EndpointReferenceTests.cs (18)
18var endpointRef = new EndpointReference(resource, annotation); 36var endpointRef = new EndpointReference(resource, annotation); 56var endpointRef = new EndpointReference(resource, annotation); 70var endpointRef = new EndpointReference(resource, annotation); 89var endpointRef = new EndpointReference(resource, annotation); 108var endpointRef = new EndpointReference(resource, annotation); 122var endpointRef = new EndpointReference(resource, annotation); 136var endpointRef = new EndpointReference(resource, annotation); 150var endpointRef = new EndpointReference(resource, annotation); 169var endpointRef = new EndpointReference(resource, annotation); 187var endpointRef = new EndpointReference(resource, annotation); 218var endpointRef = new EndpointReference(resource, annotation); 231var endpointRef = new EndpointReference(resource, annotation); 244var endpointRef = new EndpointReference(resource, annotation); 257var endpointRef = new EndpointReference(resource, annotation); 270var endpointRef = new EndpointReference(resource, annotation); 283var endpointRef = new EndpointReference(resource, annotation); 386var endpointRef = new EndpointReference(resource, annotation);
ExpressionResolverTests.cs (4)
283PrimaryEndpoint = new(this, "http"); 303EndpointReference Endpoint1 => new(this, "endpoint1"); 304EndpointReference Endpoint2 => new(this, "endpoint2"); 305EndpointReference Endpoint3 => new(this, "endpoint3");
Aspire.Hosting.Valkey (1)
ValkeyResource.cs (1)
34public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
260 references to EndpointReference
Aspire.Hosting (82)
ApplicationModel\EndpointHostHelpers.cs (1)
123internal static async ValueTask<string?> GetUrlWithTargetHostAsync(EndpointReference endpoint, CancellationToken cancellationToken = default)
ApplicationModel\EndpointReference.cs (8)
190/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 197/// or host processes calling container via mapped ports). If a <see cref="NetworkIdentifier"/> is specified, the <see cref="EndpointReference"/> 213/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 222/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 244/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 260public class EndpointReferenceExpression(EndpointReference endpointReference, EndpointProperty property) : IManifestExpressionProvider, IValueProvider, IValueWithReferences 263/// Gets the <see cref="EndpointReference"/>. 265public EndpointReference Endpoint { get; } = endpointReference ?? throw new ArgumentNullException(nameof(endpointReference));
ApplicationModel\HostUrl.cs (2)
65var targetEndpoint = model.Resources.Where(r => !r.IsContainer()) 70if (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)
387var 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)
381var httpsEndpoint = resourceWithEndpoints.GetEndpoint("https"); 382var httpEndpoint = resourceWithEndpoints.GetEndpoint("http"); 384var endpoint = httpsEndpoint.Exists ? httpsEndpoint : httpEndpoint; 646static ReferenceExpression GetTargetUrlExpression(EndpointReference e) => 649var otlpGrpc = dashboardResource.GetEndpoint(KnownEndpointNames.OtlpGrpcEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 655var otlpHttp = dashboardResource.GetEndpoint(KnownEndpointNames.OtlpHttpEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 661var mcp = dashboardResource.GetEndpoint(McpEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 686foreach (var e in frontendEndpoints.Where(e => e.EndpointName is "http" or "https")) 702var publicEndpoint = frontendEndpoints.FirstOrDefault(e => e.EndpointName is "https") ?? frontendEndpoints.First(e => e.EndpointName is "http");
Dcp\OtlpEndpointReferenceGatherer.cs (1)
60var endpointReference = (oea.RequiredProtocol, grpcEndpoint, httpEndpoint) switch
McpServerResourceBuilderExtensions.cs (1)
52EndpointReference? endpoint = null;
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) 463foreach (var endpoint in annotation.Resource.GetEndpoints(annotation.ContextNetworkID)) 799public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, EndpointReference endpointReference) 958var endpointReference = new EndpointReference(resourceWithEndpoints, annotation, KnownNetworkIdentifiers.LocalhostNetwork); 1059/// 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). 1060/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>. 1066/// <returns>An <see cref="EndpointReference"/> that can be used to resolve the address of the endpoint after resource allocation has occurred.</returns> 1067public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name, NetworkIdentifier contextNetworkID) where T : IResourceWithEndpoints 1075/// 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). 1076/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>. 1081/// <returns>An <see cref="EndpointReference"/> that can be used to resolve the address of the endpoint after resource allocation has occurred.</returns> 1083public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints 1284var endpoint = url.ValueProviders.OfType<EndpointReference>().FirstOrDefault(); 1304/// To add another URL for an endpoint, use <see cref="WithUrlForEndpoint{T}(IResourceBuilder{T}, string, Func{EndpointReference, ResourceUrlAnnotation})"/>. 1379public static IResourceBuilder<T> WithUrlForEndpoint<T>(this IResourceBuilder<T> builder, string endpointName, Func<EndpointReference, ResourceUrlAnnotation> callback) 1384var endpoint = builder.GetEndpoint(endpointName); 1899public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, Func<EndpointReference>? endpointSelector, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints 1903var endpoint = endpointSelector() 2249Func<EndpointReference>? endpointSelector, 2256var endpoint = endpointSelector() 2650private static Func<EndpointReference> NamedEndpointSelector<TResource>(IResourceBuilder<TResource> builder, string[] endpointNames, string errorDisplayNoun) 2656EndpointReference? matchingEndpoint = null; 2676private static Func<EndpointReference> DefaultEndpointSelector<TResource>(IResourceBuilder<TResource> builder) 2682EndpointReference? matchingEndpoint = null; 3115public 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) 3120var 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)
245public 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)
217var endpoint = resource.GetEndpoint("http"); 303var 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)
428var 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)
308var httpEp = project.GetEndpoint("http"); 309var httpsEp = project.GetEndpoint("https"); 310var internalEp = project.GetEndpoint("internal"); 385var httpEp = project.GetEndpoint("http"); 386var httpsEp = project.GetEndpoint("https"); 387var internalEp = project.GetEndpoint("internal");
AzureCosmosDBExtensionsTests.cs (1)
84var endpoint = cosmos.GetEndpoint("data-explorer");
AzureProvisioningResourceExtensionsTests.cs (1)
20var endpointReference = apiProject.GetEndpoint("https");
AzureStorageExtensionsTests.cs (1)
418EndpointReference 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)
258/// To expose only specific endpoints on the referenced resource, use <see cref="WithReference(IResourceBuilder{DevTunnelResource}, EndpointReference, DevTunnelPortOptions?)"/>. 273foreach (var endpoint in resourceBuilder.Resource.GetEndpoints()) 290EndpointReference targetEndpoint) 302EndpointReference targetEndpoint, 315EndpointReference targetEndpoint, 347/// <returns>An <see cref="EndpointReference"/> representing the public tunnel endpoint.</returns> 349public static EndpointReference GetEndpoint<TResource>(this IResourceBuilder<DevTunnelResource> tunnelBuilder, IResourceBuilder<TResource> resourceBuilder, string endpointName) 365/// <returns>An <see cref="EndpointReference"/> representing the public tunnel endpoint.</returns> 366public static EndpointReference GetEndpoint(this IResourceBuilder<DevTunnelResource> tunnelBuilder, IResource resource, string endpointName) 388/// <returns>An <see cref="EndpointReference"/> representing the public tunnel endpoint.</returns> 389public static EndpointReference GetEndpoint(this IResourceBuilder<DevTunnelResource> tunnelBuilder, EndpointReference targetEndpointReference) 406private static EndpointReference CreateEndpointReferenceWithError(DevTunnelResource tunnelResource, IResource targetResource, string endpointName) 493EndpointReference 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)
119var endpoint = kafkaResource.InternalEndpoint; 134static void ConfigureKafkaUIContainer(EnvironmentCallbackContext context, EndpointReference endpoint, int index) 210var primaryEndpoint = resource.PrimaryEndpoint; 212var internalEndpoint = resource.InternalEndpoint;
KafkaServerResource.cs (4)
19private EndpointReference? _primaryEndpoint; 20private EndpointReference? _internalEndpoint; 26public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 42public EndpointReference InternalEndpoint => _internalEndpoint ??= new(this, InternalEndpointName, KnownNetworkIdentifiers.DefaultAspireContainerNetwork);
Aspire.Hosting.Kubernetes (2)
KubernetesEnvironmentResource.cs (1)
105public ReferenceExpression GetHostAddressExpression(EndpointReference endpointReference)
KubernetesResource.cs (1)
387if (value is EndpointReference ep)
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
142var tunnelEndpoint = tunnelConfig.DevTunnel.GetEndpoint(tunnelConfig.OtlpStub, "otlp");
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)
623var 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 (35)
Dashboard\DashboardLifecycleHookTests.cs (2)
140var httpEndpoint = new EndpointReference(dashboardResource, "http"); 142var otlpGrpcEndpoint = new EndpointReference(dashboardResource, KnownEndpointNames.OtlpGrpcEndpointName);
EndpointReferenceTests.cs (18)
18var endpointRef = new EndpointReference(resource, annotation); 36var endpointRef = new EndpointReference(resource, annotation); 56var endpointRef = new EndpointReference(resource, annotation); 70var endpointRef = new EndpointReference(resource, annotation); 89var endpointRef = new EndpointReference(resource, annotation); 108var endpointRef = new EndpointReference(resource, annotation); 122var endpointRef = new EndpointReference(resource, annotation); 136var endpointRef = new EndpointReference(resource, annotation); 150var endpointRef = new EndpointReference(resource, annotation); 169var endpointRef = new EndpointReference(resource, annotation); 187var endpointRef = new EndpointReference(resource, annotation); 218var endpointRef = new EndpointReference(resource, annotation); 231var endpointRef = new EndpointReference(resource, annotation); 244var endpointRef = new EndpointReference(resource, annotation); 257var endpointRef = new EndpointReference(resource, annotation); 270var endpointRef = new EndpointReference(resource, annotation); 283var endpointRef = new EndpointReference(resource, annotation); 386var endpointRef = new EndpointReference(resource, annotation);
ExpressionResolverTests.cs (4)
286public EndpointReference PrimaryEndpoint { get; } 303EndpointReference Endpoint1 => new(this, "endpoint1"); 304EndpointReference Endpoint2 => new(this, "endpoint2"); 305EndpointReference 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)
235var endpoint = container.GetEndpoint("primary"); 284var endpoint = container.GetEndpoint("primary"); 317var endpoint = container.GetEndpoint("primary"); 450var 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");