JKang.IpcServiceFramework.Core
1.0.3
Package Description
See the version list below for details.
Install-Package JKang.IpcServiceFramework.Core -Version 1.0.3
dotnet add package JKang.IpcServiceFramework.Core --version 1.0.3
<PackageReference Include="JKang.IpcServiceFramework.Core" Version="1.0.3" />
paket add JKang.IpcServiceFramework.Core --version 1.0.3
#r "nuget: JKang.IpcServiceFramework.Core, 1.0.3"
IpcServiceFramework
A .NET Core lightweight inter-process communication framework allowing invoking a service via named pipeline (in a similar way as WCF, which is currently unavailable for .NET Core).
Support using primitive or complexe types in service contract.
Support multi-threading on server side with configurable number of threads.
ASP.NET Core Dependency Injection framework friendly.
Usage
- Create an interface as service contract and package it in an assembly to be shared between server and client.
- Implement the service and host it in an console or web applciation
- Invoke the service with framework provided proxy client
Downloads
IpcServiceFramework is available via NuGet:
Quick Start:
Step 1 - Create service contract
public interface IComputingService
{
float AddFloat(float x, float y);
}
Step 2: Implement the service
class ComputingService : IComputingService
{
public float AddFloat(float x, float y)
{
return x + y;
}
}
Step 3 - Host the service in Console application
class Program
{
static void Main(string[] args)
{
// configure DI
IServiceCollection services = ConfigureServices(new ServiceCollection());
// run IPC service host
IpcServiceHostBuilder
.Buid("pipeName", services.BuildServiceProvider())
.Run();
}
private static IServiceCollection ConfigureServices(IServiceCollection services)
{
return services
.AddIpc(options =>
{
options.ThreadCount = 4;
})
.AddService<IComputingService, ComputingService>();
}
}
It's possible to host IPC service in web application, please check out the sample project IpcServiceSample.WebServer
Step 4 - Invoke the service from client process
var proxy = new IpcServiceClient<IComputingService>("pipeName");
float result = await proxy.InvokeAsync(x => x.AddFloat(1.23f, 4.56f));
Please feel free to download, fork and/or provide any feedback!
IpcServiceFramework
A .NET Core lightweight inter-process communication framework allowing invoking a service via named pipeline (in a similar way as WCF, which is currently unavailable for .NET Core).
Support using primitive or complexe types in service contract.
Support multi-threading on server side with configurable number of threads.
ASP.NET Core Dependency Injection framework friendly.
Usage
- Create an interface as service contract and package it in an assembly to be shared between server and client.
- Implement the service and host it in an console or web applciation
- Invoke the service with framework provided proxy client
Downloads
IpcServiceFramework is available via NuGet:
Quick Start:
Step 1 - Create service contract
public interface IComputingService
{
float AddFloat(float x, float y);
}
Step 2: Implement the service
class ComputingService : IComputingService
{
public float AddFloat(float x, float y)
{
return x + y;
}
}
Step 3 - Host the service in Console application
class Program
{
static void Main(string[] args)
{
// configure DI
IServiceCollection services = ConfigureServices(new ServiceCollection());
// run IPC service host
IpcServiceHostBuilder
.Buid("pipeName", services.BuildServiceProvider())
.Run();
}
private static IServiceCollection ConfigureServices(IServiceCollection services)
{
return services
.AddIpc(options =>
{
options.ThreadCount = 4;
})
.AddService<IComputingService, ComputingService>();
}
}
It's possible to host IPC service in web application, please check out the sample project IpcServiceSample.WebServer
Step 4 - Invoke the service from client process
var proxy = new IpcServiceClient<IComputingService>("pipeName");
float result = await proxy.InvokeAsync(x => x.AddFloat(1.23f, 4.56f));
Please feel free to download, fork and/or provide any feedback!
Release Notes
1.0.3
- support enum/guid type
1.0.2
- support implicitly converting input parameters from derived type to base type
1.0.1
- support passing array parameters
Dependencies
-
.NETStandard 2.0
- Newtonsoft.Json (>= 10.0.3)
Used By
NuGet packages (3)
Showing the top 3 NuGet packages that depend on JKang.IpcServiceFramework.Core:
Package | Downloads |
---|---|
JKang.IpcServiceFramework.Client
Package Description
|
|
JKang.IpcServiceFramework.Server
Package Description
|
|
JKang.IpcServiceFramework.Hosting
Package Description
|
GitHub repositories
This package is not used by any popular GitHub repositories.
Version History
Version | Downloads | Last updated |
---|---|---|
3.1.0 | 2,299 | 9/12/2020 |
3.1.0-preview.1 | 153 | 9/12/2020 |
3.0.5-preview.1 | 438 | 8/18/2020 |
3.0.4 | 1,881 | 7/5/2020 |
3.0.4-preview.1 | 122 | 7/5/2020 |
3.0.3 | 349 | 6/15/2020 |
3.0.3-preview.1 | 106 | 6/15/2020 |
3.0.2 | 919 | 6/12/2020 |
3.0.2-preview.2 | 161 | 6/12/2020 |
3.0.2-preview.1 | 164 | 6/12/2020 |
3.0.1 | 316 | 6/12/2020 |
3.0.1-ci-20200612.1 | 184 | 6/12/2020 |
3.0.0.34-preview | 274 | 6/12/2020 |
3.0.0.28-alpha | 1,054 | 5/3/2020 |
3.0.0.15-alpha | 321 | 4/28/2020 |
3.0.0.12-alpha | 263 | 4/27/2020 |
3.0.0.10-alpha | 273 | 4/26/2020 |
3.0.0 | 396 | 6/12/2020 |
2.3.1 | 6,628 | 12/27/2019 |
2.3.0 | 241 | 12/20/2019 |
2.2.2 | 5,588 | 4/30/2019 |
2.2.1 | 2,265 | 3/28/2019 |
2.2.0 | 2,366 | 12/18/2018 |
2.1.2 | 989 | 12/11/2018 |
2.1.1 | 422 | 11/20/2018 |
2.1.0 | 388 | 11/19/2018 |
2.0.3 | 409 | 11/16/2018 |
2.0.2 | 410 | 11/14/2018 |
2.0.1.1 | 967 | 10/29/2018 |
2.0.0.2 | 811 | 7/16/2018 |
1.0.4.3 | 494 | 7/13/2018 |
1.0.3 | 523 | 6/30/2018 |
1.0.2 | 511 | 5/30/2018 |
1.0.1 | 2,124 | 2/14/2018 |
1.0.0 | 646 | 1/9/2018 |