public TableOfContentsViewModel(TableOfContents fromDb, DocsVersion.DocsMode mode) { Mode = mode; this.Key = PrefixHelper.GetCategoryPrefix(fromDb.Category); this.Items = new List <TableOfContentsViewModel>(); this.IsFolder = true; this.Title = fromDb.Category.GetDescription(); this.AddChildren(fromDb.Items); }
public TableOfContentsViewModel(TableOfContents.TableOfContentsItem itemFromDb, DocsVersion.DocsMode mode) { Mode = mode; this.Key = itemFromDb.Key; this.Items = new List <TableOfContentsViewModel>(); this.Title = itemFromDb.Title; this.IsFolder = itemFromDb.IsFolder; this.langs = itemFromDb.Languages; this.AddChildren(itemFromDb.Items); }