public ViewDeathCommand(IEventBus eventBus, ITwitchApiWrapper twitchApiWrapper, IConfigurationManager configurationManager, ILogger logger) { this.eventBus = eventBus; this.twitchApiWrapper = twitchApiWrapper; this.configurationManager = configurationManager; this.logger = logger; }
public TwitchInterfaceWorker(IEventBus bus, ITwitchClientWrapper clientWrapper, ITwitchApiWrapper apiWrapper, ILogger logger, IConfigurationManager configurationManager) { this.bus = bus; this.clientWrapper = clientWrapper; this.apiWrapper = apiWrapper; this.logger = logger.ForContext <TwitchInterfaceWorker>(); this.configurationManager = configurationManager; }
public IncreaseDeathCommand( IEventBus eventBus, IConfigurationManager configurationManager, ITwitchApiWrapper twitchApiWrapper, ILogger logger) { this.eventBus = eventBus; this.configurationManager = configurationManager; this.twitchApiWrapper = twitchApiWrapper; this.logger = logger.ForContext <IncreaseDeathCommand>(); }
public static IMediator Build(ITwitchClient twitchClient = null, ITwitchApiWrapper twitchApiWrapper = null, ITwitchBucketProvider bucketProvider = null, IKeyGenerator keyGenerator = null, IHubContext <ChatWebPageHub, IChatWebPageHub> hubContext = null, IConfiguration configuration = null) { var services = new ServiceCollection(); services.AddMediatR(Assembly.GetAssembly(typeof(MattsChatBotHostedService))); services.AddTransient <TwitchCommandRequestFactory>(); services.AddSingleton <ITwitchClient>(twitchClient ?? new Mock <ITwitchClient>().Object); services.AddSingleton <ITwitchApiWrapper>(twitchApiWrapper ?? new Mock <ITwitchApiWrapper>().Object); services.AddSingleton <ITwitchBucketProvider>(bucketProvider ?? new Mock <ITwitchBucketProvider>().Object); services.AddSingleton <IKeyGenerator>(x => keyGenerator ?? new Mock <IKeyGenerator>().Object); services.AddTransient <IHubContext <ChatWebPageHub, IChatWebPageHub> >(x => hubContext ?? new Mock <IHubContext <ChatWebPageHub, IChatWebPageHub> >().Object); services.Configure <TwitchOptions>(configuration.GetSection("Twitch")); var provider = services.BuildServiceProvider(); return(provider.GetRequiredService <IMediator>()); }
public WorkerHost( IEventBus bus, IList <ITextToSpeechProcessor> textToSpeechProcessors, ITwitchClientWrapper clientWrapper, ITwitchApiWrapper apiWrapper, ILogger logger, IConfigurationManager configurationManager, IPresenceStore presenceStore, IChatCommandResolver chatCommandResolver, ISoundProcessor soundProcessor, IConfigurationPathProvider configurationPathProvider) { this.bus = bus; this.textToSpeechProcessors = textToSpeechProcessors; this.clientWrapper = clientWrapper; this.apiWrapper = apiWrapper; this.logger = logger.ForContext <WorkerHost>(); this.configurationManager = configurationManager; this.presenceStore = presenceStore; this.chatCommandResolver = chatCommandResolver; this.soundProcessor = soundProcessor; this.configurationPathProvider = configurationPathProvider; }
public ShoutOutHandler(ITwitchApiWrapper apiWrapper, ITwitchClient client, ITwitchBucketProvider bucketProvider) { _api = apiWrapper; _client = client; _bucketProvider = bucketProvider; }
public DeleteBirthdayCommand(ITwitchApiWrapper twitchApiWrapper, IConfigurationManager configurationManager, IEventBus eventBus) { this.twitchApiWrapper = twitchApiWrapper; this.configurationManager = configurationManager; this.eventBus = eventBus; }
public TroutHandler(ITwitchClient twitchClient, ITwitchApiWrapper apiWrapper) { _twitchClient = twitchClient; _apiWrapper = apiWrapper; }