Esempio n. 1
0
 public override IEnumerable <object> ResolveAll(Type type)
 {
     if (WorkUnitScope != null)
     {
         var stype = typeof(IEnumerable <>).MakeGenericType(type);
         return((IEnumerable <object>)WorkUnitScope.Resolve(stype));
     }
     return(base.ResolveAll(type));
 }
Esempio n. 2
0
 public override object Resolve(Type type, string name = null)
 {
     if (WorkUnitScope != null)
     {
         if (string.IsNullOrEmpty(name))
         {
             if (WorkUnitScope.IsRegistered(type))
             {
                 return(WorkUnitScope.Resolve(type));
             }
         }
         else
         {
             if (WorkUnitScope.IsRegisteredWithName(name, type))
             {
                 return(WorkUnitScope.ResolveNamed(name, type));
             }
         }
     }
     return(base.Resolve(type, name));
 }