Share via


DelegatingServiceJsonRpcDescriptor Class

Definition

A delegating RPC descriptor for services that support JSON-RPC. By default this descriptor will delegate operations to the wrapped descriptor.

[System.Diagnostics.DebuggerDisplay("{DebuggerDisplay,nq}")]
public abstract class DelegatingServiceJsonRpcDescriptor : Microsoft.ServiceHub.Framework.ServiceJsonRpcDescriptor
[<System.Diagnostics.DebuggerDisplay("{DebuggerDisplay,nq}")>]
type DelegatingServiceJsonRpcDescriptor = class
    inherit ServiceJsonRpcDescriptor
Public MustInherit Class DelegatingServiceJsonRpcDescriptor
Inherits ServiceJsonRpcDescriptor
Inheritance
DelegatingServiceJsonRpcDescriptor
Attributes

Remarks

Default implementation of this class only delegates protected override methods and ConstructRpcConnection(IDuplexPipe) is not delegated intentionally. This allows derived classes to pick which protected methods they want to override and which ones to delegate while keeping default ConstructRpcConnection implementation.

This implementation will also ensure inner descriptor is updated with any changes settings such as multiplexing options, before ConstructRpcConnection(IDuplexPipe) is executed.

Constructors

DelegatingServiceJsonRpcDescriptor(DelegatingServiceJsonRpcDescriptor)

Initializes a new instance of the DelegatingServiceJsonRpcDescriptor class.

DelegatingServiceJsonRpcDescriptor(ServiceJsonRpcDescriptor)

Initializes a new instance of the DelegatingServiceJsonRpcDescriptor class.

Properties

AdditionalServiceInterfaces

Gets the set of interfaces that will be added to a generated proxy in addition to the one specified as the type argument to ConstructRpcClient<T>() or GetProxyAsync<T>(ServiceRpcDescriptor, ServiceActivationOptions, CancellationToken).

(Inherited from ServiceJsonRpcDescriptor)
ClientInterface

Gets the interface type that the client's "callback" RPC target is expected to implement.

(Inherited from ServiceRpcDescriptor)
ExceptionStrategy

Gets the way exceptions are communicated from the service to the client. This is set on the ExceptionStrategy property when the JsonRpc instance is created.

(Inherited from ServiceJsonRpcDescriptor)
Formatter

Gets the formatting used by the service.

(Inherited from ServiceJsonRpcDescriptor)
JoinableTaskFactory

Gets the JoinableTaskFactory that may be applied to the constructed RPC connection.

(Inherited from ServiceRpcDescriptor)
MessageDelimiter

Gets the mechanism by which message boundaries may be discerned. Some expected values are found in ServiceJsonRpcDescriptor.MessageDelimiters.

(Inherited from ServiceJsonRpcDescriptor)
Moniker

Gets the moniker for the service.

(Inherited from ServiceRpcDescriptor)
MultiplexingStream

Gets the Nerdbank.Streams.MultiplexingStream that may be used by constructed clients or servers.

(Inherited from ServiceRpcDescriptor)
MultiplexingStreamOptions

Gets the options to use when creating a new Nerdbank.Streams.MultiplexingStream as a prerequisite to establishing an RPC connection.

(Inherited from ServiceJsonRpcDescriptor)
Protocol

Gets a non-localized name of the protocol supported by this instance.

(Inherited from ServiceJsonRpcDescriptor)
TraceSource

Gets the TraceSource to be used on constructed clients or servers.

(Inherited from ServiceRpcDescriptor)

Methods

ApplySettingsToInnerDescriptor()

Ensures that settings from the current instance are applied to delegated descriptor.

Clone()

Creates a copy of this instance with all the same properties.

(Inherited from ServiceJsonRpcDescriptor)
ConstructLocalProxy<T>(T)

Wraps some target object with a proxy that gives the caller the similar semantics to calling an actual RPC object using JsonRpc.

(Inherited from ServiceJsonRpcDescriptor)
ConstructRpc(Object, IDuplexPipe)

Establishes an RPC connection to a given object over an IDuplexPipe, allowing the remote party to invoke methods locally on the given object.

(Inherited from ServiceRpcDescriptor)
ConstructRpc<T>(IDuplexPipe)

Creates an RPC client proxy over a given IDuplexPipe without providing a local RPC target for the remote party to invoke methods locally.

(Inherited from ServiceRpcDescriptor)
ConstructRpc<T>(Object, IDuplexPipe)

Creates an RPC client proxy over a given IDuplexPipe and provides a local RPC target for the remote party to invoke methods locally.

(Inherited from ServiceRpcDescriptor)
ConstructRpcConnection(IDuplexPipe)

Establishes an RPC connection over an IDuplexPipe.

CreateConnection(JsonRpc)

Initializes a new instance of a ServiceJsonRpcDescriptor.JsonRpcConnection or derived type.

CreateFormatter()

Initializes a new instance of IJsonRpcMessageFormatter for use in a new server or client.

CreateHandler(IDuplexPipe, IJsonRpcMessageFormatter)

Initializes a new instance of IJsonRpcMessageHandler for use in a new server or client.

CreateJsonRpc(IJsonRpcMessageHandler)

Initializes a new instance of JsonRpc for use in a new server or client.

Equals(Object) (Inherited from ServiceJsonRpcDescriptor)
Equals(ServiceJsonRpcDescriptor) (Inherited from ServiceJsonRpcDescriptor)
GetHashCode() (Inherited from ServiceJsonRpcDescriptor)
WithAdditionalServiceInterfaces(Nullable<ImmutableArray<Type>>)

Returns an instance of ServiceJsonRpcDescriptor that resembles this one, but with the AdditionalServiceInterfaces property set to a new value.

(Inherited from ServiceJsonRpcDescriptor)
WithExceptionStrategy(ExceptionProcessing)

Returns an instance of ServiceJsonRpcDescriptor that resembles this one, but with the ExceptionStrategy property set to a new value.

(Inherited from ServiceJsonRpcDescriptor)
WithJoinableTaskFactory(JoinableTaskFactory)

Returns an instance of ServiceRpcDescriptor that resembles this one, but with the JoinableTaskFactory property set to the specified value.

(Inherited from ServiceRpcDescriptor)
WithMultiplexingStream(MultiplexingStream)

Returns an instance of ServiceRpcDescriptor that resembles this one, but with the MultiplexingStream property set to the specified value and Nerdbank.Streams.MultiplexingStream.Options set to null.

(Inherited from ServiceJsonRpcDescriptor)
WithMultiplexingStream(MultiplexingStream+Options)

Returns an instance of ServiceJsonRpcDescriptor that resembles this one, but with the MultiplexingStreamOptions property set to a frozen copy of the specified value. If a Nerdbank.Streams.MultiplexingStream has been set, it is cleared.

(Inherited from ServiceJsonRpcDescriptor)
WithServiceMoniker(ServiceMoniker)

Returns an instance of ServiceRpcDescriptor that resembles this one, but with the ServiceMoniker property set to the specified value.

(Inherited from ServiceRpcDescriptor)
WithTraceSource(TraceSource)

Returns an instance of ServiceRpcDescriptor that resembles this one, but with the TraceSource property set to the specified value.

(Inherited from ServiceRpcDescriptor)

Applies to