Table of Contents

Class JsonRpcUtf8Descriptor<T>

Namespace
Nerdbank.JsonRpc.BrokeredServices
Assembly
Nerdbank.JsonRpc.dll

Describes a service connection using UTF-8 JSON.

public record JsonRpcUtf8Descriptor<T> : JsonRpcDescriptor<T>, IEquatable<JsonRpcDescriptor>, IJsonRpcDescriptor<T>, IJsonRpcDescriptor, IEquatable<JsonRpcDescriptor<T>>, IEquatable<JsonRpcUtf8Descriptor<T>> where T : class

Type Parameters

T

The primary service interface.

Inheritance
JsonRpcUtf8Descriptor<T>
Implements
Inherited Members

Remarks

Uses the Nerdbank.Json serializer, which supports UTF-8, not UTF-16.

Constructors

JsonRpcUtf8Descriptor(ServiceMoniker, ITypeShape<T>)

Initializes a new instance of the JsonRpcUtf8Descriptor<T> class.

public JsonRpcUtf8Descriptor(ServiceMoniker moniker, ITypeShape<T> shape)

Parameters

moniker ServiceMoniker

The service identity.

shape ITypeShape<T>

The generated primary interface shape.

Properties

Framing

Gets the JSON framing, defaulting to Content-Length headers.

public JsonRpcJsonFraming Framing { get; init; }

Property Value

JsonRpcJsonFraming

Serializer

Gets the serializer used for application values and protocol messages.

public JsonSerializer Serializer { get; init; }

Property Value

JsonSerializer

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.