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)
372private sealed class TestResource(string name) : Resource(name), IResourceWithEndpoints
ExpressionResolverTests.cs (2)
309sealed class TestExpressionResolverResource : ContainerResource, IResourceWithEndpoints, IResourceWithConnectionString 341public 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)
558private sealed class CustomResource(string name) : Resource(name), IResourceWithEndpoints, IResourceWithWaitSupport
WithUrlsTests.cs (1)
995private sealed class CustomResource(string name) : Resource(name), IResourceWithEndpoints
89 references to IResourceWithEndpoints
Aspire.Hosting (59)
ApplicationModel\EndpointReference.cs (5)
29public IResourceWithEndpoints Resource { get; } 199public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint, NetworkIdentifier? contextNetworkID) 215public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint): this(owner, endpoint, null) 231public EndpointReference(IResourceWithEndpoints owner, string endpointName, NetworkIdentifier? contextNetworkID = null) 246public 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)
65.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)
291if (appModel.Resources.SingleOrDefault(r => StringComparers.ResourceName.Equals(r.Name, KnownResourceNames.AspireDashboard)) is not IResourceWithEndpoints dashboardResource) 421if (resource is IResourceWithEndpoints resourceWithEndpoints && 755var resource = appModel.Resources 756.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)
387if (@event.Resource is IResourceWithEndpoints resourceWithEndpoints) 652var dashboardResource = (IResourceWithEndpoints)context.Resource;
Dcp\DcpExecutor.cs (1)
1165var hostResourcesWithEndpoints = _model.Resources.Where(r => r is IResourceWithEndpoints && !r.IsContainer())
DistributedApplicationEventingExtensions.cs (1)
66where T : IResourceWithEndpoints
Orchestrator\ApplicationOrchestrator.cs (1)
222if (resource.TryGetEndpoints(out var endpoints) && resource is IResourceWithEndpoints resourceWithEndpoints)
ResourceBuilderExtensions.cs (24)
789private static void ApplyEndpoints<T>(this IResourceBuilder<T> builder, IResourceWithEndpoints resourceWithEndpoints, string? endpointName = null, string? name = null) 858public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string endpointName, Action<EndpointAnnotation> callback, bool createIfNotExists = true) where T : IResourceWithEndpoints 910public 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 934if (env is not null && builder.Resource is IResourceWithEndpoints resourceWithEndpoints and IResourceWithEnvironment) 964public 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 983public 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 1004public 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 1018public static IResourceBuilder<T> WithExternalHttpEndpoints<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints 1047public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name, NetworkIdentifier contextNetworkID) where T : IResourceWithEndpoints 1063public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints 1077public static IResourceBuilder<T> AsHttp2Service<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints 1360where T : IResourceWithEndpoints 1812/// <typeparam name="T">A resource type that implements <see cref="IResourceWithEndpoints" />.</typeparam> 1839public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints 1853/// <typeparam name="T">A resource type that implements <see cref="IResourceWithEndpoints" />.</typeparam> 1879public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, Func<EndpointReference>? endpointSelector, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints 1936/// <typeparam name="T">A resource type that implements <see cref="IResourceWithEndpoints" />.</typeparam> 1963public static IResourceBuilder<T> WithHttpsHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints 2159where TResource : IResourceWithEndpoints 2232where TResource : IResourceWithEndpoints 2631where TResource : IResourceWithEndpoints 2657where TResource : IResourceWithEndpoints 3051where T : IResourceWithEndpoints, IResourceWithProbes 3096where T : IResourceWithEndpoints, IResourceWithProbes
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppEnvironmentResource.cs (1)
245var resource = endpointReference.Resource;
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceEnvironmentResource.cs (1)
394var resource = endpointReference.Resource;
Aspire.Hosting.Containers.Tests (1)
ContainerResourceTests.cs (1)
126context.Args.Add(((IResourceWithEndpoints)context.Resource).GetEndpoint("ep"));
Aspire.Hosting.DevTunnels (5)
DevTunnelResourceBuilderExtensions.cs (5)
242where TResource : IResourceWithEndpoints 264where TResource : IResourceWithEndpoints 346where TResource : IResourceWithEndpoints 423IResourceBuilder<IResourceWithEndpoints> targetResource, IResourceBuilder<DevTunnelResource> tunnelResource) 474var 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)
668new() { Url = "http://localhost:5003", Endpoint = ((IResourceWithEndpoints)dashboard).GetEndpoint("http") }, 669new() { Url = "https://localhost:5005", Endpoint = ((IResourceWithEndpoints)dashboard).GetEndpoint("https") }
Dcp\DcpExecutorTests.cs (2)
2226async ValueTask AssertTunneledPort(IResourceWithEndpoints resource, string endpointName) 2259async ValueTask AssertEndpoint(IResourceWithEndpoints resource, string name, NetworkIdentifier network, string address, int port)
DistributedApplicationTests.cs (1)
599if (item is IResourceWithEndpoints resourceWithEndpoints)
EndpointReferenceTests.cs (3)
318var source = CreateResource("caller", sourceKind); 319var destination = CreateResource("destination", destinationKind); 351static 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"));