Moved extension classes to seperate files as Jimmacle requires.
This commit is contained in:
@@ -15,18 +15,4 @@ namespace Torch.API.Managers
|
||||
/// <returns>manager, or null if none exists</returns>
|
||||
IManager GetManager(Type type);
|
||||
}
|
||||
|
||||
public static class DependencyProviderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the manager that provides the given type. If there is no such manager, returns null.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of manager</typeparam>
|
||||
/// <returns>manager, or null if none exists</returns>
|
||||
public static T GetManager<T>(this IDependencyProvider depProvider) where T : class, IManager
|
||||
{
|
||||
return (T)depProvider.GetManager(typeof(T));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user