예제 #1
0
 public PostTypeService(
     IPostTypeRepository repo
     )
 {
     repo.CheckArgumentIsNull();
     _repo = repo;
 }
예제 #2
0
        public PostService(IPostRepository repository,
                           IPostTypeRepository postTypeRepository,
                           ILanguageRepository languageRepository,
                           ICategoryRepository categoryRepository,
                           IPostMetaRepository metaRepository,
                           IPostFactory factory,
                           IDateService dateService,
                           IWebsiteInfo websiteInfo
                           )
        {
            repository.CheckArgumentIsNull(nameof(repository));
            _repository = repository;

            postTypeRepository.CheckArgumentIsNull(nameof(postTypeRepository));
            _postTypeRepository = postTypeRepository;

            languageRepository.CheckArgumentIsNull(nameof(languageRepository));
            _languageRepository = languageRepository;

            categoryRepository.CheckArgumentIsNull(nameof(categoryRepository));
            _categoryRepository = categoryRepository;

            metaRepository.CheckArgumentIsNull(nameof(metaRepository));
            _metaRepository = metaRepository;

            factory.CheckArgumentIsNull();
            _factory = factory;

            dateService.CheckArgumentIsNull(nameof(dateService));
            _dateService = dateService;

            websiteInfo.CheckArgumentIsNull(nameof(websiteInfo));
            _websiteInfo = websiteInfo;
        }
 public RepositoryManager(
     IGroupsRepository groupsRepository,
     IPersonsRepository personsRepository,
     IUsersRepository usersRepository,
     IFilesRepository filesRepository,
     ISiteSettingsRepository siteSettingsRepository,
     IRightsRepository rightsRepository,
     IPostsRepository postsRepository,
     IPostSeoSettingsRepository postSeoSettingsRepository,
     IPostSettingRepository postSettingRepository,
     IPostTypeRepository postTypeRepository,
     IGroupTypeRepository groupTypeRepository
     )
 {
     GroupsRepository          = groupsRepository;
     PersonsRepository         = personsRepository;
     UsersRepository           = usersRepository;
     FilesRepository           = filesRepository;
     SiteSettingsRepository    = siteSettingsRepository;
     RightsRepository          = rightsRepository;
     PostsRepository           = postsRepository;
     PostSeoSettingsRepository = postSeoSettingsRepository;
     PostSettingRepository     = postSettingRepository;
     PostTypeRepository        = postTypeRepository;
     GroupTypeRepository       = groupTypeRepository;
 }
예제 #4
0
        /// <summary>
        /// Creates a new api from the currently registered
        /// repositories.
        /// </summary>
        public Api(
            IContentFactory contentFactory,
            IAliasRepository aliasRepository,
            IArchiveRepository archiveRepository,
            IMediaRepository mediaRepository,
            IPageRepository pageRepository,
            IPageTypeRepository pageTypeRepository,
            IParamRepository paramRepository,
            IPostRepository postRepository,
            IPostTypeRepository postTypeRepository,
            ISiteRepository siteRepository,
            ISiteTypeRepository siteTypeRepository,
            ICache cache              = null,
            IStorage storage          = null,
            IImageProcessor processor = null)
        {
            // Store the cache
            _cache = cache;

            // Create services without dependecies
            PageTypes = new PageTypeService(pageTypeRepository, cache);
            Params    = new ParamService(paramRepository, cache);
            PostTypes = new PostTypeService(postTypeRepository, cache);
            Sites     = new SiteService(siteRepository, contentFactory, cache);
            SiteTypes = new SiteTypeService(siteTypeRepository, cache);

            // Create services with dependencies
            Aliases  = new AliasService(aliasRepository, Sites, cache);
            Media    = new MediaService(mediaRepository, Params, storage, processor, cache);
            Pages    = new PageService(pageRepository, contentFactory, Sites, Params, cache);
            Posts    = new PostService(postRepository, contentFactory, Sites, Pages, cache);
            Archives = new ArchiveService(archiveRepository, Params, Posts);
        }
예제 #5
0
 public PostService(IPostRepository postRepository, IUnitOfWork unitOfWork, IDetailUserTypeRepository detailUserTypeRepository, IPostTypeRepository postTypeRepository)
     : base(postRepository, unitOfWork)
 {
     this._repository               = postRepository;
     this._postRepository           = postRepository;
     this._postTypeRepository       = postTypeRepository;
     this._detailUserTypeRepository = detailUserTypeRepository;
 }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="repo">The main repository</param>
        /// <param name="cache">The optional model cache</param>
        public PostTypeService(IPostTypeRepository repo, ICache cache)
        {
            _repo = repo;

            if ((int)App.CacheLevel > 1)
            {
                _cache = cache;
            }
        }
예제 #7
0
 public PostTypeService(IPostTypeRepository repo, ICache cache)
 {
     base();
     this._repo = repo;
     if (App.get_CacheLevel() > 1)
     {
         this._cache = cache;
     }
     return;
 }
예제 #8
0
 public PostTypeService(
     ILogger <IPostTypeRepository> logger,
     IPostTypeRepository postTypeRepository,
     IApiPostTypeRequestModelValidator postTypeModelValidator,
     IBOLPostTypeMapper bolpostTypeMapper,
     IDALPostTypeMapper dalpostTypeMapper)
     : base(logger,
            postTypeRepository,
            postTypeModelValidator,
            bolpostTypeMapper,
            dalpostTypeMapper)
 {
 }
예제 #9
0
 public AbstractPostTypeService(
     ILogger logger,
     IPostTypeRepository postTypeRepository,
     IApiPostTypeRequestModelValidator postTypeModelValidator,
     IBOLPostTypeMapper bolPostTypeMapper,
     IDALPostTypeMapper dalPostTypeMapper)
     : base()
 {
     this.PostTypeRepository     = postTypeRepository;
     this.PostTypeModelValidator = postTypeModelValidator;
     this.BolPostTypeMapper      = bolPostTypeMapper;
     this.DalPostTypeMapper      = dalPostTypeMapper;
     this.logger = logger;
 }
예제 #10
0
        public PostTypeService(
            ILogger <IPostTypeService> logger,
            MediatR.IMediator mediator,
            IPostTypeRepository postTypeRepository,
            IApiPostTypeServerRequestModelValidator postTypeModelValidator,
            IDALPostTypeMapper dalPostTypeMapper,
            IDALPostMapper dalPostMapper)
            : base()
        {
            this.PostTypeRepository     = postTypeRepository;
            this.PostTypeModelValidator = postTypeModelValidator;
            this.DalPostTypeMapper      = dalPostTypeMapper;
            this.DalPostMapper          = dalPostMapper;
            this.logger = logger;

            this.mediator = mediator;
        }
예제 #11
0
 public AbstractApiPostTypeRequestModelValidator(IPostTypeRepository postTypeRepository)
 {
     this.postTypeRepository = postTypeRepository;
 }
예제 #12
0
 public PostTypeService(IPostTypeRepository postTypeRepository, IUnitOfWork unitOfWork) : base(postTypeRepository, unitOfWork)
 {
     this._repository = postTypeRepository;
 }
예제 #13
0
 public Api(IContentFactory contentFactory, IAliasRepository aliasRepository, IArchiveRepository archiveRepository, IMediaRepository mediaRepository, IPageRepository pageRepository, IPageTypeRepository pageTypeRepository, IParamRepository paramRepository, IPostRepository postRepository, IPostTypeRepository postTypeRepository, ISiteRepository siteRepository, ISiteTypeRepository siteTypeRepository, ICache cache = null, IStorage storage = null, IImageProcessor processor = null, ISearch search = null)
 {
     base();
     this._cache = cache;
     this.u003cPageTypesu003ek__BackingField = new PageTypeService(pageTypeRepository, cache);
     this.u003cParamsu003ek__BackingField    = new ParamService(paramRepository, cache);
     this.u003cPostTypesu003ek__BackingField = new PostTypeService(postTypeRepository, cache);
     this.u003cSitesu003ek__BackingField     = new SiteService(siteRepository, contentFactory, cache);
     this.u003cSiteTypesu003ek__BackingField = new SiteTypeService(siteTypeRepository, cache);
     this.u003cAliasesu003ek__BackingField   = new AliasService(aliasRepository, this.get_Sites(), cache);
     this.u003cMediau003ek__BackingField     = new MediaService(mediaRepository, this.get_Params(), storage, processor, cache);
     this.u003cPagesu003ek__BackingField     = new PageService(pageRepository, contentFactory, this.get_Sites(), this.get_Params(), this.get_Media(), cache, search);
     this.u003cPostsu003ek__BackingField     = new PostService(postRepository, contentFactory, this.get_Sites(), this.get_Pages(), this.get_Params(), this.get_Media(), cache, search);
     this.u003cArchivesu003ek__BackingField  = new ArchiveService(archiveRepository, this.get_Params(), this.get_Posts());
     return;
 }
 public ApiPostTypeServerRequestModelValidator(IPostTypeRepository postTypeRepository)
 {
     this.PostTypeRepository = postTypeRepository;
 }
 public ApiPostTypeRequestModelValidator(IPostTypeRepository postTypeRepository)
     : base(postTypeRepository)
 {
 }
예제 #16
0
 public PostTypeServices(IPostTypeRepository dal)
 {
     base._baseDal = dal;
     this._dal     = dal;
 }
예제 #17
0
 public PostsTypesController(IPostTypeRepository postsType)
 {
     _postTypes = postsType;
 }