示例#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);
        }