Skip to content

Commit e0be4bc

Browse files
authored
docs: update username
1 parent 3e3c8f9 commit e0be4bc

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
[![CopyPluginsToPublishDirectory](https://img.shields.io/nuget/vpre/CopyPluginsToPublishDirectory?label=CopyPluginsToPublishDirectory%20-%20nuget&color=red)](https://www.nuget.org/packages/CopyPluginsToPublishDirectory)
1010
[![downloads](https://img.shields.io/nuget/dt/CopyPluginsToPublishDirectory?color=yellow)](https://www.nuget.org/packages/CopyPluginsToPublishDirectory)
1111

12-
[![CPlugin.Net-logo](https://raw.githubusercontent.com/MrDave1999/CPlugin.Net/bd7e7c8787e5a1b4987cd5a506e680261dce19b0/plugin-logo.png)](https://github.com/MrDave1999/CPlugin.Net)
12+
[![CPlugin.Net-logo](https://raw.githubusercontent.com/DevD4v3/CPlugin.Net/bd7e7c8787e5a1b4987cd5a506e680261dce19b0/plugin-logo.png)](https://github.com/DevD4v3/CPlugin.Net)
1313

1414
A simple library that helps to implement a plugin-based architecture.
1515

1616
The purpose of this library is to provide a way to load plugins from a configuration file such as settings.json or .env, to facilitate the exchange of dependencies without having to make changes to the host application.
1717

18-
See the [API documentation](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.html) for more information on this project.
18+
See the [API documentation](https://DevD4v3.github.io/CPlugin.Net/api/CPlugin.Net.html) for more information on this project.
1919

2020
## Index
2121

@@ -134,7 +134,7 @@ When implementing this pattern in .NET there can be a number of technical challe
134134

135135
- Ideally, plugins should not depend on each other (reduce coupling), but in such cases a mechanism must be found that allows them to communicate with each other (e.g. a message broker).
136136

137-
- There are cases where the host application and the plugins have a reference to the same version of a dependency, so in their output directories they will have a copy of the same dependency. This may cause unexpected behavior when running the host application. See this [thread](https://stackoverflow.com/q/75435015) or [this one too](https://github.com/MrDave1999/CPlugin.Net/issues/27).
137+
- There are cases where the host application and the plugins have a reference to the same version of a dependency, so in their output directories they will have a copy of the same dependency. This may cause unexpected behavior when running the host application. See this [thread](https://stackoverflow.com/q/75435015) or [this one too](https://github.com/DevD4v3/CPlugin.Net/issues/27).
138138

139139
To correctly implement this pattern in .NET, it is necessary to know how `AssemblyLoadContext` works. This [article](https://tsuyoshiushio.medium.com/understand-advanced-assemblyloadcontext-with-c-16a9d0cfeae3) explains it very well.
140140

@@ -150,7 +150,7 @@ You must also install this secondary package that will be used in your plugins:
150150
```sh
151151
dotnet add package CPlugin.Net.Attributes
152152
```
153-
This package provides only one type: [PluginAttribute](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.PluginAttribute.html) and is used only in plugins.
153+
This package provides only one type: [PluginAttribute](https://DevD4v3.github.io/CPlugin.Net/api/CPlugin.Net.PluginAttribute.html) and is used only in plugins.
154154

155155
## Overview
156156

@@ -167,7 +167,7 @@ This library provides four main types:
167167
- `PluginLoader`
168168
- `TypeFinder`
169169

170-
See the [API documentation](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.html) for more information on these types.
170+
See the [API documentation](https://DevD4v3.github.io/CPlugin.Net/api/CPlugin.Net.html) for more information on these types.
171171

172172
### Get plugin names from .json file
173173

@@ -348,17 +348,17 @@ foreach(ICommand command in commands)
348348
```
349349
`FindSubtypesOf` method will search for the subtypes of `ICommand` in each plugin that has been loaded; if no subtype is found, it returns an empty enumerable.
350350

351-
For this method to work correctly, each plugin must use the [PluginAttribute](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.PluginAttribute.html) type to specify the subtypes. This is mandatory because the `TypeFinder` type creates the instances of the subtypes using this attribute.
351+
For this method to work correctly, each plugin must use the [PluginAttribute](https://DevD4v3.github.io/CPlugin.Net/api/CPlugin.Net.PluginAttribute.html) type to specify the subtypes. This is mandatory because the `TypeFinder` type creates the instances of the subtypes using this attribute.
352352

353353
### Integration with Microsoft.Extensions.DependencyInjection
354354

355-
The [TypeFinder](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.TypeFinder.html) type is limited: it does not support dependency injection via constructor. So if the implementation of `ICommand` has a constructor with dependencies you will get a runtime exception that the subtype does not have a parameterless constructor.
355+
The [TypeFinder](https://DevD4v3.github.io/CPlugin.Net/api/CPlugin.Net.TypeFinder.html) type is limited: it does not support dependency injection via constructor. So if the implementation of `ICommand` has a constructor with dependencies you will get a runtime exception that the subtype does not have a parameterless constructor.
356356

357-
See this thread for more information: [Add support for dependency injection via constructor](https://github.com/MrDave1999/CPlugin.Net/issues/32)
357+
See this thread for more information: [Add support for dependency injection via constructor](https://github.com/DevD4v3/CPlugin.Net/issues/32)
358358

359359
**Example:**
360360

361-
The extension method called [AddSubtypesOf](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.CPluginServiceCollectionExtensions.html) must be invoked after loading the plugins.
361+
The extension method called [AddSubtypesOf](https://DevD4v3.github.io/CPlugin.Net/api/CPlugin.Net.CPluginServiceCollectionExtensions.html) must be invoked after loading the plugins.
362362
```cs
363363
var configurationRoot = new ConfigurationBuilder()
364364
.AddJsonFile("./appsettings.json")
@@ -379,7 +379,7 @@ foreach(ICommand command in commands)
379379

380380
### Apply PluginAttribute type to plugins
381381

382-
This attribute must be applied at the assembly level in the plugin project. Do not forget to install the [CPlugin.Net.Attributes](https://www.nuget.org/packages/CPlugin.Net.Attributes) package in the plugin project in order to be able to use the [PluginAttribute](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.PluginAttribute.html) type.
382+
This attribute must be applied at the assembly level in the plugin project. Do not forget to install the [CPlugin.Net.Attributes](https://www.nuget.org/packages/CPlugin.Net.Attributes) package in the plugin project in order to be able to use the [PluginAttribute](https://DevD4v3.github.io/CPlugin.Net/api/CPlugin.Net.PluginAttribute.html) type.
383383

384384
**Example:**
385385
```cs
@@ -530,7 +530,7 @@ These are the contracts shared between the host application and the plugins and
530530

531531
`<ExcludeAssets>runtime</ExcludeAssets>`. This setting has the same effect as `<Private>false</Private>` but works on package references that the Contracts project or one of its dependencies may include.
532532

533-
The `Contracts.dll` assembly must only be copied to the output directory of the host application; otherwise, the [FindSubtypesOf](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.TypeFinder.html) method will always return an empty enumerable.
533+
The `Contracts.dll` assembly must only be copied to the output directory of the host application; otherwise, the [FindSubtypesOf](https://DevD4v3.github.io/CPlugin.Net/api/CPlugin.Net.TypeFinder.html) method will always return an empty enumerable.
534534

535535
```xml
536536
<PackageReference Include="CPlugin.Net.Attributes" Version="1.0.0">
@@ -539,9 +539,9 @@ The `Contracts.dll` assembly must only be copied to the output directory of the
539539
```
540540
`<ExcludeAssets>runtime</ExcludeAssets>`. This avoids having to copy `CPlugin.Net.Attributes.dll` and its dependencies to the plugin output directory.
541541

542-
Some plugins have a reference to the `CPlugin.Net.Attributes` package, so you should not copy the `CPlugin.Net.Attributes.dll` assembly to the plugin output directory. This is because the host application already contains such an assembly; otherwise, the [FindSubtypesOf](https://mrdave1999.github.io/CPlugin.Net/api/CPlugin.Net.TypeFinder.html) method will always return an empty enumerable.
542+
Some plugins have a reference to the `CPlugin.Net.Attributes` package, so you should not copy the `CPlugin.Net.Attributes.dll` assembly to the plugin output directory. This is because the host application already contains such an assembly; otherwise, the [FindSubtypesOf](https://DevD4v3.github.io/CPlugin.Net/api/CPlugin.Net.TypeFinder.html) method will always return an empty enumerable.
543543

544-
See this thread: [Why can't I copy assemblies like Example.Contracts.dll and CPlugin.Net.Attributes.dll to the plugin output directory?](https://github.com/MrDave1999/CPlugin.Net/issues/27)
544+
See this thread: [Why can't I copy assemblies like Example.Contracts.dll and CPlugin.Net.Attributes.dll to the plugin output directory?](https://github.com/DevD4v3/CPlugin.Net/issues/27)
545545

546546
### Copy plugins to publishing directory
547547

@@ -567,9 +567,9 @@ You need to add the package called [CopyPluginsToPublishDirectory](https://www.n
567567

568568
You can find a complete and functional example in these projects:
569569

570-
- [Example.HostConsoleApp](https://github.com/MrDave1999/CPlugin.Net/tree/master/samples/HostApplications/ConsoleApp)
571-
- [Example.HostWebApi](https://github.com/MrDave1999/CPlugin.Net/tree/master/samples/HostApplications/WebApi)
572-
- [Example.Plugins](https://github.com/MrDave1999/CPlugin.Net/tree/master/samples/Plugins)
570+
- [Example.HostConsoleApp](https://github.com/DevD4v3/CPlugin.Net/tree/master/samples/HostApplications/ConsoleApp)
571+
- [Example.HostWebApi](https://github.com/DevD4v3/CPlugin.Net/tree/master/samples/HostApplications/WebApi)
572+
- [Example.Plugins](https://github.com/DevD4v3/CPlugin.Net/tree/master/samples/Plugins)
573573
- [DentallApp.BackEnd.Host](https://github.com/DentallApp/back-end/tree/dev/src/HostApplication)
574574
- [DentallApp.BackEnd.Plugins](https://github.com/DentallApp/back-end/tree/dev/src/Plugins)
575575

@@ -591,4 +591,4 @@ Follow the steps below:
591591
- Create your feature branch (git checkout -b my-new-change)
592592
- Commit your changes (git commit -am 'Add some change')
593593
- Push to the branch (git push origin my-new-change)
594-
- Create new Pull Request
594+
- Create new Pull Request

0 commit comments

Comments
 (0)