dapplo/Dapplo.Microsoft.Extensions.Hosting

[Plugin] ordering

Lakritzator opened this issue · 1 comments

Although I agree with David Fowlers comment here: dotnet/extensions#1151 (comment)

Loading assemblies from the file-system will make it hard to maintain an order, so I would introduce an attribute which can be placed on plugins to make it possible to specify an order.

Suggestion: PluginOrderAttribute which can use int or enums (improves readability), and when the plugins are loaded this attribute is used to order the plugins. Plugins without an attribute will get a default order.

Place a [PluginOrder(100)] attribute on the IPlugin implementation to influence the order where the plugin is loaded.