public static RegisteredController Get(string name, Type type = null)
 {
     if (controllers.ContainsKey(name))
         return controllers[name];
     if (type == null)
         throw new KeyNotFoundException();
     RegisteredController controller = new RegisteredController(type, name);
     controllers.Add(name, controller);
     return controller;
 }
Esempio n. 2
0
        public static RegisteredController Get(string name, Type type = null)
        {
            if (controllers.ContainsKey(name))
            {
                return(controllers[name]);
            }
            if (type == null)
            {
                throw new KeyNotFoundException();
            }
            RegisteredController controller = new RegisteredController(type, name);

            controllers.Add(name, controller);
            return(controller);
        }