ActivityListener.ShouldListenTo 属性

定义

获取或设置回调,允许确定是否应侦听使用活动源对象创建的活动对象事件。

public:
 property Func<System::Diagnostics::ActivitySource ^, bool> ^ ShouldListenTo { Func<System::Diagnostics::ActivitySource ^, bool> ^ get(); void set(Func<System::Diagnostics::ActivitySource ^, bool> ^ value); };
public Func<System.Diagnostics.ActivitySource,bool>? ShouldListenTo { get; set; }
member this.ShouldListenTo : Func<System.Diagnostics.ActivitySource, bool> with get, set
Public Property ShouldListenTo As Func(Of ActivitySource, Boolean)

属性值

true 侦听事件; false 否则。

适用于