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