public static void RegisterPresenters() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); foreach (Type type in types) { if (PresenterForAttribute.GetControllerType(type) != null) { RegisterPresenter(type); } } }
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); } }