36 instantiations of EndpointReference
Aspire.Hosting (4)
ApplicationModel\ResourceExtensions.cs (2)
515return endpoints.Select(e => new EndpointReference(resource, e)); 530return new EndpointReference(resource, endpointName);
Orchestrator\ApplicationOrchestrator.cs (1)
218var endpointReference = new EndpointReference(resourceWithEndpoints, endpoint);
ResourceBuilderExtensions.cs (1)
712var endpointReference = new EndpointReference(resourceWithEndpoints, annotation);
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationResource.cs (1)
19private EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBResource.cs (1)
25internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsResource.cs (1)
41internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusResource.cs (1)
31internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRResource.cs (1)
18internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.Storage (3)
AzureStorageResource.cs (3)
22private EndpointReference EmulatorBlobEndpoint => new(this, "blob"); 23private EndpointReference EmulatorQueueEndpoint => new(this, "queue"); 24private 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.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); 32public 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)
25PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Nats (1)
NatsServerResource.cs (1)
33public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
22PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.PostgreSQL (2)
PgWebContainerResource.cs (1)
21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
PostgresServerResource.cs (1)
24PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Qdrant (2)
QdrantServerResource.cs (2)
36public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 41public EndpointReference HttpEndpoint => _httpEndpoint ??= new(this, HttpEndpointName);
Aspire.Hosting.RabbitMQ (1)
RabbitMQServerResource.cs (1)
25PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Redis (2)
RedisInsightResource.cs (1)
21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
RedisResource.cs (1)
32public 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)
22PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Tests (3)
ExpressionResolverTests.cs (3)
193PrimaryEndpoint = new(this, "http"); 213EndpointReference Endpoint1 => new(this, "endpoint1"); 214EndpointReference Endpoint2 => new(this, "endpoint2");
Aspire.Hosting.Valkey (1)
ValkeyResource.cs (1)
34public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
165 references to EndpointReference
Aspire.Hosting (49)
ApplicationModel\EndpointReference.cs (5)
115/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 130/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 149public class EndpointReferenceExpression(EndpointReference endpointReference, EndpointProperty property) : IManifestExpressionProvider, IValueProvider, IValueWithReferences 152/// Gets the <see cref="EndpointReference"/>. 154public EndpointReference Endpoint { get; } = endpointReference ?? throw new ArgumentNullException(nameof(endpointReference));
ApplicationModel\ExpressionResolver.cs (2)
11async Task<string?> EvalEndpointAsync(EndpointReference endpointReference, EndpointProperty property) 135EndpointReference endpointReference when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false), false),
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\ProjectResource.cs (1)
25internal bool ShouldInjectEndpointEnvironment(EndpointReference e)
ApplicationModel\ResourceExtensions.cs (4)
510/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 511public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource) 526/// <returns>An <see cref="EndpointReference"/> object representing the endpoint reference 528public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName)
ApplicationModel\ResourceUrlAnnotation.cs (2)
27public EndpointReference? Endpoint { get; init; } 41internal ResourceUrlAnnotation WithEndpoint(EndpointReference endpoint)
ApplicationModel\ResourceUrlsCallbackContext.cs (1)
29public EndpointReference? GetEndpoint(string name) =>
Dashboard\DashboardLifecycleHook.cs (4)
354static ReferenceExpression GetTargetUrlExpression(EndpointReference e) => 357var otlpGrpc = dashboardResource.GetEndpoint(OtlpGrpcEndpointName); 363var otlpHttp = dashboardResource.GetEndpoint(OtlpHttpEndpointName); 373foreach (var e in dashboardResource.GetEndpoints().Where(e => e.EndpointName is "http" or "https"))
Orchestrator\ApplicationOrchestrator.cs (1)
218var endpointReference = new EndpointReference(resourceWithEndpoints, endpoint);
ProjectResourceBuilderExtensions.cs (3)
747foreach (var e in builder.Resource.GetEndpoints().Where(builder.Resource.ShouldInjectEndpointEnvironment)) 796foreach (var e in builder.Resource.GetEndpoints().Where(builder.Resource.ShouldInjectEndpointEnvironment)) 827foreach (var e in builder.Resource.GetEndpoints().Where(builder.Resource.ShouldInjectEndpointEnvironment))
ResourceBuilderExtensions.cs (21)
143public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, EndpointReference endpointReference) 413foreach (var endpoint in annotation.Resource.GetEndpoints()) 567public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, EndpointReference endpointReference) 712var endpointReference = new EndpointReference(resourceWithEndpoints, annotation); 810/// 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). 811/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>. 816/// <returns>An <see cref="EndpointReference"/> that can be used to resolve the address of the endpoint after resource allocation has occurred.</returns> 817public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints 979var endpoint = url.ValueProviders.OfType<EndpointReference>().FirstOrDefault(); 999/// To add another URL for an endpoint, use <see cref="WithUrlForEndpoint{T}(IResourceBuilder{T}, string, Func{EndpointReference, ResourceUrlAnnotation})"/>. 1072public static IResourceBuilder<T> WithUrlForEndpoint<T>(this IResourceBuilder<T> builder, string endpointName, Func<EndpointReference, ResourceUrlAnnotation> callback) 1077var endpoint = builder.GetEndpoint(endpointName); 1519public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, Func<EndpointReference>? endpointSelector, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints 1523var endpoint = endpointSelector() 1868Func<EndpointReference>? endpointSelector, 1875var endpoint = endpointSelector() 1973private static Func<EndpointReference> NamedEndpointSelector<TResource>(IResourceBuilder<TResource> builder, string[] endpointNames, string errorDisplayNoun) 1979EndpointReference? matchingEndpoint = null; 1999private static Func<EndpointReference> DefaultEndpointSelector<TResource>(IResourceBuilder<TResource> builder) 2005EndpointReference? matchingEndpoint = null;
Aspire.Hosting.Azure (6)
AzureBicepResourceExtensions.cs (1)
301public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, EndpointReference value)
AzureProvisioningResourceExtensions.cs (4)
212/// The <see cref="EndpointReference"/> to use for the value of the <see cref="ProvisioningParameter"/>. 220/// This is useful when assigning a <see cref="BicepValue"/> to the value of an Aspire <see cref="EndpointReference"/>. 222public static ProvisioningParameter AsProvisioningParameter(this EndpointReference endpointReference, AzureResourceInfrastructure infrastructure, string parameterName) 246/// This is useful when assigning a <see cref="BicepValue"/> to the value of an Aspire <see cref="EndpointReference"/>.
AzureResourcePreparer.cs (1)
401if (value is string or EndpointReference or ParameterResource or EndpointReferenceExpression or HostUrl)
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationResource.cs (1)
19private EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.AppContainers (1)
ContainerAppContext.cs (1)
530if (value is EndpointReference ep)
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceWebsiteContext.cs (1)
116if (value is EndpointReference ep)
Aspire.Hosting.Azure.CosmosDB (2)
AzureCosmosDBEmulatorConnectionString.cs (1)
11public static ReferenceExpression Create(EndpointReference endpoint, bool isPreviewEmulator) =>
AzureCosmosDBResource.cs (1)
25internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.EventHubs (3)
AzureEventHubsExtensions.cs (2)
263var blobEndpoint = storage.GetEndpoint("blob"); 264var tableEndpoint = storage.GetEndpoint("table");
AzureEventHubsResource.cs (1)
41internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
109var endpoint = resource.GetEndpoint("http"); 195var targetEndpoint = builder.Resource.GetEndpoint(useHttps ? "https" : "http");
Aspire.Hosting.Azure.ServiceBus (2)
AzureServiceBusExtensions.cs (1)
384var sqlEndpoint = sqlEdgeResource.Resource.GetEndpoint("tcp");
AzureServiceBusResource.cs (1)
31internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRResource.cs (1)
18internal 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)
22private EndpointReference EmulatorBlobEndpoint => new(this, "blob"); 23private EndpointReference EmulatorQueueEndpoint => new(this, "queue"); 24private EndpointReference EmulatorTableEndpoint => new(this, "table");
Aspire.Hosting.Azure.Tests (13)
AzureContainerAppsTests.cs (6)
300var httpEp = project.GetEndpoint("http"); 301var httpsEp = project.GetEndpoint("https"); 302var internalEp = project.GetEndpoint("internal"); 377var httpEp = project.GetEndpoint("http"); 378var httpsEp = project.GetEndpoint("https"); 379var 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.Docker (6)
DockerComposeAspireDashboardResource.cs (2)
18public EndpointReference PrimaryEndpoint => new(this, "http"); 23public EndpointReference OtlpGrpcEndpoint => new(this, "otlp-grpc");
DockerComposeEnvironmentContext.cs (1)
133.Where(kvp => kvp.Value is EndpointReference epRef && epRef.Scheme == "https" && kvp.Key.StartsWith("services__"))
DockerComposeInfrastructure.cs (2)
53if (environment.DashboardEnabled && environment.Dashboard?.Resource.OtlpGrpcEndpoint is EndpointReference otlpGrpcEndpoint) 81private 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.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); 32public EndpointReference InternalEndpoint => _internalEndpoint ??= new(this, InternalEndpointName);
Aspire.Hosting.Kubernetes (1)
KubernetesServiceResourceExtensions.cs (1)
22if (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)
249var endpoint = singleInstance.PrimaryEndpoint; 388var endpoint = mySqlInstance.PrimaryEndpoint;
MySqlServerResource.cs (1)
32public 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)
29public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.PostgreSQL (4)
PgWebContainerResource.cs (2)
16private EndpointReference? _primaryEndpoint; 21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
PostgresBuilderExtensions.cs (1)
536var endpoint = postgresInstance.PrimaryEndpoint;
PostgresServerResource.cs (1)
32public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.Qdrant (4)
QdrantServerResource.cs (4)
25private EndpointReference? _primaryEndpoint; 26private EndpointReference? _httpEndpoint; 36public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 41public EndpointReference HttpEndpoint => _httpEndpoint ??= new(this, HttpEndpointName);
Aspire.Hosting.RabbitMQ (1)
RabbitMQServerResource.cs (1)
33public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.Redis (4)
RedisInsightResource.cs (2)
16private EndpointReference? _primaryEndpoint; 21public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
RedisResource.cs (2)
27private EndpointReference? _primaryEndpoint; 32public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
84var endpoint = redis.GetEndpoint("tcp"); 618var 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)
29public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.Testing (3)
DistributedApplicationHostingTestingExtensions.cs (3)
98EndpointReference? endpoint; 125static EndpointReference? GetEndpointOrDefault(IResourceWithEndpoints resourceWithEndpoints, string endpointName) 127var reference = resourceWithEndpoints.GetEndpoint(endpointName);
Aspire.Hosting.Tests (14)
ExpressionResolverTests.cs (3)
196public EndpointReference PrimaryEndpoint { get; } 213EndpointReference Endpoint1 => new(this, "endpoint1"); 214EndpointReference Endpoint2 => new(this, "endpoint2");
ProjectResourceTests.cs (2)
638var http = resource.GetEndpoint("http"); 639var https = resource.GetEndpoint("https");
WithEndpointTests.cs (3)
253var ep0 = container.GetEndpoint("ep0"); 254var ep1 = container.GetEndpoint("ep1"); 255var ep2 = container.GetEndpoint("ep2");
WithEnvironmentTests.cs (4)
232var endpoint = container.GetEndpoint("primary"); 281var endpoint = container.GetEndpoint("primary"); 307var endpoint = container.GetEndpoint("primary"); 440var endpoint = container.GetEndpoint("primary");
WithUrlsTests.cs (2)
323var httpEndpoint = servicea.Resource.GetEndpoint("http"); 357var 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 (7)
ConfigurationBuilder\IYarpConfigurationBuilder.cs (3)
27public YarpCluster AddCluster(EndpointReference endpoint); 68public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, EndpointReference endpoint) 91public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder, string path, EndpointReference endpoint)
ConfigurationBuilder\YarpCluster.cs (3)
26internal YarpCluster(EndpointReference endpoint) 74var httpsEndpoint = resource.GetEndpoint("https"); 75var httpEndpoint = resource.GetEndpoint("http");
ConfigurationBuilder\YarpConfigurationBuilder.cs (1)
27public YarpCluster AddCluster(EndpointReference endpoint)
Aspire.Hosting.Yarp.Tests (6)
YarpClusterTests.cs (4)
19var httpEndpoint = resource.GetEndpoint("testendpoint"); 20var httpsEndpoint = resource.GetEndpoint("anotherendpoint"); 37var httpEndpoint = resource.GetEndpoint("http"); 38var httpsEndpoint = resource.GetEndpoint("https");
YarpFunctionalTests.cs (2)
27private async Task VerifyYarpResource(Action<IResourceBuilder<YarpResource>, EndpointReference> configurator) 51var endpoint = yarp.Resource.GetEndpoint("http");