public CategoryCached(Category category) { Id = category.Id; Name = category.Name; NameNormalized = category.NameNormalized; Title = category.Title; IsMaterialsContainer = category.IsMaterialsContainer; SubTitle = category.SubTitle; Icon = category.Icon; Header = category.Header; IsMaterialsNameEditable = category.IsMaterialsNameEditable; MaterialsSubTitleInputType = category.MaterialsSubTitleInputType; MaterialsPreviewGeneratorName = category.MaterialsPreviewGeneratorName; SettingsJson = SunJson.MakeJRow(category.SettingsJson); ParentId = category.ParentId; CacheSettingsId = category.CacheSettingsId; CacheSettings = category.CacheSettings; SortNumber = category.SortNumber; LayoutName = category.LayoutName; IsHidden = category.IsHidden; IsCacheContent = category.IsCacheContent; _subCategories = new List <CategoryCached>(); _allSubCategories = new List <CategoryCached>(); }
public ComponentClientCached(Component component, IReadOnlyDictionary <int, RoleCached> roles) { Id = component.Id; Name = component.Name; Type = component.Type; Settings = SunJson.MakeJRow(component.ClientSettingsJson); Roles = roles; }
public MenuItemCached(MenuItem menuItem, IReadOnlyDictionary <int, RoleCached> roles) { Id = menuItem.Id; ParentId = menuItem.ParentId; Name = menuItem.Name; Title = menuItem.Title; SubTitle = menuItem.SubTitle; RouteName = menuItem.RouteName; Exact = menuItem.Exact; CssClass = menuItem.CssClass; ExternalUrl = menuItem.ExternalUrl; IsSeparator = menuItem.IsSeparator; SortNumber = menuItem.SortNumber; Icon = menuItem.Icon; IsHidden = menuItem.IsHidden; RouteParamsJson = SunJson.MakeJRow(menuItem.RouteParamsJson); SettingsJson = SunJson.MakeJRow(menuItem.SettingsJson); Roles = roles; }