/// <summary> /// Clones this instance. /// </summary> /// <returns>Cloned view model</returns> public RenderPageViewModel Clone() { return(new RenderPageViewModel { Id = Id, IsDeleted = IsDeleted, Version = Version, HasSEO = HasSEO, Title = Title, MetaTitle = MetaTitle, IsMasterPage = IsMasterPage, MetaDescription = MetaDescription, MetaKeywords = MetaKeywords, PageUrl = PageUrl, Status = Status, CreatedOn = CreatedOn, CreatedByUser = CreatedByUser, ModifiedOn = ModifiedOn, ModifiedByUser = ModifiedByUser, LayoutPath = LayoutPath, RequireJsPath = RequireJsPath, MainJsPath = MainJsPath, Html5ShivJsPath = Html5ShivJsPath, Bag = Bag, CanManageContent = CanManageContent, AreRegionsEditable = AreRegionsEditable, IsReadOnly = IsReadOnly, HasEditRole = HasEditRole, SaveUnsecured = SaveUnsecured, MasterPage = MasterPage != null?MasterPage.Clone() : null, RenderingPage = RenderingPage != null?RenderingPage.Clone() : null, Contents = Contents != null ? new List <PageContentProjection>(Contents) : null, Regions = Regions != null ? new List <PageRegionViewModel>(Regions) : null, Options = Options != null ? new List <IOptionValue>(Options) : null, Metadata = Metadata != null ? new List <IPageActionProjection>(Metadata) : null, Stylesheets = Stylesheets != null ? new List <IStylesheetAccessor>(Stylesheets) : null, JavaScripts = JavaScripts != null ? new List <IJavaScriptAccessor>(JavaScripts) : null, AccessRules = AccessRules != null ? new List <IAccessRule>(AccessRules) : null }); }
public static string ToApplicationPath(this RenderingPage Page, string RelativePart = null) { return(Page.Request.ToApplicationPath(RelativePart)); }
public DynamicDictionary(RenderingPage page) { this.page = page; }
private void PrepareAndSetModel( RenderingPage page, IHttpRequest request, object dto ) { var hasModel = page as IHasModel; if ( hasModel == null ) return; var model = dto ?? DeserializeHttpRequest( hasModel.ModelType, request, request.ContentType ); hasModel.SetModel( model ); }