Exemple #1
0
 public EntityViewModel(PageViewModelContext context, TEntity entity,
                        ContentEntityViewMode mode = ContentEntityViewMode.List)
     : base(context)
 {
     Entity = entity;
     Mode   = mode;
 }
Exemple #2
0
 protected PageViewModel(PageViewModelContext context)
 {
     Site               = context.Site;
     Section            = context.Section;
     PropertiesProvider = context.PropertiesProvider;
     LinkGenerator      = context.LinkGenerator;
 }
 public ContentItemViewModel(PageViewModelContext context, IContentItem entity, int commentsCount,
                             Uri commentsUri,
                             ContentEntityViewMode mode = ContentEntityViewMode.List) :
     base(context, entity, mode)
 {
     CommentsCount = commentsCount;
     CommentsUri   = commentsUri;
 }
Exemple #4
0
 public ListViewModel(PageViewModelContext context, TEntity[] items, int totalItems, int page,
                      int itemsPerPage) :
     base(context)
 {
     Items        = items;
     TotalItems   = totalItems;
     Page         = page;
     ItemsPerPage = itemsPerPage;
 }
 public SearchViewModel(PageViewModelContext context, string query) : base(context)
 {
     Query = query;
 }
Exemple #6
0
 public SectionContentListViewModel(PageViewModelContext context, TSection section, TContent[] items,
                                    int totalItems, int page,
                                    int itemsPerPage) : base(context, items, totalItems, page, itemsPerPage)
 {
     Section = section;
 }
Exemple #7
0
 public ErrorsViewModel(PageViewModelContext context, int errorCode) : base(context)
 {
     ErrorCode = errorCode;
 }