public ChatController(
     ISentimentSnapshotsStorage sentimentSnapshotsStorage,
     IChatMessageStorage chatMessageStorage,
     ILogger <ChatController> logger)
 {
     this.sentimentSnapshotsStorage = sentimentSnapshotsStorage;
     this.chatMessageStorage        = chatMessageStorage;
     this.logger = logger;
 }
示例#2
0
 public ChatService(
     IChatMessageStorage chatMessageStorage,
     INotificationService notificationService,
     ITimeService timeService,
     IUserInfoProvider userInfoProvider)
 {
     _chatMessageStorage  = chatMessageStorage ?? throw new ArgumentNullException(nameof(chatMessageStorage));
     _notificationService = notificationService ?? throw new ArgumentNullException(nameof(notificationService));
     _timeService         = timeService ?? throw new ArgumentNullException(nameof(timeService));
     _userInfoProvider    = userInfoProvider ?? throw new ArgumentNullException(nameof(userInfoProvider));
 }
 public TwitchBotWorker(
     ITwitchCredentialsProvider credentialsProvider,
     IEnumerable <ITwitchCommandHandler> handlers,
     IMessageArchiver messageArchiver,
     IChatMessageStorage chatMessageStorage,
     IMetricsFactory metricsFactory,
     ILogger <TwitchBotWorker> logger)
 {
     this.credentialsProvider = credentialsProvider;
     this.commandHandlers     = handlers.ToDictionary(
         h => h.CommandName,
         h => h);
     this.messageArchiver    = messageArchiver;
     this.chatMessageStorage = chatMessageStorage;
     this.metricsFactory     = metricsFactory;
     this.logger             = logger;
 }
 public KinesisMessageArchiver(
     IAmazonKinesisFirehose firehose,
     IAmazonComprehend comprehend,
     IChatMessageStorage storage,
     IUserIdsStorageManager userIdsStorage,
     ISentimentSnapshotsStorage sentimentSnapshotsStorage,
     IAlertBroadcaster broadcaster,
     ILogger <KinesisMessageArchiver> logger,
     string deliveryStreamName)
 {
     this.firehose                  = firehose;
     this.comprehend                = comprehend;
     this.userIdsStorage            = userIdsStorage;
     this.sentimentSnapshotsStorage = sentimentSnapshotsStorage;
     this.chatMessageStorage        = storage;
     this.broadcaster               = broadcaster;
     this.logger             = logger;
     this.deliveryStreamName = deliveryStreamName;
 }
示例#5
0
 public DiscordBotWorker(
     DiscordSocketClient discordSocketClient,
     IDiscordCredentialProvider credentialProvider,
     IEnumerable <IDiscordCommandHandler> commandHandlers,
     IMessageArchiver messageArchiver,
     IChatMessageStorage chatMessageStorage,
     IMetricsFactory metricsFactory,
     ILogger <DiscordBotWorker> logger)
 {
     this.credentialProvider = credentialProvider;
     this.commandHandlers    = commandHandlers
                               .ToDictionary(
         ch => ch.CommandName,
         ch => ch);
     this.socketClient                  = discordSocketClient;
     this.socketClient.Log             += WebhookClientOnLog;
     this.socketClient.Ready           += WebhookClientOnReady;
     this.socketClient.MessageReceived += WebhookClientOnMessageReceived;
     this.messageArchiver               = messageArchiver;
     this.chatMessageStorage            = chatMessageStorage;
     this.metricsFactory                = metricsFactory;
     this.logger = logger;
 }