From 05f630d0af1ceec7ebfe8a8c170b54819767b316 Mon Sep 17 00:00:00 2001 From: kaylie Date: Tue, 17 Mar 2026 13:00:42 +0100 Subject: [PATCH] Make IDependencyCollection constructable. --- Robust.Shared/IoC/IDependencyCollection.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Robust.Shared/IoC/IDependencyCollection.cs b/Robust.Shared/IoC/IDependencyCollection.cs index 9df466dbd9f..af1d39297e9 100644 --- a/Robust.Shared/IoC/IDependencyCollection.cs +++ b/Robust.Shared/IoC/IDependencyCollection.cs @@ -221,5 +221,21 @@ void Register(Type interfaceType, Type implementation, DependencyFactoryDelegate /// /// void InjectDependencies(object obj, bool oneOff=false); + + /// + /// Creates a new, empty dependency collection. + /// + public static IDependencyCollection Create() + { + return new DependencyCollection(); + } + + /// + /// Creates a new dependency collection, copying the contents of its parent. + /// + public static IDependencyCollection CreateFrom(IDependencyCollection parent) + { + return new DependencyCollection(parent); + } } }