static async Task Main(string[] args) { IConfigurationRoot configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("configuration.json", optional: false, reloadOnChange: true) .Build(); CancellationTokenSource cancelationToken = new CancellationTokenSource(); WargamingApi wargamingApi = new WargamingApi(configuration); var bot = new BotCore(configuration, cancelationToken, wargamingApi); await bot.Start(); }
public BotCore(IConfigurationRoot configuration, CancellationTokenSource cancelationToken, WargamingApi wargamingApi) { _configuration = configuration; _cancellationToken = cancelationToken; _wargamingApi = wargamingApi; }