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)); }
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)); }