LoggingChannel.IsEnabled 方法

定義

多載

IsEnabled()

指出是否至少有一個會話正在接聽來自通道的事件。

IsEnabled(LoggingLevel)

指出至少有一個會話正在接聽通道中具有指定事件嚴重性層級的事件。

IsEnabled(LoggingLevel, Int64)

指出至少有一個會話正在接聽來自此通道之指定層級和關鍵詞的事件。

IsEnabled()

指出是否至少有一個會話正在接聽來自通道的事件。

public:
 virtual bool IsEnabled() = IsEnabled;
/// [Windows.Foundation.Metadata.Overload("IsEnabled")]
bool IsEnabled();
[Windows.Foundation.Metadata.Overload("IsEnabled")]
public bool IsEnabled();
function isEnabled()
Public Function IsEnabled () As Boolean

傳回

Boolean

bool

如果至少有一個會話正在接聽來自通道的事件,則傳回 true ,否則傳回 false

實作

屬性

備註

此屬性在功能上相當於 Enabled

另請參閱

適用於

IsEnabled(LoggingLevel)

指出至少有一個會話正在接聽通道中具有指定事件嚴重性層級的事件。

public:
 virtual bool IsEnabled(LoggingLevel level) = IsEnabled;
/// [Windows.Foundation.Metadata.Overload("IsEnabledWithLevel")]
bool IsEnabled(LoggingLevel const& level);
[Windows.Foundation.Metadata.Overload("IsEnabledWithLevel")]
public bool IsEnabled(LoggingLevel level);
function isEnabled(level)
Public Function IsEnabled (level As LoggingLevel) As Boolean

參數

level
LoggingLevel

事件嚴重性層級。

傳回

Boolean

bool

如果至少有一個會話正在接聽來自通道之指定層級的事件,則傳回 true ,否則傳回 false

實作

屬性

備註

這個屬性相當於通道。已啟用 && 通道。層級 = 層級 <。

另請參閱

適用於

IsEnabled(LoggingLevel, Int64)

指出至少有一個會話正在接聽來自此通道之指定層級和關鍵詞的事件。

public:
 virtual bool IsEnabled(LoggingLevel level, long long keywords) = IsEnabled;
/// [Windows.Foundation.Metadata.Overload("IsEnabledWithLevelAndKeywords")]
bool IsEnabled(LoggingLevel const& level, long const& keywords);
[Windows.Foundation.Metadata.Overload("IsEnabledWithLevelAndKeywords")]
public bool IsEnabled(LoggingLevel level, long keywords);
function isEnabled(level, keywords)
Public Function IsEnabled (level As LoggingLevel, keywords As Long) As Boolean

參數

level
LoggingLevel

事件嚴重性層級。

keywords
Int64

long long

long

關鍵字。 關鍵詞值的每個位都代表事件類別目錄。

傳回

Boolean

bool

如果至少有一個會話正在接聽來自通道的指定層級和關鍵詞的事件,則傳回 true ,否則傳回 false

實作

M:Windows.Foundation.Diagnostics.ILoggingTarget.IsEnabled(Windows.Foundation.Diagnostics.LoggingLevel,System.Int64) M:Windows.Foundation.Diagnostics.ILoggingTarget.IsEnabled(Windows.Foundation.Diagnostics.LoggingLevel,long long) M:Windows.Foundation.Diagnostics.ILoggingTarget.IsEnabled(Windows.Foundation.Diagnostics.LoggingLevel,long)
屬性

另請參閱

適用於