JsonRpc.AddLocalRpcTarget 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| AddLocalRpcTarget(Object, JsonRpcTargetOptions) |
在收到訊息時,將指定的目標加入可調用的物件。 目標物件不應彼此繼承,並依其加入順序被呼叫。 |
| AddLocalRpcTarget(Type, Object, JsonRpcTargetOptions) | |
| AddLocalRpcTarget(Object) |
在收到訊息時,將指定的目標加入可調用的物件。 目標物件不應彼此繼承,並依其加入順序被呼叫。 |
| AddLocalRpcTarget<T>(T, JsonRpcTargetOptions) |
AddLocalRpcTarget(Object, JsonRpcTargetOptions)
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
在收到訊息時,將指定的目標加入可調用的物件。 目標物件不應彼此繼承,並依其加入順序被呼叫。
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(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)
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
- 來源:
- JsonRpc.cs
在收到訊息時,將指定的目標加入可調用的物件。 目標物件不應彼此繼承,並依其加入順序被呼叫。
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