예제 #1
0
 public static void RegisterPresenters()
 {
     Type[] types = Assembly.GetExecutingAssembly().GetTypes();
     foreach (Type type in types)
     {
         if (PresenterForAttribute.GetControllerType(type) != null)
         {
             RegisterPresenter(type);
         }
     }
 }
예제 #2
0
        public static void RegisterPresenter(Type presenterType)
        {
            Type controllerType = PresenterForAttribute.GetControllerType(presenterType);

            if (controllerType == null)
            {
                return;
            }
            IEnumerable <PresenterMethod> presenterMethods = PresenterMethod.GetMethods(presenterType);

            foreach (PresenterMethod presenterMethod in presenterMethods)
            {
                RegisterPresenterMethod(presenterMethod, controllerType);
            }
        }