Esempio n. 1
0
 /// <summary>
 /// 使用MessagePack编解码器
 /// </summary>
 /// <param name="builder">Rpc服务构建者。</param>
 /// <returns>Rpc服务构建者。</returns>
 public static IRpcBuilder UseMessagePackCodec(this IRpcBuilder builder)
 {
     return(builder.UseCodec <MessagePackTransportMessageCodecFactory>());
 }
Esempio n. 2
0
 /// <summary>
 /// 使用Json编解码器。
 /// </summary>
 /// <param name="builder">Rpc服务构建者。</param>
 /// <returns>Rpc服务构建者。</returns>
 public static IRpcBuilder UseJsonCodec(this IRpcBuilder builder)
 {
     return(builder.UseCodec <JsonTransportMessageCodecFactory>());
 }
Esempio n. 3
0
 /// <summary>
 /// 使用ProtoBuffer编解码器。
 /// </summary>
 /// <param name="builder">Rpc服务构建者。</param>
 /// <returns>Rpc服务构建者。</returns>
 public static IRpcBuilder UseProtoBufferCodec(this IRpcBuilder builder)
 {
     return(builder.UseCodec <ProtoBufferTransportMessageCodecFactory>());
 }