JsonRpc.AddLocalRpcTarget 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddLocalRpcTarget(Type, Object, JsonRpcTargetOptions) | |
AddLocalRpcTarget(Object, JsonRpcTargetOptions) |
将指定目标添加为接收传入消息时要调用的对象。 目标对象不应相互继承,并按照添加它们的顺序调用。 |
AddLocalRpcTarget(Object) |
将指定目标添加为接收传入消息时要调用的对象。 目标对象不应相互继承,并按照添加它们的顺序调用。 |
AddLocalRpcTarget<T>(T, JsonRpcTargetOptions) |
AddLocalRpcTarget(Type, Object, JsonRpcTargetOptions)
StreamJsonRpc.Reflection.RpcTargetInfo.AddLocalRpcTarget(System.Type,System.Object,StreamJsonRpc.JsonRpcTargetOptions,System.Boolean)
public void AddLocalRpcTarget (Type exposingMembersOn, object target, StreamJsonRpc.JsonRpcTargetOptions? options);
member this.AddLocalRpcTarget : Type * obj * StreamJsonRpc.JsonRpcTargetOptions -> unit
Public Sub AddLocalRpcTarget (exposingMembersOn As Type, target As Object, options As JsonRpcTargetOptions)
参数
- exposingMembersOn
- Type
- target
- Object
- options
- JsonRpcTargetOptions
例外
如果调用后 StartListening() 调用且 AllowModificationWhileListening 为 false
,则引发 。
适用于
AddLocalRpcTarget(Object, JsonRpcTargetOptions)
将指定目标添加为接收传入消息时要调用的对象。 目标对象不应相互继承,并按照添加它们的顺序调用。
public void AddLocalRpcTarget (object target, StreamJsonRpc.JsonRpcTargetOptions options);
public void AddLocalRpcTarget (object target, StreamJsonRpc.JsonRpcTargetOptions? options);
member this.AddLocalRpcTarget : obj * StreamJsonRpc.JsonRpcTargetOptions -> unit
Public Sub AddLocalRpcTarget (target As Object, options As JsonRpcTargetOptions)
参数
- target
- Object
接收传入消息时要调用的目标。
- options
- JsonRpcTargetOptions
一组自定义项,用于定义如何注册目标对象。 如果为 null
,则使用默认选项。
适用于
AddLocalRpcTarget(Object)
将指定目标添加为接收传入消息时要调用的对象。 目标对象不应相互继承,并按照添加它们的顺序调用。
public void AddLocalRpcTarget (object target);
member this.AddLocalRpcTarget : obj -> unit
Public Sub AddLocalRpcTarget (target As Object)
参数
- target
- Object
接收传入消息时要调用的目标。
适用于
AddLocalRpcTarget<T>(T, JsonRpcTargetOptions)
public void AddLocalRpcTarget<T> (T target, StreamJsonRpc.JsonRpcTargetOptions? options);
member this.AddLocalRpcTarget : 'T * StreamJsonRpc.JsonRpcTargetOptions -> unit
Public Sub AddLocalRpcTarget(Of T) (target As T, options As JsonRpcTargetOptions)
类型参数
- T
参数
- target
- T
- options
- JsonRpcTargetOptions