Class JsonRpcMessagePackDescriptor<T>
- Namespace
- Nerdbank.JsonRpc.BrokeredServices
- Assembly
- Nerdbank.JsonRpc.dll
Describes a service connection using MessagePack.
public record JsonRpcMessagePackDescriptor<T> : JsonRpcDescriptor<T>, IEquatable<JsonRpcDescriptor>, IJsonRpcDescriptor<T>, IJsonRpcDescriptor, IEquatable<JsonRpcDescriptor<T>>, IEquatable<JsonRpcMessagePackDescriptor<T>> where T : class
Type Parameters
TThe primary service interface.
- Inheritance
-
JsonRpcMessagePackDescriptor<T>
- Implements
- Inherited Members
Constructors
JsonRpcMessagePackDescriptor(ServiceMoniker, ITypeShape<T>)
Initializes a new instance of the JsonRpcMessagePackDescriptor<T> class.
public JsonRpcMessagePackDescriptor(ServiceMoniker moniker, ITypeShape<T> shape)
Parameters
monikerServiceMonikerThe service identity.
shapeITypeShape<T>The generated primary interface shape.
Properties
Framing
Gets the MessagePack framing, defaulting to a four-byte length prefix.
public JsonRpcMessagePackFraming Framing { get; init; }
Property Value
Serializer
Gets the serializer used for application values and protocol messages.
public MessagePackSerializer Serializer { get; init; }
Property Value
Remarks
Use a record copy to configure the serializer without changing other descriptor instances.
Methods
CreateChannel(IDuplexPipe)
Creates the encoding-specific channel for a connection.
protected override JsonRpcPipeChannel CreateChannel(IDuplexPipe pipe)
Parameters
pipeIDuplexPipeThe connected transport.
Returns
- JsonRpcPipeChannel
The channel that owns the transport.