JsonRpc.AllowModificationWhileListening 屬性

定義

取得或設定值,指出呼叫 或 Attach(Stream, Object) 之後 StartListening() 是否可以變更這個實例的組態。

public bool AllowModificationWhileListening { get; set; }
member this.AllowModificationWhileListening : bool with get, set
Public Property AllowModificationWhileListening As Boolean

屬性值

預設為 false

備註

根據預設,在接聽開始之前,必須設定所有組態,例如目標物件和目標方法,以避免競爭條件,讓我們在接聽處理常式之前收到方法調用訊息,而且必須拒絕呼叫。 但在某些進階案例中,可能需要在接聽開始之後新增目標方法 (例如,為了回應可啟用其他功能) 的調用,在此情況下,請將此屬性 true 設定為 適當。

適用於