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