LoggingChannel 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
LoggingChannel(String) |
此建構函式會以Windows 8.1相容性模式建立LoggingChannel。 |
LoggingChannel(String, LoggingChannelOptions) |
使用指定的選項,初始化 LoggingChannel 類別的新實例。 |
LoggingChannel(String, LoggingChannelOptions, Guid) |
使用指定的選項和通道識別碼,初始化 LoggingChannel 類別的新實例。 |
LoggingChannel(String)
此建構函式會以Windows 8.1相容性模式建立LoggingChannel。
public:
LoggingChannel(Platform::String ^ name);
/// [Windows.Foundation.Metadata.Deprecated("This constructor creates a LoggingChannel in Windows 8.1 compatibility mode. Prefer the two-parameter constructor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
LoggingChannel(winrt::hstring const& name);
/// [Windows.Foundation.Metadata.Deprecated("This constructor creates a LoggingChannel in Windows 8.1 compatibility mode. Prefer the two-parameter constructor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
LoggingChannel(winrt::hstring const& name);
[Windows.Foundation.Metadata.Deprecated("This constructor creates a LoggingChannel in Windows 8.1 compatibility mode. Prefer the two-parameter constructor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public LoggingChannel(string name);
[Windows.Foundation.Metadata.Deprecated("This constructor creates a LoggingChannel in Windows 8.1 compatibility mode. Prefer the two-parameter constructor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public LoggingChannel(string name);
function LoggingChannel(name)
Public Sub New (name As String)
參數
- name
-
String
Platform::String
winrt::hstring
記錄通道的名稱。
- 屬性
備註
此建構函式會以Windows 8.1相容性模式建立LoggingChannel。 如需Windows 8.1相容性模式與Windows 10所支援之新行為之間的差異描述,請參閱LoggingChannel。
Windows 10只有在您需要與Windows 8.1相容時,才應該使用此建構函式。 如需Windows 10和更新版本,請使用LoggingChannel (String、LoggingChannelOptions) 或LoggingChannel (String、LoggingChannelOptions、Guid) 。
另請參閱
- LoggingChannel(String, LoggingChannelOptions)
- LoggingChannel(String, LoggingChannelOptions, Guid)
- LoggingSession
- FileLoggingSession
適用於
LoggingChannel(String, LoggingChannelOptions)
使用指定的選項,初始化 LoggingChannel 類別的新實例。
public:
LoggingChannel(Platform::String ^ name, LoggingChannelOptions ^ options);
LoggingChannel(winrt::hstring const& name, LoggingChannelOptions const& options);
public LoggingChannel(string name, LoggingChannelOptions options);
function LoggingChannel(name, options)
Public Sub New (name As String, options As LoggingChannelOptions)
參數
- name
-
String
Platform::String
winrt::hstring
記錄通道的名稱。
- options
- LoggingChannelOptions
通道選項。 傳遞 null 以指定預設選項。
另請參閱
適用於
LoggingChannel(String, LoggingChannelOptions, Guid)
使用指定的選項和通道識別碼,初始化 LoggingChannel 類別的新實例。
public:
LoggingChannel(Platform::String ^ name, LoggingChannelOptions ^ options, Platform::Guid id);
LoggingChannel(winrt::hstring const& name, LoggingChannelOptions const& options, winrt::guid const& id);
public LoggingChannel(string name, LoggingChannelOptions options, Guid id);
function LoggingChannel(name, options, id)
Public Sub New (name As String, options As LoggingChannelOptions, id As Guid)
參數
- name
-
String
Platform::String
winrt::hstring
記錄通道的名稱。
- options
- LoggingChannelOptions
通道選項。 傳遞 null 以指定預設選項。
- id
-
Guid
Platform::Guid
winrt::guid
要使用的通道識別碼,而不是自動產生的識別碼。