Share via


ServiceJsonRpcDescriptor 类

定义

支持 JSON-RPC 的服务的 RPC 描述符。

public ref class ServiceJsonRpcDescriptor : Microsoft::ServiceHub::Framework::ServiceRpcDescriptor, IEquatable<Microsoft::ServiceHub::Framework::ServiceJsonRpcDescriptor ^>
[System.Diagnostics.DebuggerDisplay("{DebuggerDisplay,nq}")]
public class ServiceJsonRpcDescriptor : Microsoft.ServiceHub.Framework.ServiceRpcDescriptor, IEquatable<Microsoft.ServiceHub.Framework.ServiceJsonRpcDescriptor>
[<System.Diagnostics.DebuggerDisplay("{DebuggerDisplay,nq}")>]
type ServiceJsonRpcDescriptor = class
    inherit ServiceRpcDescriptor
    interface IEquatable<ServiceJsonRpcDescriptor>
Public Class ServiceJsonRpcDescriptor
Inherits ServiceRpcDescriptor
Implements IEquatable(Of ServiceJsonRpcDescriptor)
继承
ServiceJsonRpcDescriptor
派生
属性
实现

构造函数

ServiceJsonRpcDescriptor(ServiceJsonRpcDescriptor)

初始化 类的新实例, ServiceJsonRpcDescriptor 并根据模板实例初始化所有字段。

ServiceJsonRpcDescriptor(ServiceMoniker, ServiceJsonRpcDescriptor+Formatters, ServiceJsonRpcDescriptor+MessageDelimiters)

初始化 ServiceJsonRpcDescriptor 类的新实例。

ServiceJsonRpcDescriptor(ServiceMoniker, Type, ServiceJsonRpcDescriptor+Formatters, ServiceJsonRpcDescriptor+MessageDelimiters)

初始化 类的新实例 ServiceJsonRpcDescriptor ,不支持打开其他流,除非依赖基础服务代理来提供一个流。

ServiceJsonRpcDescriptor(ServiceMoniker, Type, ServiceJsonRpcDescriptor+Formatters, ServiceJsonRpcDescriptor+MessageDelimiters, MultiplexingStream+Options)

初始化 类的新实例 ServiceJsonRpcDescriptor ,并支持使用 MultiplexingStreamOptions打开其他流。

属性

ClientInterface

获取客户端的“回调”RPC 目标应实现的接口类型。

(继承自 ServiceRpcDescriptor)
ExceptionStrategy

获取异常从服务到客户端的通信方式。 创建实例时, ExceptionStrategy 此属性在 属性上 JsonRpc 设置。

Formatter

获取服务使用的格式设置。

JoinableTaskFactory

获取 JoinableTaskFactory 可应用于构造的 RPC 连接的 。

(继承自 ServiceRpcDescriptor)
MessageDelimiter

获取可识别消息边界的机制。 在 中找到 ServiceJsonRpcDescriptor.MessageDelimiters一些预期值。

Moniker

获取服务的名字对象。

(继承自 ServiceRpcDescriptor)
MultiplexingStream

获取 Nerdbank.Streams.MultiplexingStream 可由构造的客户端或服务器使用的 。

(继承自 ServiceRpcDescriptor)
MultiplexingStreamOptions

获取在创建新的 时要使用的选项, Nerdbank.Streams.MultiplexingStream 作为建立 RPC 连接的先决条件。

Protocol

获取此实例支持的协议的非本地化名称。

TraceSource

TraceSource获取要用于构造客户端或服务器的 。

(继承自 ServiceRpcDescriptor)

方法

Clone()

创建具有所有相同属性的此实例的副本。

ConstructLocalProxy<T>(T)

使用代理包装一些目标对象,该代理为调用方提供与使用 JsonRpc调用实际 RPC 对象的类似语义。

ConstructRpc(Object, IDuplexPipe)

通过 IDuplexPipe建立与给定对象的 RPC 连接,允许远程方在给定对象上本地调用方法。

(继承自 ServiceRpcDescriptor)
ConstructRpc<T>(IDuplexPipe)

基于给定 IDuplexPipe 创建 RPC 客户端代理,而不为远程方提供本地 RPC 目标以在本地调用方法。

(继承自 ServiceRpcDescriptor)
ConstructRpc<T>(Object, IDuplexPipe)

基于给定 IDuplexPipe 创建 RPC 客户端代理,并为远程方提供本地 RPC 目标,以便在本地调用方法。

(继承自 ServiceRpcDescriptor)
ConstructRpcConnection(IDuplexPipe)

通过 IDuplexPipe建立 RPC 连接。

CreateConnection(JsonRpc)

初始化 或 派生类型的新实例 ServiceJsonRpcDescriptor.JsonRpcConnection

CreateFormatter()

初始化 的新实例 IJsonRpcMessageFormatter ,以便在新的服务器或客户端中使用。

CreateHandler(IDuplexPipe, IJsonRpcMessageFormatter)

初始化 的新实例 IJsonRpcMessageHandler ,以便在新的服务器或客户端中使用。

CreateJsonRpc(IJsonRpcMessageHandler)

初始化 的新实例 JsonRpc ,以便在新的服务器或客户端中使用。

Equals(Object)

支持 JSON-RPC 的服务的 RPC 描述符。

Equals(ServiceJsonRpcDescriptor)

支持 JSON-RPC 的服务的 RPC 描述符。

GetHashCode()

支持 JSON-RPC 的服务的 RPC 描述符。

WithExceptionStrategy(ExceptionProcessing)

返回的实例 ServiceJsonRpcDescriptor 与此类似,但 ExceptionStrategy 属性设置为新值。

WithJoinableTaskFactory(JoinableTaskFactory)

返回一个 实例,该实例 ServiceRpcDescriptor 与此类似,但 JoinableTaskFactory 属性设置为指定值。

(继承自 ServiceRpcDescriptor)
WithMultiplexingStream(MultiplexingStream)

返回一个 实例,该实例 ServiceRpcDescriptor 与此类似,但 MultiplexingStream 属性设置为指定值,并将 Nerdbank.Streams.MultiplexingStream.Options 设置为 null

WithMultiplexingStream(MultiplexingStream+Options)

返回一个 实例,该实例 ServiceJsonRpcDescriptor 与此类似,但 MultiplexingStreamOptions 属性设置为指定值的冻结副本。 Nerdbank.Streams.MultiplexingStream如果已设置 ,则会将其清除。

WithServiceMoniker(ServiceMoniker)

返回一个 实例,该实例 ServiceRpcDescriptor 与此类似,但 ServiceMoniker 属性设置为指定值。

(继承自 ServiceRpcDescriptor)
WithTraceSource(TraceSource)

返回一个 实例,该实例 ServiceRpcDescriptor 与此类似,但 TraceSource 属性设置为指定值。

(继承自 ServiceRpcDescriptor)

适用于