Esempio n. 1
0
 public override bool IsRegistered(Type type, string name = null)
 {
     if (WorkUnitScope != null)
     {
         if (string.IsNullOrEmpty(name))
         {
             return(WorkUnitScope.IsRegistered(type));
         }
         else
         {
             return(WorkUnitScope.IsRegisteredWithName(name, type));
         }
     }
     return(base.IsRegistered(type, name));
 }
Esempio n. 2
0
 public override object ResolveOptional(Type type, string name = null)
 {
     if (WorkUnitScope != null)
     {
         if (string.IsNullOrEmpty(name))
         {
             if (WorkUnitScope.IsRegistered(type))
             {
                 return(WorkUnitScope.ResolveOptional(type));
             }
         }
         else
         {
             if (WorkUnitScope.IsRegisteredWithName(name, type))
             {
                 return(WorkUnitScope.ResolveNamed(name, type));
             }
         }
     }
     return(base.Resolve(type, name));
 }