public override void Process( SC.Mvc.Pipelines.Response.GetModel.GetModelArgs args) { if (args.Result == null || SC.Mvc.Presentation.RenderingContext.Current == null || SC.Mvc.Presentation.RenderingContext.Current.Rendering == null || string.IsNullOrEmpty( SC.Mvc.Presentation.RenderingContext.Current.Rendering["Parameters"])) { return; } NameValueCollection parameters = SC.Web.WebUtil.ParseUrlParameters( SC.Mvc.Presentation.RenderingContext.Current.Rendering["Parameters"]); foreach (string key in parameters.Keys) { SC.Reflection.ReflectionUtil.SetProperty( args.Result, key, HttpUtility.UrlDecode(parameters[key])); } }
protected override object CreateDefaultModel( SC.Mvc.Presentation.Rendering rendering, SC.Mvc.Pipelines.Response.GetModel.GetModelArgs args) { return(new SC.Sharedsource.Mvc.Presentation.RenderingModel()); }