16 instantiations of EndpointReference
Aspire.Hosting (3)
ApplicationModel\ResourceExtensions.cs (2)
468return endpoints.Select(e => new EndpointReference(resource, e)); 483return new EndpointReference(resource, endpointName);
ResourceBuilderExtensions.cs (1)
562var endpointReference = new EndpointReference(resourceWithEndpoints, annotation);
Aspire.Hosting.Azure.Tests (1)
AzureBicepResourceTests.cs (1)
2073=> new(storage.Resource, new EndpointAnnotation(ProtocolType.Tcp, name: name, targetPort: port));
Aspire.Hosting.Elasticsearch (2)
ElasticsearchResource.cs (2)
39public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 44public EndpointReference InternalEndpoint => _internalEndpoint ??= new(this, InternalEndpointName);
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
36public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.MySql (1)
MySqlServerResource.cs (1)
22PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
22PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.PostgreSQL (1)
PostgresServerResource.cs (1)
27PrimaryEndpoint = 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.SqlServer (1)
SqlServerServerResource.cs (1)
22PrimaryEndpoint = new(this, PrimaryEndpointName);
Aspire.Hosting.Tests (2)
ExpressionResolverTests.cs (2)
124EndpointReference Endpoint1 => new(this, "endpoint1"); 125EndpointReference Endpoint2 => new(this, "endpoint2");
117 references to EndpointReference
Aspire.Hosting (23)
ApplicationModel\EndpointReference.cs (5)
114/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 129/// Creates a new instance of <see cref="EndpointReference"/> with the specified endpoint name. 148public class EndpointReferenceExpression(EndpointReference endpointReference, EndpointProperty property) : IManifestExpressionProvider, IValueProvider, IValueWithReferences 151/// Gets the <see cref="EndpointReference"/>. 153public EndpointReference Endpoint { get; } = endpointReference ?? throw new ArgumentNullException(nameof(endpointReference));
ApplicationModel\ExpressionResolver.cs (3)
19static string EndpointUniqueName(EndpointReference endpointReference) => $"{endpointReference.Resource.Name}/{endpointReference.EndpointName}"; 25async Task<string?> EvalEndpointAsync(EndpointReference endpointReference, EndpointProperty property) 145EndpointReference endpointReference => await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false),
ApplicationModel\ProjectResource.cs (1)
21internal bool ShouldInjectEndpointEnvironment(EndpointReference e)
ApplicationModel\ResourceExtensions.cs (4)
463/// <returns>An enumeration of <see cref="EndpointReference"/> based on the <see cref="EndpointAnnotation"/> annotations from the resources' <see cref="IResource.Annotations"/> collection.</returns> 464public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource) 479/// <returns>An <see cref="EndpointReference"/> object representing the endpoint reference 481public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName)
Dcp\ResourceSnapshotBuilder.cs (1)
170var ep = resourceWithEndpoints.GetEndpoint(endpointName);
ResourceBuilderExtensions.cs (9)
136public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, EndpointReference endpointReference) where T : IResourceWithEnvironment 310foreach (var endpoint in annotation.Resource.GetEndpoints()) 418public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, EndpointReference endpointReference) 562var endpointReference = new EndpointReference(resourceWithEndpoints, annotation); 640/// 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?)"/> or by launch settings (for project resources). 641/// The <see cref="EndpointReference"/> can be used to resolve the address of the endpoint in <see cref="WithEnvironment{T}(IResourceBuilder{T}, Action{EnvironmentCallbackContext})"/>. 646/// <returns>An <see cref="EndpointReference"/> that can be used to resolve the address of the endpoint after resource allocation has occurred.</returns> 647public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints 906var endpoint = builder.Resource.GetEndpoint(endpointName);
Aspire.Hosting.Azure (5)
AzureBicepResourceExtensions.cs (1)
270public static IResourceBuilder<T> WithParameter<T>(this IResourceBuilder<T> builder, string name, EndpointReference value)
AzureProvisioningResourceExtensions.cs (4)
139/// The <see cref="EndpointReference"/> to use for the value of the <see cref="ProvisioningParameter"/>. 147/// This is useful when assigning a <see cref="BicepValue"/> to the value of an Aspire <see cref="EndpointReference"/>. 149public static ProvisioningParameter AsProvisioningParameter(this EndpointReference endpointReference, AzureResourceInfrastructure infrastructure, string parameterName) 173/// This is useful when assigning a <see cref="BicepValue"/> to the value of an Aspire <see cref="EndpointReference"/>.
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
623if (value is EndpointReference ep)
Aspire.Hosting.Azure.CosmosDB (2)
AzureCosmosDBEmulatorConnectionString.cs (1)
11public static ReferenceExpression Create(EndpointReference endpoint, bool isPreviewEmulator) =>
AzureCosmosDBResource.cs (1)
22internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.EventHubs (3)
AzureEventHubsExtensions.cs (2)
184var blobEndpoint = storage.GetEndpoint("blob"); 185var tableEndpoint = storage.GetEndpoint("table");
AzureEventHubsResource.cs (1)
38internal EndpointReference EmulatorEndpoint => new(this, "emulator");
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
110var endpoint = resource.GetEndpoint("http"); 124var http = resource.GetEndpoint("http");
Aspire.Hosting.Azure.ServiceBus (2)
AzureServiceBusExtensions.cs (1)
286var sqlEndpoint = sqlEdgeResource.Resource.GetEndpoint("tcp");
AzureServiceBusResource.cs (1)
25internal 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)
13private static void AppendEndpointExpression(ReferenceExpressionBuilder builder, string key, EndpointReference endpoint) 18public static ReferenceExpression Create(EndpointReference? blobEndpoint = null, EndpointReference? queueEndpoint = null, EndpointReference? tableEndpoint = null)
AzureStorageResource.cs (3)
18private EndpointReference EmulatorBlobEndpoint => new(this, "blob"); 19private EndpointReference EmulatorQueueEndpoint => new(this, "queue"); 20private EndpointReference EmulatorTableEndpoint => new(this, "table");
Aspire.Hosting.Azure.Tests (10)
AzureBicepResourceTests.cs (1)
2072EndpointReference GetEndpointReference(string name, int port)
AzureContainerAppsTests.cs (3)
726var httpEp = project.GetEndpoint("http"); 727var httpsEp = project.GetEndpoint("https"); 728var internalEp = project.GetEndpoint("internal");
AzureCosmosDBExtensionsTests.cs (1)
81var endpoint = cosmos.GetEndpoint("data-explorer");
AzureProvisioningResourceExtensionsTests.cs (1)
22var endpointReference = apiProject.GetEndpoint("https");
src\Aspire.Hosting.Azure.Storage\AzureStorageEmulatorConnectionString.cs (4)
13private static void AppendEndpointExpression(ReferenceExpressionBuilder builder, string key, EndpointReference endpoint) 18public static ReferenceExpression Create(EndpointReference? blobEndpoint = null, EndpointReference? queueEndpoint = null, EndpointReference? tableEndpoint = null)
Aspire.Hosting.Dapr (7)
DaprDistributedApplicationLifecycleHook.cs (7)
165var http = daprCli.GetEndpoint("http"); 166var grpc = daprCli.GetEndpoint("grpc"); 201var grpc = daprCli.GetEndpoint("grpc"); 202var http = daprCli.GetEndpoint("http"); 203var metrics = daprCli.GetEndpoint("metrics"); 211var profiling = daprCli.GetEndpoint("profiling"); 285static (EndpointReference appEndpoint, string protocol)? GetEndpointReference(DaprSidecarOptions? sidecarOptions, IResource resource)
Aspire.Hosting.Elasticsearch (4)
ElasticsearchResource.cs (4)
33private EndpointReference? _primaryEndpoint; 34private EndpointReference? _internalEndpoint; 39public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); 44public EndpointReference InternalEndpoint => _internalEndpoint ??= new(this, InternalEndpointName);
Aspire.Hosting.Garnet (2)
GarnetResource.cs (2)
17private EndpointReference? _primaryEndpoint; 22public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Kafka (5)
KafkaBuilderExtensions.cs (1)
138static void ConfigureKafkaUIContainer(EnvironmentCallbackContext context, EndpointReference endpoint, int index)
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.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)
130var endpoint = singleInstance.PrimaryEndpoint; 154var endpoint = mySqlInstance.PrimaryEndpoint;
MySqlServerResource.cs (1)
29public EndpointReference PrimaryEndpoint { get; }
Aspire.Hosting.Nats (2)
NatsServerResource.cs (2)
19private EndpointReference? _primaryEndpoint; 36public 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)
182var endpoint = postgresInstance.PrimaryEndpoint;
PostgresServerResource.cs (1)
35public 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)
24private EndpointReference? _primaryEndpoint; 29public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Aspire.Hosting.Redis.Tests (2)
RedisFunctionalTests.cs (2)
84var endpoint = redis.GetEndpoint("tcp"); 743var 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)
87EndpointReference? endpoint; 114static EndpointReference? GetEndpointOrDefault(IResourceWithEndpoints resourceWithEndpoints, string endpointName) 116var reference = resourceWithEndpoints.GetEndpoint(endpointName);
Aspire.Hosting.Tests (9)
ExpressionResolverTests.cs (2)
124EndpointReference Endpoint1 => new(this, "endpoint1"); 125EndpointReference Endpoint2 => new(this, "endpoint2");
ProjectResourceTests.cs (2)
624var http = resource.GetEndpoint("http"); 625var https = resource.GetEndpoint("https");
WithEndpointTests.cs (3)
254var ep0 = container.GetEndpoint("ep0"); 255var ep1 = container.GetEndpoint("ep1"); 256var ep2 = container.GetEndpoint("ep2");
WithEnvironmentTests.cs (2)
189var endpoint = container.GetEndpoint("primary"); 225var endpoint = container.GetEndpoint("primary");
Aspire.Hosting.Valkey (2)
ValkeyResource.cs (2)
14private EndpointReference? _primaryEndpoint; 19public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);
Stress.AppHost (1)
ResourceBuilderExtensions.cs (1)
44var endpoint = endpoints.FirstOrDefault(e => string.Equals(e.EndpointName, endpointName, StringComparison.OrdinalIgnoreCase))