Joker.MultiProc.PipelineServer
1.0.1
dotnet add package Joker.MultiProc.PipelineServer --version 1.0.1
NuGet\Install-Package Joker.MultiProc.PipelineServer -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Joker.MultiProc.PipelineServer" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Joker.MultiProc.PipelineServer --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Joker.MultiProc.PipelineServer, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Joker.MultiProc.PipelineServer as a Cake Addin #addin nuget:?package=Joker.MultiProc.PipelineServer&version=1.0.1 // Install Joker.MultiProc.PipelineServer as a Cake Tool #tool nuget:?package=Joker.MultiProc.PipelineServer&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MultiProcessServer
一个基于PipelineServer管道通信的多进程服务
如何获取已发布版本
打开Visual Studio
工具,Nuget包管理搜索MultiProc
关键字,下载安装使用。
如何使用
1.程序集依赖
[assembly:ProcessPluginServer]
注意:如果子进程服务程序是内部(internal)的,需要打特性[assembly:InternalsVisibleTo( Joker.MultiProc.PipelineServer.InternalsVisible.ToLocalMethodDescription)]
2.如何声明多进程服务
/// <summary>
/// 计算器-接口
/// </summary>
[MultiProcess(typeof(Calculator), "计算器服务", 1)]
public interface ICalculator : Joker.MultiProc.PipelineServer.ProcessService.IProcessService
{
/// <summary>
/// 求和
/// </summary>
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns></returns>
int Sum(int a, int b);
}
3.如何定义多进程服务
/// <summary>
/// 计算器
/// </summary>
public class Calculator:ICalculator
{
/// <inheritdoc cref="Sum"/>
public virtual int Sum(int a, int b)
{
Console.WriteLine(ProcessEnvironment.IsDebug);
return a + b;
}
}
4.如何使用进程服务
//获取计算器
var calc = new ProcessService<ICalculator>();
var result = Calc.Instance.Sum(100, 200;
Console.WriteLine(result);
交流
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- Castle.Core (>= 4.4.0)
- log4net (>= 2.0.8)
- Newtonsoft.Json (>= 12.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
1.修复InternalsVisible的内部类可见性BUG