Skip to content

Commit 220f31c

Browse files
committed
Update README.md
1 parent 12c36b1 commit 220f31c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ This library contains these features:
5555
- Gets full paths of plugins (plugin locator).
5656
- It is able to create the instance of the type that implements the contract (a contract previously used by the plugin).
5757
- A logger indicating that the plugin was successfully loaded.
58+
- Integration with the [Microsoft.Extensions.DependencyInjection](https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection) package.
5859

5960
## Limitations
6061

6162
This library contains these limitations:
6263
- The plugin loader is not thread-safe.
6364
- There is no support for unload plugins.
64-
- The subtype that implements the contract must have a constructor without parameters.
6565

6666
## Why did I create this library?
6767

@@ -114,7 +114,7 @@ In your host application you can create two fake providers:
114114
- [FakeInstantMessaging](https://github.com/DentallApp/back-end/blob/dev/src/Infrastructure/Services/FakeInstantMessaging.cs)
115115

116116
Since the host application does not have a direct reference to these plugins, it can load them dynamically.
117-
Therefore, if the host application does not load these two plugins, [it may decide to use a fake provider as a console logger.](https://github.com/DentallApp/back-end/blob/24c2b30761daf10f34d5865c62a1b17827bc22ef/src/HostApplication/PluginStartup.cs#L24-L26)
117+
Therefore, if the host application does not load these two plugins, [it may decide to use a fake provider as a console logger.](https://github.com/DentallApp/back-end/blob/d89dde8c91d6e6d17698f0cc3315137cfa81e662/src/HostApplication/PluginStartup.cs#L17-L19)
118118

119119
Thanks to the plugin-based architecture, you can easily swap modules without having to make any changes to the host application.
120120

@@ -357,6 +357,8 @@ The [TypeFinder](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.TypeFi
357357
See this thread for more information: [Add support for dependency injection via constructor](https://github.com/MrDave1999/CPlugin.Net/issues/32)
358358

359359
**Example:**
360+
361+
The extension method called [AddSubtypesOf](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.CPluginServiceCollectionExtensions.html) must be invoked after loading the plugins.
360362
```cs
361363
var configurationRoot = new ConfigurationBuilder()
362364
.AddJsonFile("./appsettings.json")

0 commit comments

Comments
 (0)