WFlows.Common.Plugins.Contracts
1.0.0
dotnet add package WFlows.Common.Plugins.Contracts --version 1.0.0
NuGet\Install-Package WFlows.Common.Plugins.Contracts -Version 1.0.0
<PackageReference Include="WFlows.Common.Plugins.Contracts" Version="1.0.0" />
<PackageVersion Include="WFlows.Common.Plugins.Contracts" Version="1.0.0" />
<PackageReference Include="WFlows.Common.Plugins.Contracts" />
paket add WFlows.Common.Plugins.Contracts --version 1.0.0
#r "nuget: WFlows.Common.Plugins.Contracts, 1.0.0"
#:package WFlows.Common.Plugins.Contracts@1.0.0
#addin nuget:?package=WFlows.Common.Plugins.Contracts&version=1.0.0
#tool nuget:?package=WFlows.Common.Plugins.Contracts&version=1.0.0
WFlows Plugin Contracts
This package provides the contracts and interfaces needed to develop plugins for WFlows.
Quick Start
- Install the package:
dotnet add package WFlows.Plugins.Contracts
Create a plugin class:
using WFlows.Plugins.Contracts;
[Plugin(
Name = "MyAwesomePlugin",
Version = "1.0.0",
Description = "Does awesome things",
Category = "Utilities",
Author = "Your Name"
)]
public class MyAwesomePlugin : IPlugin
{
public string Name => "MyAwesomePlugin";
public string Version => "1.0.0";
public string Description => "Does awesome things";
public Task InitializeAsync(IPluginContext context, CancellationToken cancellationToken = default)
{
context.Logger.LogInformation("MyAwesome Plugin initializing...");
return Task.CompletedTask;
}
public async Task<PluginResult> ExecuteAsync(string[] args, CancellationToken cancellationToken = default)
{
// Your plugin logic here
return PluginResult.Success("Plugin executed successfully!");
}
public Task ShutdownAsync(CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}
}
Build your plugin as a class library targeting .NET 8.0
Plugin Development Guide
Dependency Injection
Plugins can use constructor injection to receive services:
public class MyPlugin : IPlugin
{
private readonly ILogger<MyPlugin> _logger;
private readonly IConfiguration _config;
public MyPlugin(ILogger<MyPlugin> logger, IConfiguration config)
{
_logger = logger;
_config = config;
}
// ... implement interface
}
Registering Custom Services
If your plugin needs to register additional services:
public class MyPlugin : IPlugin, IPluginServiceRegistration
{
public void RegisterServices(IServiceCollection services)
{
services.AddScoped<IMyCustomService, MyCustomService>();
}
// ... implement IPlugin interface
}
Configuration
Access plugin configuration through the context:
public async Task InitializeAsync(IPluginContext context, CancellationToken cancellationToken = default)
{
if (context.Configuration.TryGetValue("MySettings", out var settings))
{
// Use your settings
}
}
API Reference
See the full API documentation at: https://yourcompany.com/WFlows/plugin-api
Support
Documentation: https://yourcompany.com/WFlows/docs Support: support@yourcompany.com Issues: https://github.com/yourcompany/WFlows-plugin-contracts/issues
Private Implementation Benefits
Security & IP Protection:
- Core business logic remains proprietary
- Plugin system implementation stays internal
- Only necessary contracts are exposed
Versioning Control:
- Public contracts have stable, semantic versioning
- Internal implementation can evolve independently
- Breaking changes are controlled through contract versions
Developer Experience:
- Clean, focused API for plugin developers
- Comprehensive documentation and samples
- NuGet package distribution for easy consumption
Business Model:
- Can charge for plugin development licenses
- Marketplace opportunities for certified plugins
- Support contracts for plugin developers
This approach gives you the best of both worlds: an extensible plugin ecosystem while maintaining control over your core intellectual property.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|
v1.0.0:
- Initial release
- Plugin interface definition
- Dependency injection support
- Metadata attributes