Пример #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Starting the main application");

            string pluginFolder = @"..\..\..\Plugins\";
            var app = new MainApplication(pluginFolder);

            Console.WriteLine($"{app.IpCheckerList.Count} plugin(s) loaded..");
            Console.WriteLine("Executing all plugins...");

            foreach (var ipChecker in app.IpCheckerList)
            {
                Console.WriteLine(ObfuscateIP(ipChecker.GetExternalIp()));
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Starting the main application");

            _pluginWatcher = new FileSystemWatcher(_pluginFolder);
            _pluginWatcher.Created += PluginWatcher_FolderUpdated;
            _pluginWatcher.Deleted += PluginWatcher_FolderUpdated;
            _pluginWatcher.EnableRaisingEvents = true;

            _app = new MainApplication(_pluginFolder);

            PrintPluginInfo();

            foreach (var ipChecker in _app.Plugins)
            {
                Console.WriteLine(ipChecker.Value.GetExternalIp());
            }

            Console.ReadLine();
        }