10 interfaces inheriting from IResource
Aspire.Hosting (6)
Aspire.Hosting.Azure (2)
Aspire.Hosting.Dapr (2)
2 implementations of IResource
Aspire.Hosting (1)
Aspire.Hosting.Tests (1)
278 references to IResource
Aspire.Hosting (144)
ApplicationModel\ResourceNotificationService.cs (13)
20private readonly ConcurrentDictionary<(IResource, string), ResourceNotificationState> _resourceNotificationStates = new();
123private async Task WaitUntilHealthyAsync(IResource resource, IResource dependency, CancellationToken cancellationToken)
186private async Task WaitUntilCompletionAsync(IResource resource, IResource dependency, int exitCode, CancellationToken cancellationToken)
238public async Task WaitForDependenciesAsync(IResource resource, CancellationToken cancellationToken)
344public Task PublishUpdateAsync(IResource resource, string resourceId, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory)
394private CustomResourceSnapshot UpdateCommands(IResource resource, CustomResourceSnapshot previousState)
470public async Task PublishUpdateAsync(IResource resource, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory)
479private static CustomResourceSnapshot GetCurrentSnapshot(IResource resource, ResourceNotificationState notificationState)
502private ResourceNotificationState GetResourceNotificationState(IResource resource, string resourceId) =>
520public class ResourceEvent(IResource resource, string resourceId, CustomResourceSnapshot snapshot)
525public IResource Resource { get; } = resource;
Dcp\ApplicationExecutor.cs (23)
37public IResource ModelResource { get; }
42public AppResource(IResource modelResource, CustomResource dcpResource)
63public ServiceAppResource(IResource modelResource, Service service, EndpointAnnotation sba) : base(modelResource, service)
98private readonly Dictionary<string, IResource> _applicationModel = model.Resources.ToDictionary(r => r.Name);
99private readonly ILookup<IResource?, IResourceWithParent> _parentChildLookup = GetParentChildLookup(model);
195private static ILookup<IResource?, IResourceWithParent> GetParentChildLookup(DistributedApplicationModel model)
197static IResource? SelectParentContainerResource(IResource resource) => resource switch
200IResource r when r.IsContainer() => r,
212async Task SetChildResourceAsync(IResource resource, string parentName, string? state, DateTime? startTimeStamp, DateTime? stopTimeStamp)
240static ImmutableArray<HealthReportSnapshot> GetInitialHealthReports(IResource resource)
674IResource? appModelResource = null;
1194private void EnsureRequiredAnnotations(IResource resource)
1202private static void SetInitialResourceState(IResource resource, IAnnotationHolder annotationHolder)
1218async Task CreateResourceExecutablesAsyncCore(IResource resource, IEnumerable<AppResource> executables, CancellationToken cancellationToken)
1285private async Task PublishConnectionStringAvailableEvent(IResource resource, CancellationToken cancellationToken)
1419if (valueProvider is IResource resource)
1454foreach (var container in modelContainerResources)
1517private static DcpInstance GetDcpInstance(IResource resource, int instanceIndex)
1608var modelContainerResource = cr.ModelResource;
1771private static async Task ApplyBuildArgumentsAsync(Container dcpContainerResource, IResource modelContainerResource, CancellationToken cancellationToken)
1848private void AddServicesProducedInfo(IResource modelResource, IAnnotationHolder dcpResource, AppResource appResource)
1942private string GetObjectNameForResource(IResource resource, string suffix = "")
ResourceBuilderExtensions.cs (13)
263public static IResourceBuilder<T> WithManifestPublishingCallback<T>(this IResourceBuilder<T> builder, Action<ManifestPublishingContext> callback) where T : IResource
279public static IResourceBuilder<T> WithManifestPublishingCallback<T>(this IResourceBuilder<T> builder, Func<ManifestPublishingContext, Task> callback) where T : IResource
651public static IResourceBuilder<T> ExcludeFromManifest<T>(this IResourceBuilder<T> builder) where T : IResource
669/// resources, calling <see cref="WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> also results
685public static IResourceBuilder<T> WaitFor<T>(this IResourceBuilder<T> builder, IResourceBuilder<IResource> dependency) where T : IResourceWithWaitSupport
690if (builder.Resource as IResource == dependency.Resource)
740public static IResourceBuilder<T> WaitForCompletion<T>(this IResourceBuilder<T> builder, IResourceBuilder<IResource> dependency, int exitCode = 0) where T : IResourceWithWaitSupport
745if (builder.Resource as IResource == dependency.Resource)
770/// the <see cref="WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource})"/> to associate a resource
796public static IResourceBuilder<T> WithHealthCheck<T>(this IResourceBuilder<T> builder, string key) where T : IResource
994bool isHighlighted = false) where T : IResource
1036IResource resource,
1037string type) where T : IResource
Aspire.Hosting.Azure (12)
Provisioning\Provisioners\AzureProvisioner.cs (10)
46private static List<(IResource Resource, IAzureResource AzureResource)> GetAzureResourcesFromAppModel(DistributedApplicationModel appModel)
53var azureResources = new List<(IResource, IAzureResource)>();
54foreach (var resource in appModel.Resources)
76private ILookup<IResource, IResourceWithParent>? _parentChildLookup;
102static IResource? SelectParentResource(IResource resource) => resource switch
113async Task UpdateStateAsync((IResource Resource, IAzureResource AzureResource) resource, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory)
139async Task AfterProvisionAsync((IResource Resource, IAzureResource AzureResource) resource)
203IList<(IResource Resource, IAzureResource AzureResource)> azureResources,
260private async Task ProcessResourceAsync(IConfiguration configuration, Lazy<Task<ProvisioningContext>> provisioningContextLazy, (IResource Resource, IAzureResource AzureResource) resource, CancellationToken cancellationToken)
Aspire.Hosting.Azure.AppContainers (12)
AzureContainerAppsInfrastructure.cs (12)
43foreach (var r in appModel.Resources)
79private readonly Dictionary<IResource, ContainerAppContext> _containerApps = [];
81public async Task<AzureBicepResource> CreateContainerAppAsync(IResource resource, AzureProvisioningOptions provisioningOptions, DistributedApplicationExecutionContext executionContext, CancellationToken cancellationToken)
93private async Task<ContainerAppContext> ProcessResourceAsync(IResource resource, DistributedApplicationExecutionContext executionContext, CancellationToken cancellationToken)
104private sealed class ContainerAppContext(IResource resource, ContainerAppEnvironmentContext containerAppEnvironmentContext)
121public IResource Resource => resource;
231private static bool TryGetContainerImageName(IResource resource, out string? containerImageName)
966private sealed class ResourceExpression(IResource resource, string propertyExpression) : IManifestExpressionProvider
970public static IManifestExpressionProvider GetContainerImageExpression(IResource p) =>
973public static IManifestExpressionProvider GetContainerPortExpression(IResource p) =>
980private sealed class VolumeStorageExpression(IResource resource, ContainerMountType type, string index) : IManifestExpressionProvider
989public static IManifestExpressionProvider GetVolumeStorage(IResource resource, ContainerMountType type, string index) =>
Aspire.Hosting.Azure.CosmosDB (1)
Aspire.Hosting.Azure.EventHubs (1)
Aspire.Hosting.Azure.Storage (1)
Aspire.Hosting.Azure.Tests (22)
Aspire.Hosting.Containers.Tests (8)
Aspire.Hosting.Dapr (6)
Aspire.Hosting.Kafka.Tests (1)
Aspire.Hosting.Milvus.Tests (2)
Aspire.Hosting.MySql.Tests (4)
Aspire.Hosting.Oracle.Tests (3)
Aspire.Hosting.PostgreSQL (3)
Aspire.Hosting.PostgreSQL.Tests (7)
Aspire.Hosting.Qdrant.Tests (3)
Aspire.Hosting.Redis (1)
Aspire.Hosting.Redis.Tests (2)
Aspire.Hosting.Testing (9)
Aspire.Hosting.Testing.Tests (3)
Aspire.Hosting.Tests (25)
Aspire.Playground.Tests (3)
Stress.AppHost (4)
TestProject.AppHost (1)