76 instantiations of EndpointReference
Aspire.Hosting (12)
ApplicationModel\ResourceExtensions.cs (6)
694return endpoints.Select(e => new EndpointReference(resource, e)); 710return endpoints.Select(e => new EndpointReference(resource, e, contextNetworkID)); 729return new EndpointReference(resource, endpointName); 733return new EndpointReference(resource, endpoint); 752return new EndpointReference(resource, endpointName, contextNetworkID); 756return 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)
1118var 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)
420=> 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)
444return new EndpointReference(tunnelResource, endpointName)
Aspire.Hosting.Docker (2)
DockerComposeAspireDashboardResource.cs (2)
19public EndpointReference PrimaryEndpoint => new(this, "http"); 24public EndpointReference OtlpGrpcEndpoint => new(this, "otlp-grpc");
Aspire.Hosting.Garnet (1)
GarnetResource.cs (1)
30public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Kafka (2)
KafkaServerResource.cs (2)
27public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 43public EndpointReference InternalEndpoint => _internalEndpoint ??= new(this, InternalEndpointName, KnownNetworkIdentifiers.DefaultAspireContainerNetwork);
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
37public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.MongoDB (1)
MongoDBServerResource.cs (1)
35public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.MySql (1)
MySqlServerResource.cs (1)
27PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Nats (1)
NatsServerResource.cs (1)
34public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
24PrimaryEndpoint = 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)
37public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 52public EndpointReference HttpEndpoint => _httpEndpoint ??= new(this, HttpEndpointName);
Aspire.Hosting.RabbitMQ (2)
RabbitMQServerResource.cs (2)
27PrimaryEndpoint = new(this, PrimaryEndpointName); 40public EndpointReference ManagementEndpoint => _managementEndpoint ??= new(this, ManagementEndpointName);
Aspire.Hosting.Redis (3)
RedisBuilderExtensions.cs (1)
255endpoint = new EndpointReference(redisInstance, secondaryEndpoint);
RedisInsightResource.cs (1)
21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
RedisResource.cs (1)
49public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Seq (1)
SeqResource.cs (1)
20public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
24PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Tests (29)
ConditionalReferenceExpressionTests.cs (5)
79var endpointRef = new EndpointReference(resource, annotation); 128var endpointRef = new EndpointReference(resource, annotation); 145var endpointRef = new EndpointReference(resource, annotation); 159var endpointRef = new EndpointReference(resource, annotation); 172var endpointRef = new EndpointReference(resource, annotation);
Dashboard\DashboardLifecycleHookTests.cs (2)
143var httpEndpoint = new EndpointReference(dashboardResource, "http"); 145var otlpGrpcEndpoint = new EndpointReference(dashboardResource, KnownEndpointNames.OtlpGrpcEndpointName);
EndpointReferenceTests.cs (18)
19var endpointRef = new EndpointReference(resource, annotation); 37var endpointRef = new EndpointReference(resource, annotation); 57var endpointRef = new EndpointReference(resource, annotation); 71var endpointRef = new EndpointReference(resource, annotation); 90var endpointRef = new EndpointReference(resource, annotation); 109var endpointRef = new EndpointReference(resource, annotation); 123var endpointRef = new EndpointReference(resource, annotation); 137var endpointRef = new EndpointReference(resource, annotation); 151var endpointRef = new EndpointReference(resource, annotation); 170var endpointRef = new EndpointReference(resource, annotation); 188var endpointRef = new EndpointReference(resource, annotation); 219var endpointRef = new EndpointReference(resource, annotation); 232var endpointRef = new EndpointReference(resource, annotation); 245var endpointRef = new EndpointReference(resource, annotation); 258var endpointRef = new EndpointReference(resource, annotation); 271var endpointRef = new EndpointReference(resource, annotation); 284var endpointRef = new EndpointReference(resource, annotation); 387var endpointRef = new EndpointReference(resource, annotation);
ExpressionResolverTests.cs (4)
284PrimaryEndpoint = new(this, "http"); 304EndpointReference Endpoint1 => new(this, "endpoint1"); 305EndpointReference Endpoint2 => new(this, "endpoint2"); 306EndpointReference Endpoint3 => new(this, "endpoint3");
Aspire.Hosting.Valkey (1)
ValkeyResource.cs (1)
35public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
271 references to EndpointReference
Aspire.Hosting (85)
ApplicationModel\EndpointHostHelpers.cs (1)
123internal static async ValueTask<string?> GetUrlWithTargetHostAsync(EndpointReference endpoint, CancellationToken cancellationToken = default)
ApplicationModel\EndpointReference.cs (8)
222/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 229/// or host processes calling container via mapped ports). If a <see cref="NetworkIdentifier"/> is specified, the <see cref="EndpointReference"/> 245/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 254/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 276/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 292public class EndpointReferenceExpression(EndpointReference endpointReference, EndpointProperty property) : IManifestExpressionProvider, IValueProvider, IValueWithReferences 295/// Gets the <see cref="EndpointReference"/>. 297public 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 (12)
616else if (TryGetEndpointReference(valueProvider, out var endpointReference)) 640private static bool TryGetEndpointReference(IValueProvider valueProvider, [NotNullWhen(true)] out EndpointReference? endpointReference) 644EndpointReference endpoint => endpoint, 689/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 690public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource) 705/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 706public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource, NetworkIdentifier contextNetworkID) 721/// <returns>An <see cref="EndpointReference"/>object providing resolvable reference for the specified endpoint.</returns> 722public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName) 742/// <param name="contextNetworkID">The network ID of the network that provides the context for the returned <see cref="EndpointReference"/></param> 743/// <returns>An <see cref="EndpointReference"/>object providing resolvable reference for the specified endpoint.</returns> 744public 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)
27[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)
382var httpsEndpoint = resourceWithEndpoints.GetEndpoint("https"); 383var httpEndpoint = resourceWithEndpoints.GetEndpoint("http"); 385var endpoint = httpsEndpoint.Exists ? httpsEndpoint : httpEndpoint; 683static ReferenceExpression GetTargetUrlExpression(EndpointReference e) => 686var otlpGrpc = dashboardResource.GetEndpoint(KnownEndpointNames.OtlpGrpcEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 692var otlpHttp = dashboardResource.GetEndpoint(KnownEndpointNames.OtlpHttpEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 698var mcp = dashboardResource.GetEndpoint(McpEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 723foreach (var e in frontendEndpoints.Where(e => e.EndpointName is "http" or "https")) 739var 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)
53EndpointReference? endpoint = null;
Orchestrator\ApplicationOrchestrator.cs (1)
247var endpointReference = new EndpointReference(resourceWithEndpoints, endpoint, endpoint.DefaultNetworkID);
ProjectResourceBuilderExtensions.cs (3)
956foreach (var e in builder.Resource.GetEndpoints().Where(builder.Resource.ShouldInjectEndpointEnvironment)) 1005foreach (var e in builder.Resource.GetEndpoints().Where(builder.Resource.ShouldInjectEndpointEnvironment)) 1036foreach (var e in builder.Resource.GetEndpoints().Where(builder.Resource.ShouldInjectEndpointEnvironment))
ResourceBuilderExtensions.cs (27)
169public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, EndpointReference endpointReference) 486foreach (var endpoint in annotation.Resource.GetEndpoints(annotation.ContextNetworkID)) 958public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, EndpointReference endpointReference) 1118var endpointReference = new EndpointReference(resourceWithEndpoints, annotation, KnownNetworkIdentifiers.LocalhostNetwork); 1221/// 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). 1222/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>. 1228/// <returns>An <see cref="EndpointReference"/> that can be used to resolve the address of the endpoint after resource allocation has occurred.</returns> 1231public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name, NetworkIdentifier contextNetworkID) where T : IResourceWithEndpoints 1239/// 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). 1240/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>. 1245/// <returns>An <see cref="EndpointReference"/> that can be used to resolve the address of the endpoint after resource allocation has occurred.</returns> 1247public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints 1450var endpoint = url.ValueProviders.OfType<EndpointReference>().FirstOrDefault(); 1470/// To add another URL for an endpoint, use <see cref="WithUrlForEndpoint{T}(IResourceBuilder{T}, string, Func{EndpointReference, ResourceUrlAnnotation})"/>. 1545public static IResourceBuilder<T> WithUrlForEndpoint<T>(this IResourceBuilder<T> builder, string endpointName, Func<EndpointReference, ResourceUrlAnnotation> callback) 1550var endpoint = builder.GetEndpoint(endpointName); 2074public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, Func<EndpointReference>? endpointSelector, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints 2078var endpoint = endpointSelector() 2428Func<EndpointReference>? endpointSelector, 2435var endpoint = endpointSelector() 2914private static Func<EndpointReference> NamedEndpointSelector<TResource>(IResourceBuilder<TResource> builder, string[] endpointNames, string errorDisplayNoun) 2920EndpointReference? matchingEndpoint = null; 2940private static Func<EndpointReference> DefaultEndpointSelector<TResource>(IResourceBuilder<TResource> builder) 2946EndpointReference? matchingEndpoint = null; 3410public 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) 3415var endpoint = endpointSelector() ?? throw new DistributedApplicationException($"Could not create HTTP probe for resource '{builder.Resource.Name}' as the endpoint selector returned null.");
Aspire.Hosting.Azure (3)
AzureBicepResourceExtensions.cs (1)
320public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, EndpointReference value)
AzureProvisioningResourceExtensions.cs (2)
227/// The <see cref="EndpointReference"/> to use for the value of the <see cref="ProvisioningParameter"/>. 238public static ProvisioningParameter AsProvisioningParameter(this EndpointReference endpointReference, AzureResourceInfrastructure infrastructure, string parameterName)
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)
223if (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) 472if (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)
296var blobEndpoint = storage.GetEndpoint("blob"); 297var tableEndpoint = storage.GetEndpoint("table");
AzureEventHubsResource.cs (1)
53internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
221var endpoint = resource.GetEndpoint("http"); 307var 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)
71var 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)
87var endpoint = cosmos.GetEndpoint("data-explorer");
AzureProvisioningResourceExtensionsTests.cs (1)
20var endpointReference = apiProject.GetEndpoint("https");
AzureStorageExtensionsTests.cs (1)
419EndpointReference 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 (20)
DevTunnelResource.cs (3)
59EndpointReference targetEndpoint, 83internal EndpointReference TunnelEndpoint { get; } 85internal EndpointReference TargetEndpoint { get; init; }
DevTunnelResourceBuilderExtensions.cs (17)
277/// To expose only specific endpoints on the referenced resource, use <see cref="WithReference(IResourceBuilder{DevTunnelResource}, EndpointReference, DevTunnelPortOptions?)"/>. 293foreach (var endpoint in resourceBuilder.Resource.GetEndpoints()) 311EndpointReference targetEndpoint) 324EndpointReference targetEndpoint, 332/// This overload is not available in polyglot app hosts. Use <see cref="WithReference(IResourceBuilder{DevTunnelResource}, EndpointReference)"/> or <see cref="WithReference(IResourceBuilder{DevTunnelResource}, EndpointReference, bool)"/> instead. 341EndpointReference targetEndpoint, 377/// <returns>An <see cref="EndpointReference"/> representing the public tunnel endpoint.</returns> 380public static EndpointReference GetEndpoint<TResource>(this IResourceBuilder<DevTunnelResource> tunnelBuilder, IResourceBuilder<TResource> resourceBuilder, string endpointName) 394/// This method is not available in polyglot app hosts. Use <see cref="GetEndpoint(IResourceBuilder{DevTunnelResource}, EndpointReference)"/> instead. 399/// <returns>An <see cref="EndpointReference"/> representing the public tunnel endpoint.</returns> 401public static EndpointReference GetEndpoint(this IResourceBuilder<DevTunnelResource> tunnelBuilder, IResource resource, string endpointName) 423/// <returns>An <see cref="EndpointReference"/> representing the public tunnel endpoint.</returns> 425public static EndpointReference GetEndpoint(this IResourceBuilder<DevTunnelResource> tunnelBuilder, EndpointReference targetEndpointReference) 442private static EndpointReference CreateEndpointReferenceWithError(DevTunnelResource tunnelResource, IResource targetResource, string endpointName) 531EndpointReference 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)
19public EndpointReference PrimaryEndpoint => new(this, "http"); 24public 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)
192public 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.Foundry (1)
Project\ProjectResource.cs (1)
192ReferenceExpression IComputeEnvironmentResource.GetHostAddressExpression(EndpointReference endpointReference)
Aspire.Hosting.Garnet (2)
GarnetResource.cs (2)
25private EndpointReference? _primaryEndpoint; 30public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.JavaScript (2)
JavaScriptHostingExtensions.cs (2)
533var targetEndpoint = resource.GetEndpoint("https"); 1068var endpointReference = parentResource.GetEndpoint(endpointAnnotation.Name);
Aspire.Hosting.Kafka (8)
KafkaBuilderExtensions.cs (4)
121var endpoint = kafkaResource.InternalEndpoint; 136static void ConfigureKafkaUIContainer(EnvironmentCallbackContext context, EndpointReference endpoint, int index) 215var primaryEndpoint = resource.PrimaryEndpoint; 217var internalEndpoint = resource.InternalEndpoint;
KafkaServerResource.cs (4)
20private EndpointReference? _primaryEndpoint; 21private EndpointReference? _internalEndpoint; 27public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName, KnownNetworkIdentifiers.LocalhostNetwork); 43public EndpointReference InternalEndpoint => _internalEndpoint ??= new(this, InternalEndpointName, KnownNetworkIdentifiers.DefaultAspireContainerNetwork);
Aspire.Hosting.Kubernetes (2)
KubernetesEnvironmentResource.cs (1)
111public ReferenceExpression GetHostAddressExpression(EndpointReference endpointReference)
KubernetesResource.cs (1)
389if (value is EndpointReference ep)
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
143var tunnelEndpoint = tunnelConfig.DevTunnel.GetEndpoint(tunnelConfig.OtlpStub, "otlp");
Aspire.Hosting.Milvus (2)
MilvusServerResource.cs (2)
27private EndpointReference? _primaryEndpoint; 37public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.MongoDB (2)
MongoDBServerResource.cs (2)
18private EndpointReference? _primaryEndpoint; 35public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.MySql (3)
MySqlBuilderExtensions.cs (2)
258var endpoint = singleInstance.PrimaryEndpoint; 402var endpoint = mySqlInstance.PrimaryEndpoint;
MySqlServerResource.cs (1)
34public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.Nats (2)
NatsServerResource.cs (2)
17private EndpointReference? _primaryEndpoint; 34public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
31public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.PostgreSQL (6)
PgWebContainerResource.cs (2)
16private EndpointReference? _primaryEndpoint; 21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
PostgresBuilderExtensions.cs (1)
637var 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)
283var endpoint = ((IResourceWithEndpoints)c.Resource).GetEndpoint("http");
Aspire.Hosting.Qdrant (4)
QdrantServerResource.cs (4)
26private EndpointReference? _primaryEndpoint; 27private EndpointReference? _httpEndpoint; 37public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 52public EndpointReference HttpEndpoint => _httpEndpoint ??= new(this, HttpEndpointName);
Aspire.Hosting.RabbitMQ (3)
RabbitMQServerResource.cs (3)
15private EndpointReference? _managementEndpoint; 35public EndpointReference PrimaryEndpoint { get; } 40public EndpointReference ManagementEndpoint => _managementEndpoint ??= new(this, ManagementEndpointName);
Aspire.Hosting.Redis (5)
RedisBuilderExtensions.cs (1)
249var endpoint = redisInstance.PrimaryEndpoint;
RedisInsightResource.cs (2)
16private EndpointReference? _primaryEndpoint; 21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
RedisResource.cs (2)
44private EndpointReference? _primaryEndpoint; 49public 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)
15private EndpointReference? _primaryEndpoint; 20public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
31public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.Testing (3)
DistributedApplicationHostingTestingExtensions.cs (3)
152EndpointReference? endpoint; 179static EndpointReference? GetEndpointOrDefault(IResourceWithEndpoints resourceWithEndpoints, string endpointName, NetworkIdentifier? networkIdentifier = default) 181var reference = resourceWithEndpoints.GetEndpoint(endpointName, networkIdentifier ?? KnownNetworkIdentifiers.LocalhostNetwork);
Aspire.Hosting.Tests (40)
ConditionalReferenceExpressionTests.cs (5)
79var endpointRef = new EndpointReference(resource, annotation); 128var endpointRef = new EndpointReference(resource, annotation); 145var endpointRef = new EndpointReference(resource, annotation); 159var endpointRef = new EndpointReference(resource, annotation); 172var endpointRef = new EndpointReference(resource, annotation);
Dashboard\DashboardLifecycleHookTests.cs (2)
143var httpEndpoint = new EndpointReference(dashboardResource, "http"); 145var otlpGrpcEndpoint = new EndpointReference(dashboardResource, KnownEndpointNames.OtlpGrpcEndpointName);
EndpointReferenceTests.cs (18)
19var endpointRef = new EndpointReference(resource, annotation); 37var endpointRef = new EndpointReference(resource, annotation); 57var endpointRef = new EndpointReference(resource, annotation); 71var endpointRef = new EndpointReference(resource, annotation); 90var endpointRef = new EndpointReference(resource, annotation); 109var endpointRef = new EndpointReference(resource, annotation); 123var endpointRef = new EndpointReference(resource, annotation); 137var endpointRef = new EndpointReference(resource, annotation); 151var endpointRef = new EndpointReference(resource, annotation); 170var endpointRef = new EndpointReference(resource, annotation); 188var endpointRef = new EndpointReference(resource, annotation); 219var endpointRef = new EndpointReference(resource, annotation); 232var endpointRef = new EndpointReference(resource, annotation); 245var endpointRef = new EndpointReference(resource, annotation); 258var endpointRef = new EndpointReference(resource, annotation); 271var endpointRef = new EndpointReference(resource, annotation); 284var endpointRef = new EndpointReference(resource, annotation); 387var endpointRef = new EndpointReference(resource, annotation);
ExpressionResolverTests.cs (4)
287public EndpointReference PrimaryEndpoint { get; } 304EndpointReference Endpoint1 => new(this, "endpoint1"); 305EndpointReference Endpoint2 => new(this, "endpoint2"); 306EndpointReference Endpoint3 => new(this, "endpoint3");
ProjectResourceTests.cs (2)
687var http = resource.GetEndpoint("http"); 688var https = resource.GetEndpoint("https");
WithEndpointTests.cs (3)
236var ep0 = container.GetEndpoint("ep0"); 237var ep1 = container.GetEndpoint("ep1"); 238var ep2 = container.GetEndpoint("ep2");
WithEnvironmentTests.cs (4)
236var endpoint = container.GetEndpoint("primary"); 285var endpoint = container.GetEndpoint("primary"); 318var endpoint = container.GetEndpoint("primary"); 451var endpoint = container.GetEndpoint("primary");
WithUrlsTests.cs (2)
377var httpEndpoint = servicea.Resource.GetEndpoint("http"); 402var httpEndpoint = servicea.Resource.GetEndpoint("http");
Aspire.Hosting.Valkey (2)
ValkeyResource.cs (2)
15private EndpointReference? _primaryEndpoint; 35public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Yarp (6)
ConfigurationBuilder\IYarpConfigurationBuilder.cs (4)
30public YarpCluster AddCluster(EndpointReference endpoint); 88internal static YarpCluster AddClusterFromEndpoint(this IYarpConfigurationBuilder builder, EndpointReference endpoint) 162public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, EndpointReference endpoint) 187public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, string path, EndpointReference endpoint)
ConfigurationBuilder\YarpCluster.cs (1)
27internal YarpCluster(EndpointReference endpoint)
ConfigurationBuilder\YarpConfigurationBuilder.cs (1)
27public YarpCluster AddCluster(EndpointReference endpoint)
Aspire.Hosting.Yarp.Tests (5)
YarpClusterTests.cs (4)
30var httpEndpoint = resource.GetEndpoint("testendpoint"); 31var httpsEndpoint = resource.GetEndpoint("anotherendpoint"); 48var httpEndpoint = resource.GetEndpoint("http"); 49var httpsEndpoint = resource.GetEndpoint("https");
YarpFunctionalTests.cs (1)
28private async Task VerifyYarpResource(Action<IResourceBuilder<YarpResource>, EndpointReference> configurator)
AspireWithNode.AppHost (1)
AppHost.cs (1)
39var httpsEndpoint = frontend.GetEndpoint("https");
DevTunnels.AppHost (1)
AppHost.cs (1)
18var devTunnelPortEndpoint = privateDevTunnel.GetEndpoint(api, "https");