コード例 #1
0
        private void DisplayAvailablePlugins()
        {
            Console.WriteLine("Available Plugins");
            Console.WriteLine(" ");

            foreach (var plugin in _plugins)
            {
                Console.WriteLine($" Plugin Name: { plugin.Name}");
                var description = typeof(IPluginDescription).IsAssignableFrom(plugin) ? ((IPluginDescription)Activator.CreateInstance(plugin)).Description : "Description missing.";
                Console.WriteLine($" Description: {description}");
                Console.WriteLine(" ");
            }
            _logger.LogAction("Available  plugins listed");
        }