weikio / PluginFramework

Everything is a Plugin in .NET
MIT License
556 stars 106 forks source link

Add "Plugin identifier" #2

Open mikoskinen opened 4 years ago

mikoskinen commented 4 years ago

It would be nice to have a way for an assembly/Nuget package to describe the plugin's content.

For example currently we have to use the following syntax:

        var catalog = new NugetPackagePluginCatalog("Serilog", "2.9.0", configureFinder: configure =>
        {
            configure.HasName("Serilog.Log");
        });

In the future we would like to be able to write this:

        var catalog = new NugetPackagePluginCatalog("Serilog", "2.9.0");

So that the Serilog-package could tell the Plugin Framework that Serilog.Log is the type-plugin for this package.

NOTE: It's unlikely but possible that a same plugin package / assembly is used from two or more different apps and for each app the "plugin" is a different thing. The interface for getting the plugin definition should maybe take HostApp's name and HostApp's version as parameters.