コード例 #1
0
ファイル: PageRepository.cs プロジェクト: voanh/piranha.core
 /// <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;
 }
コード例 #2
0
ファイル: PageRepository.cs プロジェクト: xgenvn/piranha.core
 /// <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;
 }
コード例 #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();
 }
コード例 #4
0
ファイル: PageController.cs プロジェクト: zxbe/piranha.core
 /// <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();
 }
コード例 #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();
 }
コード例 #6
0
 public PageEditService(IApi api, IContentServiceFactory factory)
 {
     _api     = api;
     _service = factory.CreatePageService();
 }
コード例 #7
0
 public PageRepository(ISessionFactory sessionFactory, IContentServiceFactory factory, IMapper mapper) : base(sessionFactory)
 {
     _contentService = factory.CreatePageService();
     _mapper         = mapper;
 }
コード例 #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;
 }