public TinkoffService(IConfiguration configuration, TinkoffApiContext context, Microsoft.Extensions.Hosting.IHostedService backgroundService) { _configuration = configuration; _backgroundService = (BackgroundService)backgroundService; _context = context; var mode = GetCurrentMode(); _contextApi = new ContextApi( _configuration["Tinkoff:Sandbox:Token"], _configuration["Tinkoff:Bourse:Token"], mode ); Connection(); }
public HomeController(ILocalHueClient hueClient, ILoggerFactory loggerFactory, Microsoft.Extensions.Hosting.IHostedService backgroundService, IStorageService storageService, IOptionsMonitor <Options> optionsAccessor) { _hueClient = hueClient; _loggerFactory = loggerFactory; _backgroundService = (BackgroundService)backgroundService; _storageService = storageService; _options = optionsAccessor.CurrentValue; }
public WebSocketMiddleware(RequestDelegate next, BufferManager bufferManager, Microsoft.Extensions.Hosting.IHostedService gameServer, ILogger <WebSocketMiddleware> logger) { this.next = next; this.bufferManager = bufferManager; this.logger = logger; this.gameServer = gameServer as GameServer; }