public static RedditWatcher GetInstance() { if (_instance == null) { lock (_instanceLock) if (_instance == null) { _instance = new RedditWatcher(); } } return(_instance); }
static void Main(string[] args) { // Load settings SettingsController.GetInstance(); // Start Telegram client var telegramClient = new TelegramClient(); // Start to watch for reddit var watcher = RedditWatcher.GetInstance(); // Print out news to telegram watcher.OnNewsUpdated += telegramClient.NotifyUsers; watcher.StartWatch(); Console.ReadLine(); }