static void Main(string[] args) { var mainService = new MainService(); var consoleInfo = ConsoleInfo.GetInstance(); new Thread(o => mainService.Start(100000)).Start(); var counter = 1; while (true) { Console.WriteLine($"{counter}: {DateTime.Now}."); Console.WriteLine($"Sent object count: {consoleInfo.GetSentObjectCount()}."); Console.WriteLine($"db object count: {consoleInfo.GetObjectCount()}."); Console.WriteLine($"\n \n"); counter++; Thread.Sleep(1000); } Console.ReadKey(); }
public MainService() { _redisService = new RedisService(); _consoleInfo = ConsoleInfo.GetInstance(); }