NuGet based extensibility system for NETCore.
NuGet based extensibility system for netcore apps.
Branch | Status |
---|---|
master | |
develop |
1) Install NuGet Package StoneAssemblies.Extensibility in your application.
2) Add a configuration section like this:
{
"Extensions": {
"Sources": [
{
"Uri": "%PRIVATE_REPO_URL%",
"Username": "%USERNAME%",
"Password": "%PASSWORD%"
},
{
"Uri": "https://api.nuget.org/v3/index.json",
"Searchable": "false"
}
],
"Packages" ["%PACKAGE_NAME%:%PACKAGE_VERSION%", "..."]
}
}
1) Create a class library.
2) By convention, the extensibility runtime looks for a class named Startup
to execute the plugin initialization. The Startup
class should look like this:
public class Startup
{
public Startup(IConfiguration configuration)
{
this.Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection serviceCollection)
{
// TODO: Register plugin service here!!
}
}
3) Pack and publish the class library as NuGet package in a public or private registry.