Exemplo n.º 1
0
 public ChatController(
     ISentimentSnapshotsStorage sentimentSnapshotsStorage,
     IChatMessageStorage chatMessageStorage,
     ILogger <ChatController> logger)
 {
     this.sentimentSnapshotsStorage = sentimentSnapshotsStorage;
     this.chatMessageStorage        = chatMessageStorage;
     this.logger = logger;
 }
Exemplo n.º 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));
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 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;
 }