예제 #1
0
        public static ActionResult RedirectToLocal([NotNull] this Controller thisValue, string returnUrl, Regex logOffUrlExpression, ControllerActionData defaultUrlData)
        {
            string defaultUrl = defaultUrlData?.CreateUrl(thisValue.Url);

            return(RedirectToLocal(thisValue, returnUrl, logOffUrlExpression, defaultUrl));
        }
예제 #2
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller, AbstractComponent component)
 {
     return(new ComponentConfigResult(component));
 }
예제 #3
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller, object value, string id, object attributes)
 {
     return(new RemoteTreeResult {
         Value = value, Attributes = attributes, NodeID = id
     });
 }
예제 #4
0
 public static void AddErrors(this System.Web.Mvc.Controller controller, string property, string error)
 {
     controller.ModelState.AddModelError(property, error);
 }
예제 #5
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller)
 {
     return(new RemoteTreeResult());
 }
예제 #6
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller, bool accept, string message)
 {
     return(new RemoteTreeResult {
         Accept = accept, RefusalMessage = message
     });
 }
        /// <summary>
        /// Gets an instance of the <see cref="RecaptchaVerificationHelper"/> class that can be used to verify user's response to the recaptcha's challenge.
        /// </summary>
        /// <param name="controller">The <see cref="System.Web.Mvc.Controller"/> object to which the extension method is added to.</param>
        /// <returns>Returns an instance of the <see cref="RecaptchaVerificationHelper"/> class.</returns>
        public static RecaptchaVerificationHelper GetRecaptchaVerificationHelper(this System.Web.Mvc.Controller controller)
        {
            var config = RecaptchaConfigurationManager.GetConfiguration();

            return(new RecaptchaVerificationHelper(config.SecretKey));
        }
예제 #8
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller, string viewName, object model)
 {
     return(new ComponentConfigResult(viewName: viewName, model: model));
 }
예제 #9
0
 // TODO Stuart: Add arguments like Deleporter
 public static void FlashError(this Controller controller, string message)
 {
     FlashMessage(controller, Error, message);
 }
 /// <summary>
 /// Gets an instance of the <see cref="RecaptchaVerificationHelper"/> class that can be used to verify user's response to the recaptcha's challenge.
 /// </summary>
 /// <param name="controller">The <see cref="System.Web.Mvc.Controller"/> object to which the extension method is added to.</param>
 /// <param name="secretKey">The private key required for making the recaptcha verification request.</param>
 /// <returns>Returns an instance of the <see cref="RecaptchaVerificationHelper"/> class.</returns>
 public static RecaptchaVerificationHelper GetRecaptchaVerificationHelper(this System.Web.Mvc.Controller controller, string secretKey)
 {
     return(new RecaptchaVerificationHelper(secretKey));
 }
예제 #11
0
 public static void FlashWarning(this Controller controller, string message)
 {
     FlashMessage(controller, Warning, message);
 }
예제 #12
0
 public static void FlashInfo(this Controller controller, string message)
 {
     FlashMessage(controller, Info, message);
 }
예제 #13
0
 /// <summary>
 /// Gets an instance of the <see cref="RecaptchaVerificationHelper"/> class that can be used to verify user's response to the recaptcha's challenge.
 /// </summary>
 /// <param name="controller">The <see cref="System.Web.Mvc.Controller"/> object to which the extension method is added to.</param>
 /// <returns>Returns an instance of the <see cref="RecaptchaVerificationHelper"/> class.</returns>
 public static RecaptchaVerificationHelper GetRecaptchaVerificationHelper(this System.Web.Mvc.Controller controller)
 {
     return(new RecaptchaVerificationHelper("{recaptchaPrivateKey}"));
 }
예제 #14
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller, IEnumerable <AbstractComponent> components)
 {
     return(new ComponentConfigResult(components));
 }
예제 #15
0
 public static ActionResult ErrorJson(this System.Web.Mvc.Controller controller, string message)
 {
     return(controller.ErrorJson(null, message));
 }
예제 #16
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller)
 {
     return(new ComponentConfigResult());
 }
예제 #17
0
 public static ClientBlockPartialResult ClientBlockPartialView(this System.Web.Mvc.Controller controller, object model, string modelJsName, string blockId)
 {
     return(ClientBlockPartialView(controller, null, model, modelJsName, blockId));
 }
예제 #18
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller, string viewName, object model, ViewDataDictionary viewData, TempDataDictionary tempData)
 {
     return(new ComponentConfigResult(viewName: viewName, model: model, viewData: viewData, tempData: tempData));
 }
예제 #19
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="controller"></param>
 /// <param name="viewName"></param>
 /// <returns></returns>
 public static PartialViewResult PartialExtView(this System.Web.Mvc.Controller controller, string viewName)
 {
     return(PartialExtView(controller, viewName, null /* model */));
 }
예제 #20
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller, bool accept)
 {
     return(new RemoteTreeResult {
         Accept = accept
     });
 }
예제 #21
0
 public static FormPanelResult FormPanel(this System.Web.Mvc.Controller controller)
 {
     return(new FormPanelResult());
 }
예제 #22
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller, object value)
 {
     return(new RemoteTreeResult {
         Value = value
     });
 }
예제 #23
0
 public static FormPanelResult FormPanel(this System.Web.Mvc.Controller controller, ModelStateDictionary modelState)
 {
     return(new FormPanelResult(modelState));
 }
예제 #24
0
 public static void SaveUploadedFiles(this System.Web.Mvc.Controller controller)
 {
 }
예제 #25
0
 public static DirectResult Direct(this System.Web.Mvc.Controller controller)
 {
     return(new DirectResult());
 }
예제 #26
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="controller"></param>
 /// <param name="model"></param>
 /// <returns></returns>
 public static PartialViewResult PartialExtView(this System.Web.Mvc.Controller controller, object model)
 {
     return(PartialExtView(controller, null /* viewName */, model));
 }
예제 #27
0
        public static ActionResult RedirectToLocal([NotNull] this Controller thisValue, string returnUrl, ControllerActionData logOffActionData, ControllerActionData defaultUrlData)
        {
            Regex logOffUrlExpression = logOffActionData == null ? null : UriHelper.CreateBadRedirectExpression(logOffActionData.CreateUrl(thisValue.Url));

            return(RedirectToLocal(thisValue, returnUrl, logOffUrlExpression, defaultUrlData));
        }