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)
13716private sealed class CustomChildResource(string name, IResource parent) : Resource(name), IResourceWithParent
Orchestrator\ApplicationOrchestratorTests.cs (2)
2136private sealed class CustomChildResource(string name, IResource parent) : Resource(name), IResourceWithParent 2184: 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
50 references to IResourceWithParent
Aspire.Hosting (22)
ApplicationModel\CustomResourceSnapshot.cs (1)
593if (resource is IResourceWithParent resourceWithParent)
ApplicationModel\IResourceWithParentOfT.cs (1)
17IResource IResourceWithParent.Parent => Parent;
ApplicationModel\ResourceExtensions.cs (9)
92if (resource is IResourceWithParent) 104if (resource is IResourceWithParent child) 130if (resource is IResourceWithParent) 139if (resource is IResourceWithParent child) 1252IResourceWithParent resWithParent => resWithParent.Parent.GetRootResource(), 1554/// <item>Parent resources via <see cref="IResourceWithParent"/></item> 1591/// <item>Parent resources via <see cref="IResourceWithParent"/></item> 1623/// <item>Parent resources via <see cref="IResourceWithParent"/></item> 1829if (resource is IResourceWithParent resourceWithParent)
Ats\AtsTypeMappings.cs (1)
44[assembly: AspireExport(typeof(IResourceWithParent))]
Orchestrator\ApplicationOrchestrator.cs (4)
850foreach (var child in _parentChildLookup[resource].Where(c => c is IResourceWithParent)) 881var parent = resource is IResourceWithParent hasParent 928foreach (var child in children.OfType<IResourceWithConnectionString>().Where(c => c is IResourceWithParent)) 949foreach (var child in children.Where(c => c is IResourceWithParent))
Orchestrator\RelationshipEvaluator.cs (1)
17return model.Resources.OfType<IResourceWithParent>()
ResourceBuilderExtensions.cs (5)
2823if (builder.Resource is IResourceWithParent resourceWithParent && resourceWithParent.Parent == dependency.Resource) 2828if (dependency.Resource is IResourceWithParent dependencyResourceWithParent) 2946if (builder.Resource is IResourceWithParent resourceWithParent && resourceWithParent.Parent == dependency.Resource) 2951if (dependency.Resource is IResourceWithParent dependencyResourceWithParent) 3049if (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)
451if (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)
1755if (resource is IResourceWithParent childResource) 3191.Where(r => r is IResourceWithParent child && ReferenceEquals(child.Parent, resource)) 3534if (referencedResource is IResourceWithParent childResource) 4331if (child is IResourceWithParent { Parent: { } parent } &&
RadiusEnvironmentResource.cs (2)
252var resource = endpointReference.Resource is IResourceWithParent child ? child.Parent : endpointReference.Resource; 291if (resource is IResourceWithParent child)
Aspire.Hosting.Tests (1)
Orchestrator\ApplicationOrchestratorTests.cs (1)
1151var endpointResource = resource is IResourceWithParent child ? child.Parent : resource;