Exemple #1
0
        private static async Task TypeCatalogSample()
        {
            Console.WriteLine("Type catalog sample");

            var typePluginCatalog = new TypePluginCatalog(typeof(FirstPlugin));
            await typePluginCatalog.Initialize();

            var typePlugin = typePluginCatalog.Get();

            var pluginInstance = (IPlugin)Activator.CreateInstance(typePlugin);

            pluginInstance.Run();
        }
Exemple #2
0
 public Plugin Get(string name, Version version)
 {
     return(_catalog.Get(name, version));
 }