UniversalRPC 1.1.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package UniversalRPC --version 1.1.8
NuGet\Install-Package UniversalRPC -Version 1.1.8
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="UniversalRPC" Version="1.1.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UniversalRPC --version 1.1.8
#r "nuget: UniversalRPC, 1.1.8"
#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 UniversalRPC as a Cake Addin
#addin nuget:?package=UniversalRPC&version=1.1.8

// Install UniversalRPC as a Cake Tool
#tool nuget:?package=UniversalRPC&version=1.1.8

UniversalRPC介绍

0 背景

通常的GRpc是针对多语言的,在实现上通常需要通过protobuf进行通信,protobuf往往只有单纯的基础值类型,但实际环境中往往会出现 更多的情况,更多的类,在使用上就势必会进行二次转换。UniversalRPC就是要解决这种使用上的问题。

1 使用说明

1.1 契约定义

契约与普通接口定义一样,只需要继承IURPC接口

1.2 服务端实现接口

服务端引用定义的契约接口,并实现该接口

1.3 服务端添加RPC服务

  • IServiceCollection 执行AddURPCService()扩展方法
  • WebApplication 执行UseURPCService()扩展方法
  • EndPoint 执行UseURPCService()扩展方法

1.4 添加RPC客户端

1.4.1 服务端添加
  • IServiceCollection 执行AddURPCClient(url)方法
  • 注入契约即可使用
1.4.2 客户端添加
  • URPC.GetUURPC获取你定义的契约类型

2 序列化

UniversalRPC默认使用系统自带json序列化,但你也可以指定序列化方式,传入你定义的序列化实例即可。

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.1.9 83 4/30/2024
1.1.8 106 4/22/2024
1.1.7 90 4/22/2024
1.1.6 94 4/22/2024
1.1.5 98 4/10/2024
1.1.4 112 4/6/2024
1.1.3 119 4/6/2024
1.1.2 108 3/31/2024
1.1.1 194 3/17/2024
1.1.0 173 3/17/2024
1.0.17 201 3/12/2024
1.0.16 204 3/9/2024
1.0.15 210 3/6/2024
1.0.14 198 3/6/2024
1.0.13 191 3/6/2024
1.0.12 199 3/5/2024
1.0.11 188 3/5/2024
1.0.10 239 3/5/2024
1.0.9 235 3/4/2024
1.0.8 220 3/4/2024
1.0.7 212 3/4/2024
1.0.6 220 3/4/2024
1.0.5 242 3/3/2024
1.0.4 242 3/3/2024
1.0.3 223 3/3/2024
1.0.2 179 3/3/2024
1.0.1 175 3/2/2024
1.0.0 184 3/2/2024