Esempio n. 1
0
 private static object Resolve(Type type, ILifetimeScope scope = null)
 {
     if (scope == null)
     {
         //no scope specified
         scope = ScopeProvider.Scope();
     }
     return(scope.Resolve(type));
 }
Esempio n. 2
0
 private static T Resolve <T>(string key = "", ILifetimeScope scope = null) where T : class
 {
     if (scope == null)
     {
         //no scope specified
         scope = ScopeProvider.Scope();
     }
     if (string.IsNullOrEmpty(key))
     {
         return(scope.Resolve <T>());
     }
     return(scope.ResolveKeyed <T>(key));
 }