JsonRpc.AllowModificationWhileListening 属性

定义

获取或设置一个值,该值指示在调用或调用后StartListening()Attach(Stream, Object)是否可以更改此实例的配置。

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

属性值

默认为 false

注解

默认情况下,所有配置(如目标对象和目标方法)都必须在侦听开始之前设置,以避免出现争用条件,这样我们才收到方法调用消息,然后才为其连接处理程序,并且必须拒绝调用。 但在某些高级方案中,在侦听开始 (后,可能需要添加目标方法,例如响应调用,使其他功能) ,在这种情况下,将此属性 true 设置为合适。

适用于