Table of Contents

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

T

The 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

moniker ServiceMoniker

The service identity.

shape ITypeShape<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

JsonRpcMessagePackFraming

Serializer

Gets the serializer used for application values and protocol messages.

public MessagePackSerializer Serializer { get; init; }

Property Value

MessagePackSerializer

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

pipe IDuplexPipe

The connected transport.

Returns

JsonRpcPipeChannel

The channel that owns the transport.