private Tuple <RegisteredObject, Scope> GetRegisteredObjectAndScope(string key) { var registeredObject = RegisteredObjects .FirstOrDefault(o => o.Key == key); if (registeredObject != null) { return(new Tuple <RegisteredObject, Scope>(registeredObject, Scope.Local)); } registeredObject = GlobalRegisteredObjects .FirstOrDefault(o => o.Key == key); if (registeredObject != null) { return(new Tuple <RegisteredObject, Scope>(registeredObject, Scope.Global)); } return(null); }
private Tuple <RegisteredObject, Scope> GetRegisteredObjectAndScope(Type typeToResolve) { var registeredObject = RegisteredObjects .FirstOrDefault(o => o.TypeToResolve == typeToResolve); if (registeredObject != null) { return(new Tuple <RegisteredObject, Scope>(registeredObject, Scope.Local)); } registeredObject = GlobalRegisteredObjects .FirstOrDefault(o => o.TypeToResolve == typeToResolve); if (registeredObject != null) { return(new Tuple <RegisteredObject, Scope>(registeredObject, Scope.Global)); } return(null); }