Пример #1
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);
            }
        }
Пример #2
0
 private static void RegisterPresenterMethod(PresenterMethod presenterMethod, Type controllerType)
 {
     var target = new PresenterTarget(presenterMethod.ViewName, controllerType, presenterMethod.ActionResultType);
     Presenters.TryAdd(target, presenterMethod);
 }
Пример #3
0
        private static void RegisterPresenterMethod(PresenterMethod presenterMethod, Type controllerType)
        {
            var target = new PresenterTarget(presenterMethod.ViewName, controllerType, presenterMethod.ActionResultType);

            Presenters.TryAdd(target, presenterMethod);
        }