示例#1
0
        /// <summary>
        /// Creates a new instance of <see cref="DashboardController"/>.
        /// </summary>
        /// <param name="serviceProvider">An instance of <see cref="IServiceProvider"/>.</param>
        /// <param name="dashboardService">An instance of <see cref="IDashboardService"/>.</param>
        /// <param name="tweetService">An instance of <see cref="ITweetService"/>.</param>
        /// <param name="blashDbContext">An instance of <see cref="BlashDbContext"/>.</param>
        /// <param name="twitterApiRuleService">An instance of <see cref="ITwitterApiRuleService"/>.</param>
        /// <param name="logger">An instance of <see cref="ILogger"/>, used to write logs.</param>
        /// <param name="twitterIntegrationJobService">An instance of <see cref="ITwitterIntegrationJobService"/>.</param>
        /// <param name="blashHub">The SignalR chat hub.</param>
        /// <param name="hostApplicationLifetime">An instance of the lifetime, so we can get the cancellation token.</param>
        public DashboardController([NotNull] IServiceProvider serviceProvider, [NotNull] IDashboardService dashboardService,
                                   [NotNull] ITweetService tweetService, [NotNull] BlashDbContext blashDbContext,
                                   [NotNull] ITwitterApiRuleService twitterApiRuleService, [NotNull] ILogger <DashboardController> logger,
                                   [NotNull] ITwitterIntegrationJobService twitterIntegrationJobService, [NotNull] IHubContext <BlashHub> blashHub,
                                   [NotNull] IHostApplicationLifetime hostApplicationLifetime)
        {
            _serviceProvider  = serviceProvider;
            _dashboardService = dashboardService;
            _tweetService     = tweetService;
            _blashDbContext   = blashDbContext;

            _twitterApiRuleService = twitterApiRuleService;
            _logger = logger;
            _twitterIntegrationJobService = twitterIntegrationJobService;
            _blashHub = blashHub;
            _hostApplicationLifetime = hostApplicationLifetime;
        }
示例#2
0
 /// <summary>
 /// Creates a new instance of <see cref="TweetService"/>.
 /// </summary>
 /// <param name="blashDbContext">An instance of <see cref="BlashDbContext"/>.</param>
 /// <param name="logger">An instance of <see cref="ILogger"/>, used to write logs.</param>
 public TweetService(BlashDbContext blashDbContext, ILogger <TweetService> logger) : base(blashDbContext, logger)
 {
 }
示例#3
0
 /// <summary>
 /// Creates a new instance of <see cref="DashboardTweetService"/>.
 /// </summary>
 /// <param name="blashDbContext">An instance of <see cref="BlashDbContext"/>.</param>
 /// <param name="logger">An instance of <see cref="ILogger"/>, used to write logs.</param>
 public DashboardTweetService(BlashDbContext blashDbContext, ILogger <DashboardTweetService> logger) : base(blashDbContext, logger)
 {
 }
示例#4
0
 /// <summary>
 /// Creates a new instance of <see cref="AuthorService"/>.
 /// </summary>
 /// <param name="blashDbContext">An instance of <see cref="BlashDbContext"/>.</param>
 /// <param name="logger">An instance of <see cref="ILogger"/>, used to write logs.</param>
 public AuthorService(BlashDbContext blashDbContext, ILogger <AuthorService> logger) : base(blashDbContext, logger)
 {
 }
示例#5
0
 /// <summary>
 /// Creates a new instance of <see cref="BaseService{TEntity}"/>.
 /// </summary>
 /// <param name="blashDbContext">An instance of <see cref="BlashDbContext"/>.</param>
 /// <param name="logger">An instance of <see cref="ILogger"/>, used to write logs.</param>
 protected BaseService([NotNull] BlashDbContext blashDbContext, [NotNull] ILogger <BaseService <TEntity> > logger)
 {
     _blashDbContext = blashDbContext;
     _logger         = logger;
 }