Exemple #1
0
 /// <summary>
 /// Creates a new <see cref="BotRestarter"/>.
 /// </summary>
 /// <param name="logger">The <see cref="ILogger"/> that will be used to log messages to the console.</param>
 /// <param name="consoleReSetterTimer">The <see cref="ConsoleReSetterTimer"/> that will be used.</param>
 /// <param name="botReader">The <see cref="IBotReader"/> that will be used to load all the bots and check for should restart values.</param>
 /// <param name="commands">The <see cref="IConsoleCommands"/> that will be used.</param>
 public BotRestarter(ILogger logger, ConsoleReSetterTimer consoleReSetterTimer, IBotReader botReader, IConsoleCommands commands)
 {
     _logger = logger;
     _consoleReSetterTimer = consoleReSetterTimer;
     _botReader            = botReader;
     _commands             = commands;
 }
Exemple #2
0
        private static void PrintToConsole(IConsoleCommands settings, string displayName)
        {
            Console.WriteLine($"----------{displayName}----------");

            Console.WriteLine("action: " + settings.Action + ", filePath: " + settings.FilePath);
            Console.WriteLine("appkey: {0}, myconn: {1}, custom key: {2}", settings.AppKey, settings.MyConnection,
                              settings.MySectionKey);
            Console.WriteLine("key1: {0}, key2: {1}", settings.MySectionKey1, settings.MySectionKey2);
        }