mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-06-09 10:06:34 +02:00
Make IDependencyCollection constructable. (#6466)
This commit is contained in:
@@ -221,5 +221,21 @@ namespace Robust.Shared.IoC
|
||||
/// </exception>
|
||||
/// <seealso cref="DependencyCollection.BuildGraph"/>
|
||||
void InjectDependencies(object obj, bool oneOff=false);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new, empty dependency collection.
|
||||
/// </summary>
|
||||
public static IDependencyCollection Create()
|
||||
{
|
||||
return new DependencyCollection();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new dependency collection, copying the contents of its parent.
|
||||
/// </summary>
|
||||
public static IDependencyCollection CreateFrom(IDependencyCollection parent)
|
||||
{
|
||||
return new DependencyCollection(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user