1 interface inheriting from IResourceWithParent
Aspire.Hosting (1)
ApplicationModel\IResourceWithParentOfT.cs (1)
10public interface IResourceWithParent<out T> : IResourceWithParent where T : IResource
9 implementations of IResourceWithParent
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
608private sealed class StorageFiles(AzureStorageResource storage) : Resource("files"), IResourceWithParent, IAzurePrivateEndpointTarget
Aspire.Hosting.Blazor (1)
Resources\BlazorWasmAppResource.cs (1)
20public sealed class BlazorWasmAppResource(string name, string projectPath) : Resource(name), IResourceWithEnvironment, IResourceWithParent
Aspire.Hosting.Tests (4)
Dcp\DcpExecutorTests.cs (1)
12468private sealed class CustomChildResource(string name, IResource parent) : Resource(name), IResourceWithParent
Orchestrator\ApplicationOrchestratorTests.cs (2)
1747private sealed class CustomChildResource(string name, IResource parent) : Resource(name), IResourceWithParent 1795: ResourceWithConnectionString(name), IResourceWithParent
Orchestrator\RelationshipEvaluatorTests.cs (1)
159private sealed class CustomChildResource(string name, IResource parent) : Resource(name), IResourceWithParent
Stress.AppHost (3)
TestResource.cs (3)
211sealed class TestNestedResource(string name, IResource parent) : Resource(name), IResourceWithParent 216sealed class CommandGroupResource(string name, IResource parent) : Resource(name), IResourceWithParent 221sealed class HttpCommandGroupResource(string name, IResource parent) : Resource(name), IResourceWithParent, IResourceWithEndpoints
49 references to IResourceWithParent
Aspire.Hosting (22)
ApplicationModel\CustomResourceSnapshot.cs (1)
588if (resource is IResourceWithParent resourceWithParent)
ApplicationModel\IResourceWithParentOfT.cs (1)
17IResource IResourceWithParent.Parent => Parent;
ApplicationModel\ResourceExtensions.cs (9)
93if (resource is IResourceWithParent) 105if (resource is IResourceWithParent child) 131if (resource is IResourceWithParent) 140if (resource is IResourceWithParent child) 1253IResourceWithParent resWithParent => resWithParent.Parent.GetRootResource(), 1477/// <item>Parent resources via <see cref="IResourceWithParent"/></item> 1514/// <item>Parent resources via <see cref="IResourceWithParent"/></item> 1546/// <item>Parent resources via <see cref="IResourceWithParent"/></item> 1752if (resource is IResourceWithParent resourceWithParent)
Ats\AtsTypeMappings.cs (1)
44[assembly: AspireExport(typeof(IResourceWithParent))]
Orchestrator\ApplicationOrchestrator.cs (4)
748foreach (var child in _parentChildLookup[resource].Where(c => c is IResourceWithParent)) 779var parent = resource is IResourceWithParent hasParent 826foreach (var child in children.OfType<IResourceWithConnectionString>().Where(c => c is IResourceWithParent)) 847foreach (var child in children.Where(c => c is IResourceWithParent))
Orchestrator\RelationshipEvaluator.cs (1)
17return model.Resources.OfType<IResourceWithParent>()
ResourceBuilderExtensions.cs (5)
2830if (builder.Resource is IResourceWithParent resourceWithParent && resourceWithParent.Parent == dependency.Resource) 2835if (dependency.Resource is IResourceWithParent dependencyResourceWithParent) 2953if (builder.Resource is IResourceWithParent resourceWithParent && resourceWithParent.Parent == dependency.Resource) 2958if (dependency.Resource is IResourceWithParent dependencyResourceWithParent) 3056if (builder.Resource is IResourceWithParent resourceWithParent && resourceWithParent.Parent == dependency.Resource)
Aspire.Hosting.Azure (18)
AzureProvisioningController.cs (18)
1084var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 1196var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 1360if (resource is IResourceWithParent resourceWithParent) 1998var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 2121var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 2188var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 2273var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 3806ILookup<IResource, IResourceWithParent> parentChildLookup, 3828var child = childResources[i]; 3830foreach (var grandChild in parentChildLookup[child]) 3846ILookup<IResource, IResourceWithParent> parentChildLookup) 3904var parentChildLookup = model.Resources.OfType<IResourceWithParent>().ToLookup(r => r.Parent); 3917ILookup<IResource, IResourceWithParent> parentChildLookup) 3986ILookup<IResource, IResourceWithParent> parentChildLookup) 4016ILookup<IResource, IResourceWithParent> parentChildLookup, 4039ILookup<IResource, IResourceWithParent> parentChildLookup, 4228ILookup<IResource, IResourceWithParent> parentChildLookup, 4241foreach (var child in children.OfType<IResourceWithConnectionString>().Where(static c => c is IResourceWithParent))
Aspire.Hosting.Azure.Network (1)
AzurePrivateEndpointExtensions.cs (1)
85while (rootResource is IResourceWithParent parentedResource)
Aspire.Hosting.EntityFrameworkCore (1)
EFMigrationResourceBuilderExtensions.cs (1)
452if (current is not IResourceWithParent withParent)
Aspire.Hosting.Foundry.Tests (1)
ToolboxTests.cs (1)
34Assert.IsNotAssignableFrom<IResourceWithParent>(toolbox.Resource);
Aspire.Hosting.Radius (6)
Publishing\RadiusInfrastructureBuilder.cs (4)
1757if (resource is IResourceWithParent childResource) 3193.Where(r => r is IResourceWithParent child && ReferenceEquals(child.Parent, resource)) 3536if (referencedResource is IResourceWithParent childResource) 4333if (child is IResourceWithParent { Parent: { } parent } &&
RadiusEnvironmentResource.cs (2)
251var resource = endpointReference.Resource is IResourceWithParent child ? child.Parent : endpointReference.Resource; 290if (resource is IResourceWithParent child)