Example #1
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="api">The current api</param>
 /// <param name="db">The current db context</param>
 /// <param name="factory">The content service factory</param>
 /// <param name="cache">The optional model cache</param>
 public PageRepository(IApi api, IDb db, IContentServiceFactory factory, ICache cache = null)
 {
     _api            = api;
     _db             = db;
     _contentService = factory.CreatePageService();
     _cache          = cache;
 }
Example #2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="api">The current api</param>
 /// <param name="db">The current db context</param>
 /// <param name="factory">The content service factory</param>
 /// <param name="cache">The optional model cache</param>
 public PageRepository(IApi api, IDb db, IContentServiceFactory factory, ICache cache = null)
 {
     this.api            = api;
     this.db             = db;
     this.contentService = factory.CreatePageService();
     this.cache          = cache;
 }
Example #3
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="db">The current db context</param>
 /// <param name="factory">The content service factory</param>
 public PageRepository(IDb db, IContentServiceFactory factory)
 {
     _db             = db;
     _contentService = factory.CreatePageService();
 }
Example #4
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="api">The current api</param>
 /// <param name="editService">The current page edit service</param>
 /// <param name="factory">The content service factory</param>
 public PageController(IApi api, PageEditService editService, IContentServiceFactory factory) : base(api)
 {
     this.editService    = editService;
     this.contentService = factory.CreatePageService();
 }
Example #5
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="api">The current api</param>
 /// <param name="factory">The content service factory</param>
 public BlockController(IApi api, IContentServiceFactory factory) : base(api)
 {
     // Block transformation is not dependent on which content
     // type is actually selected, so let's create a page service.
     this.contentService = factory.CreatePageService();
 }
Example #6
0
 public PageEditService(IApi api, IContentServiceFactory factory)
 {
     _api     = api;
     _service = factory.CreatePageService();
 }
Example #7
0
 public PageRepository(ISessionFactory sessionFactory, IContentServiceFactory factory, IMapper mapper) : base(sessionFactory)
 {
     _contentService = factory.CreatePageService();
     _mapper         = mapper;
 }
Example #8
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="api">The current api</param>
 /// <param name="editService">The current page edit service</param>
 /// <param name="factory">The content service factory</param>
 public PageController(IApi api, PageEditService editService, IContentServiceFactory factory, IHubContext <Hubs.PreviewHub> hub) : base(api)
 {
     this.editService    = editService;
     this.contentService = factory.CreatePageService();
     _hub = hub;
 }