1 interface inheriting from IResourceWithParent
Aspire.Hosting (1)
ApplicationModel\IResourceWithParentOfT.cs (1)
10public interface IResourceWithParent<out T> : IResourceWithParent where T : IResource
5 implementations of IResourceWithParent
Aspire.Hosting.Tests (4)
Dcp\DcpExecutorTests.cs (1)
1792private sealed class CustomChildResource(string name, IResource parent) : Resource(name), IResourceWithParent
Orchestrator\ApplicationOrchestratorTests.cs (2)
479private sealed class CustomChildResource(string name, IResource parent) : Resource(name), IResourceWithParent 527: ResourceWithConnectionString(name), IResourceWithParent
Orchestrator\RelationshipEvaluatorTests.cs (1)
47private sealed class CustomChildResource(string name, IResource parent) : Resource(name), IResourceWithParent
Stress.AppHost (1)
TestResource.cs (1)
104sealed class TestNestedResource(string name, IResource parent) : Resource(name), IResourceWithParent
21 references to IResourceWithParent
Aspire.Hosting (16)
ApplicationModel\CustomResourceSnapshot.cs (1)
426if (resource is IResourceWithParent resourceWithParent)
ApplicationModel\IResourceWithParentOfT.cs (1)
17IResource IResourceWithParent.Parent => Parent;
ApplicationModel\ResourceExtensions.cs (5)
79if (resource is IResourceWithParent) 91if (resource is IResourceWithParent child) 116if (resource is IResourceWithParent) 125if (resource is IResourceWithParent child) 693IResourceWithParent resWithParent => resWithParent.Parent.GetRootResource(),
Orchestrator\ApplicationOrchestrator.cs (3)
439var parent = resource is IResourceWithParent hasParent 486foreach (var child in children.OfType<IResourceWithConnectionString>().Where(c => c is IResourceWithParent)) 502foreach (var child in children.Where(c => c is IResourceWithParent))
Orchestrator\RelationshipEvaluator.cs (1)
17return model.Resources.OfType<IResourceWithParent>()
ResourceBuilderExtensions.cs (5)
1190if (builder.Resource is IResourceWithParent resourceWithParent && resourceWithParent.Parent == dependency.Resource) 1195if (dependency.Resource is IResourceWithParent dependencyResourceWithParent) 1294if (builder.Resource is IResourceWithParent resourceWithParent && resourceWithParent.Parent == dependency.Resource) 1299if (dependency.Resource is IResourceWithParent dependencyResourceWithParent) 1390if (builder.Resource is IResourceWithParent resourceWithParent && resourceWithParent.Parent == dependency.Resource)
Aspire.Hosting.Azure (5)
Provisioning\Provisioners\AzureProvisioner.cs (5)
29private ILookup<IResource, IResourceWithParent>? _parentChildLookup; 46_parentChildLookup = appModel.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 68var child = childResources[i]; 71foreach (var grandChild in _parentChildLookup[child]) 284foreach (var child in children.OfType<IResourceWithConnectionString>().Where(c => c is IResourceWithParent))