Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Robust.Shared/IoC/IDependencyCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,21 @@ void Register(Type interfaceType, Type implementation, DependencyFactoryDelegate
/// </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);
}
}
}
Loading