76 instantiations of EndpointReference
Aspire.Hosting (12)
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),
Aspire.Hosting.Azure.AppConfiguration (1)
Aspire.Hosting.Azure.CosmosDB (1)
Aspire.Hosting.Azure.EventHubs (1)
Aspire.Hosting.Azure.KeyVault (1)
Aspire.Hosting.Azure.ServiceBus (1)
Aspire.Hosting.Azure.SignalR (1)
Aspire.Hosting.Azure.Storage (3)
Aspire.Hosting.Azure.Tests (1)
Aspire.Hosting.DevTunnels (2)
Aspire.Hosting.Docker (2)
Aspire.Hosting.Garnet (1)
Aspire.Hosting.Kafka (2)
Aspire.Hosting.Milvus (1)
Aspire.Hosting.MongoDB (1)
Aspire.Hosting.MySql (1)
Aspire.Hosting.Nats (1)
Aspire.Hosting.Oracle (1)
Aspire.Hosting.PostgreSQL (3)
Aspire.Hosting.Qdrant (2)
Aspire.Hosting.RabbitMQ (2)
Aspire.Hosting.Redis (3)
Aspire.Hosting.Seq (1)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.Tests (29)
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);
Aspire.Hosting.Valkey (1)
271 references to EndpointReference
Aspire.Hosting (85)
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; }
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)
Aspire.Hosting.Azure.AppConfiguration (1)
Aspire.Hosting.Azure.AppContainers (2)
Aspire.Hosting.Azure.AppService (3)
Aspire.Hosting.Azure.CosmosDB (2)
Aspire.Hosting.Azure.EventHubs (3)
Aspire.Hosting.Azure.Functions (2)
Aspire.Hosting.Azure.KeyVault (1)
Aspire.Hosting.Azure.Kusto (1)
Aspire.Hosting.Azure.ServiceBus (2)
Aspire.Hosting.Azure.SignalR (1)
Aspire.Hosting.Azure.Storage (7)
Aspire.Hosting.Azure.Tests (13)
Aspire.Hosting.DevTunnels (20)
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)
Aspire.Hosting.Docker (7)
Aspire.Hosting.Foundry (1)
Aspire.Hosting.Garnet (2)
Aspire.Hosting.JavaScript (2)
Aspire.Hosting.Kafka (8)
Aspire.Hosting.Kubernetes (2)
Aspire.Hosting.Maui (1)
Aspire.Hosting.Milvus (2)
Aspire.Hosting.MongoDB (2)
Aspire.Hosting.MySql (3)
Aspire.Hosting.Nats (2)
Aspire.Hosting.Oracle (1)
Aspire.Hosting.PostgreSQL (6)
Aspire.Hosting.Python (1)
Aspire.Hosting.Qdrant (4)
Aspire.Hosting.RabbitMQ (3)
Aspire.Hosting.Redis (5)
Aspire.Hosting.Redis.Tests (2)
Aspire.Hosting.Seq (2)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.Testing (3)
Aspire.Hosting.Tests (40)
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);
Aspire.Hosting.Valkey (2)
Aspire.Hosting.Yarp (6)
Aspire.Hosting.Yarp.Tests (5)
AspireWithNode.AppHost (1)
DevTunnels.AppHost (1)