@@ -39,7 +39,7 @@ namespace DatabaseMaintainer
39
39
}
40
40
```
41
41
42
- - Add a background worker
42
+ - Add a background worker
43
43
44
44
```` c#
45
45
using System ;
@@ -82,21 +82,23 @@ namespace DatabaseMaintainer
82
82
}
83
83
````
84
84
85
- Project solution looks like following:
85
+ Project solution looks like the following:
86
86
87
87
<img src =" images/plugin-solution.png " alt =" plugin-solution " class =" img-thumbnail " />
88
88
89
89
#### Build the Plugin
90
90
91
- Build project in release mode. ` DatabaseMaintainer.dll ` will be created in folder
91
+ Build project in release mode. ` DatabaseMaintainer.dll ` will be created in the folder
92
92
` DatabaseMaintainer\DatabaseMaintainer\bin\Release\netcoreapp2.1 ` .
93
93
94
94
### Add Plugin to the Application
95
95
96
- Following example, it will be loaded from ` wwwroot ` folder. You can change plugins folder location.
97
- First following line should be added to application ` Startup.cs ` that you want to add to application (MVC or Host).
96
+ In the following example, it will be loaded from the ` wwwroot ` folder. You can change the plugins folder location.
97
+ First, the following line should be added to the ` Startup.cs ` of the application (MVC or Host) that you want to add the plugin to.
98
98
99
- ` options.PlugInSources.AddFolder(Path.Combine(_hostingEnvironment.WebRootPath, "Plugins"), SearchOption.AllDirectories); `
99
+ ``` c#
100
+ options .PlugInSources .AddFolder (Path .Combine (_hostingEnvironment .WebRootPath , " Plugins" ), SearchOption .AllDirectories );
101
+ ```
100
102
101
103
Latest Startup.cs
102
104
@@ -124,7 +126,9 @@ public class Startup
124
126
options .PlugInSources .AddFolder (Path .Combine (_hostingEnvironment .WebRootPath , " Plugins" ), SearchOption .AllDirectories );
125
127
);
126
128
}
127
- ...
129
+
130
+ ...
131
+ }
128
132
```
129
133
130
134
And copy ` DatabaseMaintainer.dll ` from plugin to application ` .Mvc/wwwroot/Plugins ` folder.
@@ -133,6 +137,6 @@ And copy `DatabaseMaintainer.dll` from plugin to application `.Mvc/wwwroot/Plugi
133
137
134
138
### Run the Application
135
139
136
- Run project and see Logs .txt to check if it works .
140
+ Run the project and see Logs.txt to check if it works.
137
141
138
142
<img src =" images/plugin-log.png " alt =" plugin-log " class =" img-thumbnail " />
0 commit comments