merken / Prise

A .NET Plugin Framework.
https://merken.github.io/Prise
MIT License
361 stars 39 forks source link

FindPlugin Problem #63

Closed EugeneSu0515 closed 1 year ago

EugeneSu0515 commented 2 years ago

Why don't use PluginTypeName for FindPlugin?

My Situation is there have several implementation plugins within same assembly, so I can't use FindPlugin method to find specific plugin for execute.

I wish that assign PluginTypeName with implementation Type name and FindPlugin method can be implemented find by PluginTypeName as below.

PluginTypeName = implementation.Name, in public virtual Task<IEnumerable<AssemblyScanResult>> Scan(IAssemblyScannerOptions options)

wish be .FirstOrDefault(p => p.PluginTypeName == plugin); or not .FirstOrDefault(p => p.AssemblyPath.Split(Path.DirectorySeparatorChar).Last().Equals(plugin)); in FindPlugin implementation

How about with my recommendation? I wish it can be change in new version. Thanks.

merken commented 1 year ago

Hi Eugene,

Would you please provide a concrete example (repository) so that I can investigate?

Thanks!

EugeneSu0515 commented 1 year ago

I realize that I can implement own AssemblyScanner and PluginLoader and inject my own implements when AddFactory.

So this issue can be resolve by above solution, thanks.

Hi Eugene,

Would you please provide a concrete example (repository) so that I can investigate?

Thanks!