Joker.MultiProc.PipelineServer 1.0.1

.NET Framework 4.5
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, C# scripting and .NET Interactive. 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 Versions
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
Compatible target framework(s)
Additional computed target framework(s)
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 329 1/24/2020
1.0.0 347 1/24/2020

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