コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PresentationService"/> class.
        /// </summary>
        /// <param name="currentUserProvider">CurrentUserProvider.</param>
        /// <param name="logger">Logger.</param>
        public PresentationService(ICurrentUserProvider currentUserProvider, ILogger logger)
        {
            var connectionString = Configuration.GetConnectionString();

            this.seriesDAO           = new SeriesDAO(connectionString);
            this.userDAO             = new UserDAO(connectionString);
            this.feedService         = new RssFeedService(currentUserProvider, logger);
            this.subscriptionDAO     = new SubscriptionDAO(connectionString);
            this.currentUserProvider = currentUserProvider;
            this.logger = logger.CreateScope(nameof(PresentationService));
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RssFeedUpdaterService"/> class.
        /// </summary>
        /// <param name="logger">Logger.</param>
        public RssFeedUpdaterService(ILogger logger)
        {
            var connectionString = Configuration.GetConnectionString();

            this.logger = logger != null?logger.CreateScope(nameof(RssFeedUpdaterService)) : throw new ArgumentNullException(nameof(logger));

            this.reteOrgRssFeed     = new ReteOrgRssFeed(logger);
            this.feedDAO            = new FeedDAO(connectionString);
            this.seriesCoverService = new SeriesCoverService(logger);
            this.seriesDAO          = new SeriesDAO(connectionString);
            this.subscriptionDAO    = new SubscriptionDAO(connectionString);
        }