public void Configure() { var notFoundAction = new ControllerActionConfig(typeof(PureBehaviorActionInvoker<object, object>)) { PrimaryUrl = ALL_HANDLER_URL, ActionName = "NotFoundHandler", ControllerType = typeof(RedirectToNotFoundUrl), ActionMethod = ReflectionHelper.GetMethod<RedirectToNotFoundUrl>(i => i.Invoke<object, object>(i, null)), ActionDelegate = new Action<object>(i => { }) }; _config.AddControllerActionConfig(notFoundAction); notFoundAction.RemoveAllOtherUrls(); notFoundAction.RemoveAllBehaviors(); notFoundAction.AddBehavior<execute_the_result>(); notFoundAction.AddBehavior<RedirectToNotFoundUrl>(); }
public void Configure() { if (!_conventions.DebugMode()) return; var debugAction = new ControllerActionConfig(typeof(PureBehaviorActionInvoker<object, object>)) { PrimaryUrl = DEBUG_URL, ActionName = DEBUG_URL, ControllerType = typeof(OutputDebugInformation), ActionMethod = ReflectionHelper.GetMethod<OutputDebugInformation>(i => i.Invoke<object, object>(i, null)), ActionDelegate = new Action<object>(i => { }) }; _config.AddControllerActionConfig(debugAction); debugAction.RemoveAllOtherUrls(); debugAction.RemoveAllBehaviors(); debugAction.AddBehavior<execute_the_result>(); debugAction.AddBehavior<OutputDebugInformation>(); }