1 interface inheriting from IResourceWithEndpoints
Aspire.Hosting (1)
ApplicationModel\IResourceWithServiceDiscovery.cs (1)
11public interface IResourceWithServiceDiscovery : IResourceWithEndpoints
24 implementations of IResourceWithEndpoints
Aspire.Hosting (3)
ApplicationModel\ContainerExecutableResource.cs (1)
13: Resource(name), IResourceWithEnvironment, IResourceWithArgs, IResourceWithEndpoints, IResourceWithWaitSupport
ApplicationModel\ContainerResource.cs (1)
18: Resource(name), IResourceWithEnvironment, IResourceWithArgs, IResourceWithEndpoints, IResourceWithWaitSupport, IResourceWithProbes,
ApplicationModel\ExecutableResource.cs (1)
22public class ExecutableResource : Resource, IResourceWithEnvironment, IResourceWithArgs, IResourceWithEndpoints, IResourceWithWaitSupport, IResourceWithProbes,
Aspire.Hosting.Azure.AIFoundry (1)
AzureAIFoundryResource.cs (1)
16AzureProvisioningResource(name, configureInfrastructure), IResourceWithEndpoints, IResourceWithConnectionString
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationResource.cs (1)
19IResourceWithConnectionString, IResourceWithEndpoints, IAzurePrivateEndpointTarget
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBResource.cs (1)
22IResourceWithEndpoints,
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsResource.cs (1)
18: AzureProvisioningResource(name, configureInfrastructure), IResourceWithConnectionString, IResourceWithEndpoints, IResourceWithAzureFunctionsConfig, IAzurePrivateEndpointTarget
Aspire.Hosting.Azure.KeyVault (1)
AzureKeyVaultResource.cs (1)
18: AzureProvisioningResource(name, configureInfrastructure), IResourceWithEndpoints, IResourceWithConnectionString, IAzureKeyVaultResource, IAzurePrivateEndpointTarget
Aspire.Hosting.Azure.Kusto (1)
AzureKustoClusterResource.cs (1)
18public class AzureKustoClusterResource : AzureProvisioningResource, IResourceWithConnectionString, IResourceWithEndpoints
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresFlexibleServerResource.cs (1)
22: AzureProvisioningResource(name, configureInfrastructure), IResourceWithEndpoints, IResourceWithConnectionString, IAzurePrivateEndpointTarget
Aspire.Hosting.Azure.Redis (1)
AzureRedisCacheResource.cs (1)
19: AzureProvisioningResource(name, configureInfrastructure), IResourceWithEndpoints, IResourceWithConnectionString
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusResource.cs (1)
18: AzureProvisioningResource(name, configureInfrastructure), IResourceWithConnectionString, IResourceWithAzureFunctionsConfig, IResourceWithEndpoints, IAzurePrivateEndpointTarget
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRResource.cs (1)
18: AzureProvisioningResource(name, configureInfrastructure), IResourceWithConnectionString, IResourceWithEndpoints, IAzurePrivateEndpointTarget
Aspire.Hosting.Azure.Storage (1)
AzureStorageResource.cs (1)
16: AzureProvisioningResource(name, configureInfrastructure), IResourceWithEndpoints, IResourceWithAzureFunctionsConfig
Aspire.Hosting.Maui (1)
Otlp\OtlpLoopbackResource.cs (1)
17internal sealed class OtlpLoopbackResource : Resource, IResourceWithEndpoints
Aspire.Hosting.Tests (9)
ApplicationModel\McpServerEndpointAnnotationTests.cs (1)
192private sealed class TestResourceWithEndpoints(string name) : Resource(name), IResourceWithEndpoints
EndpointReferenceTests.cs (1)
416private sealed class TestResource(string name) : Resource(name), IResourceWithEndpoints
ExpressionResolverTests.cs (2)
300sealed class TestExpressionResolverResource : ContainerResource, IResourceWithEndpoints, IResourceWithConnectionString 332public sealed class TestHostResource : Resource, IResourceWithEndpoints
ResourceCommandServiceTests.cs (1)
328private sealed class CustomResource(string name) : Resource(name), IResourceWithEndpoints, IResourceWithWaitSupport
ResourceNotificationTests.cs (1)
725IResourceWithEndpoints
ResourceWithProbeTests.cs (1)
57private sealed class CustomResourceWithProbes(string name) : Resource(name), IResourceWithProbes, IResourceWithEndpoints
WithHttpCommandTests.cs (1)
556private sealed class CustomResource(string name) : Resource(name), IResourceWithEndpoints, IResourceWithWaitSupport
WithUrlsTests.cs (1)
995private sealed class CustomResource(string name) : Resource(name), IResourceWithEndpoints
93 references to IResourceWithEndpoints
Aspire.Hosting (63)
ApplicationModel\EndpointReference.cs (5)
29public IResourceWithEndpoints Resource { get; } 201public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint, NetworkIdentifier? contextNetworkID) 217public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint): this(owner, endpoint, null) 233public EndpointReference(IResourceWithEndpoints owner, string endpointName, NetworkIdentifier? contextNetworkID = null) 248public EndpointReference(IResourceWithEndpoints owner, string endpointName): this(owner, endpointName, null)
ApplicationModel\EndpointReferenceAnnotation.cs (2)
9internal sealed class EndpointReferenceAnnotation(IResourceWithEndpoints resource) : IResourceAnnotation 11public IResourceWithEndpoints Resource { get; } = resource ?? throw new ArgumentNullException(nameof(resource));
ApplicationModel\HostUrl.cs (1)
66.OfType<IResourceWithEndpoints>()
ApplicationModel\McpServerEndpointAnnotation.cs (2)
19public McpServerEndpointAnnotation(Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> endpointUrlResolver) 28public Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> EndpointUrlResolver { get; }
ApplicationModel\ResourceExtensions.cs (8)
664/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 666public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource) 679/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 682public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource, NetworkIdentifier contextNetworkID) 695/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 698public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName) 716/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 720public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName, NetworkIdentifier contextNetworkID)
ApplicationModel\ResourceUrlsCallbackContext.cs (4)
26/// If <see cref="Resource"/> does not implement <see cref="IResourceWithEndpoints"/> then returns <c>null</c>. 32IResourceWithEndpoints resourceWithEndpoints => resourceWithEndpoints.GetEndpoint(name), 38/// If <see cref="Resource"/> does not implement <see cref="IResourceWithEndpoints"/> then returns <c>null</c>. 45IResourceWithEndpoints resourceWithEndpoints => resourceWithEndpoints.GetEndpoint(name, contextNetworkID),
Ats\AtsTypeMappings.cs (1)
31[assembly: AspireExport(typeof(IResourceWithEndpoints))]
Backchannel\AuxiliaryBackchannelRpcTarget.cs (4)
381if (appModel.Resources.SingleOrDefault(r => StringComparers.ResourceName.Equals(r.Name, KnownResourceNames.AspireDashboard)) is not IResourceWithEndpoints dashboardResource) 511if (resource is IResourceWithEndpoints resourceWithEndpoints && 767var resource = appModel.Resources 768.OfType<IResourceWithEndpoints>()
Backchannel\DashboardUrlsHelper.cs (2)
59var dashboardResource = appModel?.Resources.SingleOrDefault( 60r => StringComparers.ResourceName.Equals(r.Name, KnownResourceNames.AspireDashboard)) as IResourceWithEndpoints;
Dashboard\DashboardEventHandlers.cs (3)
378if (@event.Resource is IResourceWithEndpoints resourceWithEndpoints) 643var dashboardResource = (IResourceWithEndpoints)context.Resource;
Dcp\DcpExecutor.cs (2)
2956IResourceWithEndpoints Resource, 2962if (resource is IResourceWithEndpoints rwe && !resource.IsContainer())
Dcp\OtlpEndpointReferenceGatherer.cs (2)
43var dashboardResource = model.Resources.SingleOrDefault(r => StringComparers.ResourceName.Equals(r.Name, KnownResourceNames.AspireDashboard)) as IResourceWithEndpoints;
DistributedApplicationEventingExtensions.cs (1)
66where T : IResourceWithEndpoints
McpServerResourceBuilderExtensions.cs (1)
45where T : IResourceWithEndpoints
Orchestrator\ApplicationOrchestrator.cs (1)
222if (resource.TryGetEndpoints(out var endpoints) && resource is IResourceWithEndpoints resourceWithEndpoints)
ResourceBuilderExtensions.cs (24)
809private static void ApplyEndpoints<T>(this IResourceBuilder<T> builder, IResourceWithEndpoints resourceWithEndpoints, string? endpointName = null, string? name = null) 878public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string endpointName, Action<EndpointAnnotation> callback, bool createIfNotExists = true) where T : IResourceWithEndpoints 930public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, int? port = null, int? targetPort = null, string? scheme = null, [EndpointName] string? name = null, string? env = null, bool isProxied = true, bool? isExternal = null, ProtocolType? protocol = null) where T : IResourceWithEndpoints 954if (env is not null && builder.Resource is IResourceWithEndpoints resourceWithEndpoints and IResourceWithEnvironment) 984public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, int? port, int? targetPort, string? scheme, [EndpointName] string? name, string? env, bool isProxied, bool? isExternal) where T : IResourceWithEndpoints 1003public static IResourceBuilder<T> WithHttpEndpoint<T>(this IResourceBuilder<T> builder, int? port = null, int? targetPort = null, [EndpointName] string? name = null, string? env = null, bool isProxied = true) where T : IResourceWithEndpoints 1024public static IResourceBuilder<T> WithHttpsEndpoint<T>(this IResourceBuilder<T> builder, int? port = null, int? targetPort = null, [EndpointName] string? name = null, string? env = null, bool isProxied = true) where T : IResourceWithEndpoints 1038public static IResourceBuilder<T> WithExternalHttpEndpoints<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints 1067public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name, NetworkIdentifier contextNetworkID) where T : IResourceWithEndpoints 1083public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints 1097public static IResourceBuilder<T> AsHttp2Service<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints 1380where T : IResourceWithEndpoints 1832/// <typeparam name="T">A resource type that implements <see cref="IResourceWithEndpoints" />.</typeparam> 1859public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints 1873/// <typeparam name="T">A resource type that implements <see cref="IResourceWithEndpoints" />.</typeparam> 1899public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, Func<EndpointReference>? endpointSelector, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints 1956/// <typeparam name="T">A resource type that implements <see cref="IResourceWithEndpoints" />.</typeparam> 1983public static IResourceBuilder<T> WithHttpsHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints 2179where TResource : IResourceWithEndpoints 2252where TResource : IResourceWithEndpoints 2651where TResource : IResourceWithEndpoints 2677where TResource : IResourceWithEndpoints 3071where T : IResourceWithEndpoints, IResourceWithProbes 3116where T : IResourceWithEndpoints, IResourceWithProbes
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppEnvironmentResource.cs (1)
247var resource = endpointReference.Resource;
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceEnvironmentResource.cs (1)
394var resource = endpointReference.Resource;
Aspire.Hosting.Containers.Tests (1)
ContainerResourceTests.cs (1)
120context.Args.Add(((IResourceWithEndpoints)context.Resource).GetEndpoint("ep"));
Aspire.Hosting.DevTunnels (5)
DevTunnelResourceBuilderExtensions.cs (5)
246where TResource : IResourceWithEndpoints 268where TResource : IResourceWithEndpoints 350where TResource : IResourceWithEndpoints 427IResourceBuilder<IResourceWithEndpoints> targetResource, IResourceBuilder<DevTunnelResource> tunnelResource) 497var targetResource = targetEndpoint.Resource;
Aspire.Hosting.Docker (1)
DockerComposeEnvironmentResource.cs (1)
193var resource = endpointReference.Resource;
Aspire.Hosting.Docker.Tests (2)
DockerComposePublisherTests.cs (2)
63var resource = (IResourceWithEndpoints)context.Resource;
Aspire.Hosting.Kubernetes (1)
KubernetesEnvironmentResource.cs (1)
107var resource = endpointReference.Resource;
Aspire.Hosting.Orleans (3)
OrleansServiceClientExtensions.cs (1)
24where T : IResourceWithEnvironment, IResourceWithEndpoints
OrleansServiceExtensions.cs (2)
350where T : IResourceWithEnvironment, IResourceWithEndpoints 359where T : IResourceWithEnvironment, IResourceWithEndpoints
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
279var endpoint = ((IResourceWithEndpoints)c.Resource).GetEndpoint("http");
Aspire.Hosting.Testing (2)
DistributedApplicationHostingTestingExtensions.cs (2)
111if (resource is not IResourceWithEndpoints resourceWithEndpoints) 143static EndpointReference? GetEndpointOrDefault(IResourceWithEndpoints resourceWithEndpoints, string endpointName, NetworkIdentifier? networkIdentifier = default)
Aspire.Hosting.Tests (12)
Dashboard\DashboardLifecycleHookTests.cs (2)
138var dashboardResource = (IResourceWithEndpoints)model.Resources.Single(r => string.Equals(r.Name, KnownResourceNames.AspireDashboard, StringComparisons.ResourceName));
Dashboard\DashboardResourceTests.cs (2)
667new() { Url = "http://localhost:5003", Endpoint = ((IResourceWithEndpoints)dashboard).GetEndpoint("http") }, 668new() { Url = "https://localhost:5005", Endpoint = ((IResourceWithEndpoints)dashboard).GetEndpoint("https") }
Dcp\DcpExecutorTests.cs (2)
2230async ValueTask AssertTunneledPort(IResourceWithEndpoints resource, string endpointName, int hostPort) 2274async ValueTask AssertEndpoint(IResourceWithEndpoints resource, string name, NetworkIdentifier network, string address, int port)
DistributedApplicationTests.cs (1)
599if (item is IResourceWithEndpoints resourceWithEndpoints)
EndpointReferenceTests.cs (3)
334var source = CreateResource("caller", sourceKind); 335var destination = CreateResource("destination", destinationKind); 365static IResourceWithEndpoints CreateResource(string name, ResourceKind kind)
ExecutableResourceTests.cs (1)
39context.Args.Add(((IResourceWithEndpoints)context.Resource).GetEndpoint("ep"));
ProjectResourceTests.cs (1)
640context.Args.Add(((IResourceWithEndpoints)context.Resource).GetEndpoint("ep"));