public PaymentRepository(ContentfulConfig config,
                          IContentfulClientManager clientManager,
                          IContentfulFactory <ContentfulPayment, Payment> paymentFactory)
 {
     _client         = clientManager.GetClient(config);
     _paymentFactory = paymentFactory;
 }
예제 #2
0
 public ServicePayPaymentRepository(ContentfulConfig config,
                                    IContentfulClientManager clientManager,
                                    IContentfulFactory <ContentfulServicePayPayment, ServicePayPayment> servicePayPaymentFactory)
 {
     _client = clientManager.GetClient(config);
     _servicePayPaymentFactory = servicePayPaymentFactory;
 }
예제 #3
0
 public TopicRepository(ContentfulConfig config, IContentfulClientManager clientManager,
                        IContentfulFactory <ContentfulTopic, Topic> topicFactory,
                        IContentfulFactory <ContentfulTopicForSiteMap, TopicSiteMap> topicSiteMapFactory)
 {
     _client              = clientManager.GetClient(config);
     _topicFactory        = topicFactory;
     _topicSiteMapFactory = topicSiteMapFactory;
 }
 public EventCategoryRepository(ContentfulConfig config, IContentfulFactory <ContentfulEventCategory, EventCategory> contentfulFactory, IContentfulClientManager contentfulClientManager, ICache cache, IConfiguration configuration)
 {
     _contentfulFactory = contentfulFactory;
     _client            = contentfulClientManager.GetClient(config);
     _configuration     = configuration;
     int.TryParse(_configuration["redisExpiryTimes:Events"], out _eventsCategoryTimeout);
     _cache = cache;
 }
예제 #5
0
 public OrganisationRepository(ContentfulConfig config,
                               IContentfulFactory <ContentfulOrganisation, Organisation> contentfulFactory,
                               IContentfulClientManager contentfulClientManager,
                               IGroupRepository groupRepository)
 {
     _contentfulFactory = contentfulFactory;
     _client            = contentfulClientManager.GetClient(config);
     _groupRepository   = groupRepository;
 }
예제 #6
0
 public SectionRepository(ContentfulConfig config,
                          IContentfulFactory <ContentfulSection, Section> SectionBuilder,
                          IContentfulClientManager contentfulClientManager,
                          ITimeProvider timeProvider)
 {
     _dateComparer      = new DateComparer(timeProvider);
     _contentfulFactory = SectionBuilder;
     _client            = contentfulClientManager.GetClient(config);
 }
 public DocumentPageRepository(ContentfulConfig config,
                               IContentfulClientManager contentfulClientManager,
                               ITimeProvider timeProvider,
                               IContentfulFactory <ContentfulDocumentPage, DocumentPage> contentfulFactory,
                               ICache cache)
 {
     _contentfulFactory = contentfulFactory;
     _dateComparer      = new DateComparer(timeProvider);
     _client            = contentfulClientManager.GetClient(config);
     _cache             = cache;
 }
예제 #8
0
        private async Task <BusinessIdToRedirects> GetRedirectForBusinessId(string businessId)
        {
            var config = _createConfig(businessId);

            _client = ClientManager.GetClient(config);
            var builder = new QueryBuilder <ContentfulRedirect>().ContentTypeIs(ContentType).Include(1);
            var entries = await _client.GetEntries(builder);

            return(!entries.Any()
                ? new NullBusinessIdToRedirects()
                : _contenfulFactory.ToModel(entries.FirstOrDefault()));
        }
예제 #9
0
 public NewsRepository(ContentfulConfig config, ITimeProvider timeProvider, IContentfulClientManager contentfulClientManager,
                       IContentfulFactory <ContentfulNews, News> newsContentfulFactory, IContentfulFactory <ContentfulNewsRoom, Newsroom> newsRoomContentfulFactory, ICache cache, IConfiguration configuration)
 {
     _timeProvider              = timeProvider;
     _newsContentfulFactory     = newsContentfulFactory;
     _newsRoomContentfulFactory = newsRoomContentfulFactory;
     _dateComparer              = new DateComparer(timeProvider);
     _client        = contentfulClientManager.GetClient(config);
     _cache         = cache;
     _configuration = configuration;
     int.TryParse(_configuration["redisExpiryTimes:News"], out _newsTimeout);
 }
예제 #10
0
 public AtoZRepository(ContentfulConfig config, IContentfulClientManager clientManager,
                       IContentfulFactory <ContentfulAtoZ, AtoZ> contentfulAtoZFactory,
                       ITimeProvider timeProvider, ICache cache, IConfiguration configuration, ILogger logger)
 {
     _client                = clientManager.GetClient(config);
     _contentfulApiUrl      = config.ContentfulUrl.ToString();
     _contentfulAtoZFactory = contentfulAtoZFactory;
     _dateComparer          = new DateComparer(timeProvider);
     _cache         = cache;
     _configuration = configuration;
     _logger        = logger;
     int.TryParse(_configuration["redisExpiryTimes:AtoZ"], out _atoZTimeout);
 }
 public ShowcaseRepository(ContentfulConfig config,
                           IContentfulFactory <ContentfulShowcase, Showcase> showcaseBuilder,
                           IContentfulClientManager contentfulClientManager,
                           IContentfulFactory <ContentfulNews, News> newsBuilder,
                           EventRepository eventRepository,
                           ILogger <ShowcaseRepository> logger)
 {
     _contentfulFactory = showcaseBuilder;
     _newsFactory       = newsBuilder;
     _client            = contentfulClientManager.GetClient(config);
     _eventRepository   = eventRepository;
     _logger            = logger;
 }
예제 #12
0
 public EventRepository(ContentfulConfig config,
                        IContentfulClientManager contentfulClientManager, ITimeProvider timeProvider,
                        IContentfulFactory <ContentfulEvent, Event> contentfulFactory,
                        IContentfulFactory <ContentfulEventHomepage, EventHomepage> contentfulEventHomepageFactory,
                        ICache cache,
                        ILogger <EventRepository> logger, IConfiguration configuration)
 {
     _contentfulFactory = contentfulFactory;
     _contentfulEventHomepageFactory = contentfulEventHomepageFactory;
     _dateComparer  = new DateComparer(timeProvider);
     _client        = contentfulClientManager.GetClient(config);
     _cache         = cache;
     _logger        = logger;
     _configuration = configuration;
     int.TryParse(_configuration["redisExpiryTimes:Events"], out _eventsTimeout);
     _timeProvider = timeProvider;
 }
예제 #13
0
 public ArticleRepository(ContentfulConfig config,
                          IContentfulClientManager contentfulClientManager,
                          ITimeProvider timeProvider,
                          IContentfulFactory <ContentfulArticle, Article> contentfulFactory,
                          IContentfulFactory <ContentfulArticleForSiteMap, ArticleSiteMap> contentfulFactoryArticle,
                          IVideoRepository videoRepository,
                          ICache cache,
                          IConfiguration configuration)
 {
     _contentfulFactory        = contentfulFactory;
     _dateComparer             = new DateComparer(timeProvider);
     _client                   = contentfulClientManager.GetClient(config);
     _videoRepository          = videoRepository;
     _contentfulFactoryArticle = contentfulFactoryArticle;
     _cache         = cache;
     _configuration = configuration;
     int.TryParse(_configuration["redisExpiryTimes:Articles"], out _articleTimeout);
 }
예제 #14
0
 public GroupRepository(ContentfulConfig config, IContentfulClientManager clientManager,
                        ITimeProvider timeProvider,
                        IContentfulFactory <ContentfulGroup, Group> groupFactory,
                        IContentfulFactory <ContentfulGroupCategory, GroupCategory> groupCategoryFactory,
                        IContentfulFactory <ContentfulGroupHomepage, GroupHomepage> groupHomepageContentfulFactory,
                        EventRepository eventRepository,
                        ICache cache,
                        IConfiguration configuration
                        )
 {
     _dateComparer         = new DateComparer(timeProvider);
     _client               = clientManager.GetClient(config);
     _groupFactory         = groupFactory;
     _groupCategoryFactory = groupCategoryFactory;
     _eventRepository      = eventRepository;
     _cache         = cache;
     _configuration = configuration;
     int.TryParse(_configuration["redisExpiryTimes:Groups"], out _groupsTimeout);
     _groupHomepageContentfulFactory = groupHomepageContentfulFactory;
 }
 public ProfileRepository(ContentfulConfig config, IContentfulClientManager clientManager,
                          IContentfulFactory <ContentfulProfile, Profile> profileFactory)
 {
     _client         = clientManager.GetClient(config);
     _profileFactory = profileFactory;
 }
예제 #16
0
 public CommsRepository(ContentfulConfig config, IContentfulClientManager clientManager, IContentfulFactory <ContentfulCommsHomepage, CommsHomepage> commsHomepageFactory)
 {
     _client = clientManager.GetClient(config);
     _commsHomepageFactory = commsHomepageFactory;
 }
 public ContactUsAreaRepository(ContentfulConfig config, IContentfulClientManager clientManager, IContentfulFactory <ContentfulContactUsArea, ContactUsArea> contentfulFactory)
 {
     _client            = clientManager.GetClient(config);
     _contentfulFactory = contentfulFactory;
 }
 public StartPageRepository(ContentfulConfig config, IContentfulClientManager contentfulClientManager, IContentfulFactory <ContentfulStartPage, StartPage> contentfulFactory, ITimeProvider timeProvider)
 {
     _contentfulFactory = contentfulFactory;
     _client            = contentfulClientManager.GetClient(config);
     _dateComparer      = new DateComparer(timeProvider);
 }
 public ContactUsIdRepository(ContentfulConfig config, IContentfulFactory <ContentfulContactUsId, ContactUsId> contentfulFactory, IContentfulClientManager contentfulClientManager)
 {
     _contentfulFactory = contentfulFactory;
     _client            = contentfulClientManager.GetClient(config);
 }
예제 #20
0
 public GroupCategoryRepository(ContentfulConfig config, IContentfulFactory <ContentfulGroupCategory, GroupCategory> contentfulFactory, IContentfulClientManager contentfulClientManager)
 {
     _contentfulFactory = contentfulFactory;
     _client            = contentfulClientManager.GetClient(config);
 }
예제 #21
0
 public HomepageRepository(ContentfulConfig config, IContentfulClientManager clientManager, IContentfulFactory <ContentfulHomepage, Homepage> homepageFactory)
 {
     _client          = clientManager.GetClient(config);
     _homepageFactory = homepageFactory;
 }
 public PrivacyNoticeRepository(ContentfulConfig config, IContentfulFactory <ContentfulPrivacyNotice, PrivacyNotice> contentfulFactory,
                                IContentfulClientManager contentfulClientManager)
 {
     _contentfulFactory = contentfulFactory;
     _client            = contentfulClientManager.GetClient(config);
 }
예제 #23
0
 public AssetRepository(ContentfulConfig config, IContentfulClientManager contentfulClientManager, ILogger <AssetRepository> logger)
 {
     _logger = logger;
     _client = contentfulClientManager.GetClient(config);
 }
 public FooterRepository(ContentfulConfig config, IContentfulClientManager clientManager, IContentfulFactory <ContentfulFooter, Footer> contentfulFactory)
 {
     _client            = clientManager.GetClient(config);
     _contentfulFactory = contentfulFactory;
 }
예제 #25
0
 public GroupAdvisorRepository(ContentfulConfig config, IContentfulClientManager contentfulClientManager, IContentfulFactory <ContentfulGroupAdvisor, GroupAdvisor> contentfulFactory)
 {
     _client            = contentfulClientManager.GetClient(config);
     _contentfulFactory = contentfulFactory;
 }