1 interface inheriting from IResourceWithEndpoints
Aspire.Hosting (1)
ApplicationModel\IResourceWithServiceDiscovery.cs (1)
11public interface IResourceWithServiceDiscovery : IResourceWithEndpoints
26 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.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)
19public 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.Foundry (1)
FoundryResource.cs (1)
17AzureProvisioningResource(name, configureInfrastructure), IResourceWithEndpoints, IResourceWithConnectionString
Aspire.Hosting.Maui (1)
Otlp\OtlpLoopbackResource.cs (1)
17internal sealed class OtlpLoopbackResource : Resource, IResourceWithEndpoints
Aspire.Hosting.Tests (11)
ApplicationModel\McpServerEndpointAnnotationTests.cs (1)
193private sealed class TestResourceWithEndpoints(string name) : Resource(name), IResourceWithEndpoints
ConditionalReferenceExpressionTests.cs (2)
98private sealed class TestResourceWithEndpoints(string name) : Resource(name), IResourceWithEndpoints 182private sealed class TestResourceWithEndpoints(string name) : Resource(name), IResourceWithEndpoints
EndpointReferenceTests.cs (1)
417private sealed class TestResource(string name) : Resource(name), IResourceWithEndpoints
ExpressionResolverTests.cs (2)
301sealed class TestExpressionResolverResource : ContainerResource, IResourceWithEndpoints, IResourceWithConnectionString 333public sealed class TestHostResource : Resource, IResourceWithEndpoints
ResourceCommandServiceTests.cs (1)
371private sealed class CustomResource(string name) : Resource(name), IResourceWithEndpoints, IResourceWithWaitSupport
ResourceNotificationTests.cs (1)
726IResourceWithEndpoints
ResourceWithProbeTests.cs (1)
58private sealed class CustomResourceWithProbes(string name) : Resource(name), IResourceWithProbes, IResourceWithEndpoints
WithHttpCommandTests.cs (1)
557private sealed class CustomResource(string name) : Resource(name), IResourceWithEndpoints, IResourceWithWaitSupport
WithUrlsTests.cs (1)
996private sealed class CustomResource(string name) : Resource(name), IResourceWithEndpoints
96 references to IResourceWithEndpoints
Aspire.Hosting (65)
ApplicationModel\EndpointReference.cs (5)
29public IResourceWithEndpoints Resource { get; } 233public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint, NetworkIdentifier? contextNetworkID) 249public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint): this(owner, endpoint, null) 265public EndpointReference(IResourceWithEndpoints owner, string endpointName, NetworkIdentifier? contextNetworkID = null) 280public 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)
688/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 690public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource) 703/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 706public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource, NetworkIdentifier contextNetworkID) 719/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 722public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName) 740/// <param name="resource">The <see cref="IResourceWithEndpoints"/> which contains <see cref="EndpointAnnotation"/> annotations.</param> 744public 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)
35[assembly: AspireExport(typeof(IResourceWithEndpoints))]
Ats\EventingExports.cs (1)
100where T : IResourceWithEndpoints
Backchannel\AuxiliaryBackchannelRpcTarget.cs (4)
381if (appModel.Resources.SingleOrDefault(r => string.Equals(r.Name, KnownResourceNames.AspireDashboard, StringComparisons.ResourceName)) 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 => string.Equals(r.Name, KnownResourceNames.AspireDashboard, StringComparisons.ResourceName)) as IResourceWithEndpoints;
Dashboard\DashboardEventHandlers.cs (3)
379if (@event.Resource is IResourceWithEndpoints resourceWithEndpoints) 680var dashboardResource = (IResourceWithEndpoints)context.Resource;
Dcp\DcpExecutor.cs (2)
3046IResourceWithEndpoints Resource, 3052if (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)
76where T : IResourceWithEndpoints
McpServerResourceBuilderExtensions.cs (1)
46where T : IResourceWithEndpoints
Orchestrator\ApplicationOrchestrator.cs (1)
222if (resource.TryGetEndpoints(out var endpoints) && resource is IResourceWithEndpoints resourceWithEndpoints)
ResourceBuilderExtensions.cs (25)
968private static void ApplyEndpoints<T>(this IResourceBuilder<T> builder, IResourceWithEndpoints resourceWithEndpoints, string? endpointName = null, string? name = null) 1039public static IResourceBuilder<T> WithEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string endpointName, Action<EndpointAnnotation> callback, bool createIfNotExists = true) where T : IResourceWithEndpoints 1090public 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 1114if (env is not null && builder.Resource is IResourceWithEndpoints resourceWithEndpoints and IResourceWithEnvironment) 1146public 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 1165public 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 1186public 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 1200public static IResourceBuilder<T> WithExternalHttpEndpoints<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints 1231public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name, NetworkIdentifier contextNetworkID) where T : IResourceWithEndpoints 1247public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name) where T : IResourceWithEndpoints 1261public static IResourceBuilder<T> AsHttp2Service<T>(this IResourceBuilder<T> builder) where T : IResourceWithEndpoints 1546where T : IResourceWithEndpoints 2005/// <typeparam name="T">A resource type that implements <see cref="IResourceWithEndpoints" />.</typeparam> 2032public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints 2046/// <typeparam name="T">A resource type that implements <see cref="IResourceWithEndpoints" />.</typeparam> 2074public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, Func<EndpointReference>? endpointSelector, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints 2131/// <typeparam name="T">A resource type that implements <see cref="IResourceWithEndpoints" />.</typeparam> 2158public static IResourceBuilder<T> WithHttpsHealthCheck<T>(this IResourceBuilder<T> builder, string? path = null, int? statusCode = null, string? endpointName = null) where T : IResourceWithEndpoints 2356where TResource : IResourceWithEndpoints 2431where TResource : IResourceWithEndpoints 2915where TResource : IResourceWithEndpoints 2941where TResource : IResourceWithEndpoints 3352where T : IResourceWithEndpoints, IResourceWithProbes 3370where T : IResourceWithEndpoints, IResourceWithProbes 3411where 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)
264where TResource : IResourceWithEndpoints 288where TResource : IResourceWithEndpoints 381where TResource : IResourceWithEndpoints 465IResourceBuilder<IResourceWithEndpoints> targetResource, IResourceBuilder<DevTunnelResource> tunnelResource) 535var targetResource = targetEndpoint.Resource;
Aspire.Hosting.Docker (1)
DockerComposeEnvironmentResource.cs (1)
194var resource = endpointReference.Resource;
Aspire.Hosting.Docker.Tests (2)
DockerComposePublisherTests.cs (2)
63var resource = (IResourceWithEndpoints)context.Resource;
Aspire.Hosting.Foundry (1)
Project\ProjectResource.cs (1)
194var resource = endpointReference.Resource;
Aspire.Hosting.Kubernetes (1)
KubernetesEnvironmentResource.cs (1)
113var resource = endpointReference.Resource;
Aspire.Hosting.Orleans (3)
OrleansServiceClientExtensions.cs (1)
25where T : IResourceWithEnvironment, IResourceWithEndpoints
OrleansServiceExtensions.cs (2)
384where T : IResourceWithEnvironment, IResourceWithEndpoints 393where T : IResourceWithEnvironment, IResourceWithEndpoints
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
283var endpoint = ((IResourceWithEndpoints)c.Resource).GetEndpoint("http");
Aspire.Hosting.Testing (2)
DistributedApplicationHostingTestingExtensions.cs (2)
147if (resource is not IResourceWithEndpoints resourceWithEndpoints) 179static EndpointReference? GetEndpointOrDefault(IResourceWithEndpoints resourceWithEndpoints, string endpointName, NetworkIdentifier? networkIdentifier = default)
Aspire.Hosting.Tests (12)
Dashboard\DashboardLifecycleHookTests.cs (2)
141var dashboardResource = (IResourceWithEndpoints)model.Resources.Single(r => string.Equals(r.Name, KnownResourceNames.AspireDashboard, StringComparisons.ResourceName));
Dashboard\DashboardResourceTests.cs (2)
702new() { Url = "http://localhost:5003", Endpoint = ((IResourceWithEndpoints)dashboard).GetEndpoint("http") }, 703new() { Url = "https://localhost:5005", Endpoint = ((IResourceWithEndpoints)dashboard).GetEndpoint("https") }
Dcp\DcpExecutorTests.cs (2)
2264async ValueTask AssertTunneledPort(IResourceWithEndpoints resource, string endpointName, int hostPort) 2308async ValueTask AssertEndpoint(IResourceWithEndpoints resource, string name, NetworkIdentifier network, string address, int port)
DistributedApplicationTests.cs (1)
600if (item is IResourceWithEndpoints resourceWithEndpoints)
EndpointReferenceTests.cs (3)
335var source = CreateResource("caller", sourceKind); 336var destination = CreateResource("destination", destinationKind); 366static IResourceWithEndpoints CreateResource(string name, ResourceKind kind)
ExecutableResourceTests.cs (1)
40context.Args.Add(((IResourceWithEndpoints)context.Resource).GetEndpoint("ep"));
ProjectResourceTests.cs (1)
641context.Args.Add(((IResourceWithEndpoints)context.Resource).GetEndpoint("ep"));