Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ Install-Package Weikio.PluginFramework.AspNetCore

Using Plugin Framework can be as easy as adding a single new line into ConfigureServices:

```
```csharp
services.AddPluginFramework<IOperator>(@".\myplugins");
```

The code finds all the plugins (types that implement the custom IOperator-interface) from the myplugins-folder. The plugins can be used in a controller using constructor injection:

```
```csharp
public CalculatorController(IEnumerable<IOperator> operator)
{
_operators = operators;
Expand All @@ -41,7 +41,7 @@ public CalculatorController(IEnumerable<IOperator> operator)

Alternatively, you can provide multiple plugin locations using catalogs:

```
```csharp
var folderPluginCatalog = new FolderPluginCatalog(@".\myplugins", type =>
{
type.Implements<IOperator>();
Expand Down Expand Up @@ -149,4 +149,4 @@ Thanks to the following contributors who have helped with the project:

## License

Plugin Framework is available as an open source, MIT-licensed project.
Plugin Framework is available as an open source, MIT-licensed project.