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
#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

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);

交流

邮箱: mrgonglei159@gmail.com 595459062@qq.com

Product 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.

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
1.0.1 444 1/24/2020
1.0.0 463 1/24/2020

1.修复InternalsVisible的内部类可见性BUG