예제 #1
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="api">The current api</param>
 /// <param name="db">The current db connection</param>
 /// <param name="factory">The current content service factory</param>
 /// <param name="cache">The optional model cache</param>
 public PostRepository(IApi api, IDb db, IContentServiceFactory factory, ICache cache = null)
 {
     this.db             = db;
     this.api            = api;
     this.contentService = factory.CreatePostService();
     this.cache          = cache;
 }
예제 #2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="api">The current api</param>
 /// <param name="db">The current db connection</param>
 /// <param name="factory">The current content service factory</param>
 /// <param name="cache">The optional model cache</param>
 public PostRepository(IApi api, IDb db, IContentServiceFactory factory, ICache cache = null)
 {
     _db             = db;
     _api            = api;
     _contentService = factory.CreatePostService();
     _cache          = cache;
 }
예제 #3
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="db">The current db connection</param>
 /// <param name="factory">The current content service factory</param>
 public PostRepository(IDb db, IContentServiceFactory factory)
 {
     _db             = db;
     _contentService = factory.CreatePostService();
 }
예제 #4
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="api">The current api</param>
 public PostController(IApi api, PostEditService editService, IContentServiceFactory factory, IHubContext <Hubs.PreviewHub> hub) : base(api)
 {
     this.editService    = editService;
     this.contentService = factory.CreatePostService();
     _hub = hub;
 }
예제 #5
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="api">The current api</param>
 public PostController(IApi api, PostEditService editService, IContentServiceFactory factory) : base(api)
 {
     this.editService    = editService;
     this.contentService = factory.CreatePostService();
 }
예제 #6
0
 public PostEditService(IApi api, IContentServiceFactory factory)
 {
     this.api = api;
     service  = factory.CreatePostService();
 }