BarNapkin.Infrastructure.WebUI.Filters.Errors.RedirectToUrlOnErrorAttribute.Validate C# (CSharp) Method

Validate() protected method

protected Validate ( System.Web.Mvc.ActionExecutedContext filterContext ) : bool
filterContext System.Web.Mvc.ActionExecutedContext
return bool
        protected override bool Validate(ActionExecutedContext filterContext)
        {
            //the url property is always needed
            if( string.IsNullOrEmpty( Url ) || Url.Trim() == string.Empty )
                throw new ArgumentNullException(Resources.Error_RedirectUrlMustHaveValue, new Exception(Resources.Error_UrlIsEmpty));

            //continue execution
            return true;
        }