共用方式為


LoggingActivity.StartActivity 方法

定義

多載

StartActivity(String)

寫入活動開始事件,並建立 LoggingActivity 物件。

StartActivity(String, LoggingFields)

使用欄位寫入活動開始事件,並建立 LoggingActivity 物件。

StartActivity(String, LoggingFields, LoggingLevel)

使用指定的欄位和層級寫入活動開始事件,並建立 LoggingActivity 物件。

StartActivity(String, LoggingFields, LoggingLevel, LoggingOptions)

寫入具有指定欄位、層級和選項的活動開始事件,並建立 LoggingActivity 物件。

StartActivity(String)

寫入活動開始事件,並建立 LoggingActivity 物件。

public:
 virtual LoggingActivity ^ StartActivity(Platform::String ^ startEventName) = StartActivity;
/// [Windows.Foundation.Metadata.Overload("StartActivity")]
LoggingActivity StartActivity(winrt::hstring const& startEventName);
[Windows.Foundation.Metadata.Overload("StartActivity")]
public LoggingActivity StartActivity(string startEventName);
function startActivity(startEventName)
Public Function StartActivity (startEventName As String) As LoggingActivity

參數

startEventName
String

Platform::String

winrt::hstring

開始事件的名稱。

傳回

表示新活動的 物件。

實作

M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(System.String) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(Platform::String) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(winrt::hstring)
屬性

另請參閱

適用於

StartActivity(String, LoggingFields)

使用欄位寫入活動開始事件,並建立 LoggingActivity 物件。

public:
 virtual LoggingActivity ^ StartActivity(Platform::String ^ startEventName, LoggingFields ^ fields) = StartActivity;
/// [Windows.Foundation.Metadata.Overload("StartActivityWithFields")]
LoggingActivity StartActivity(winrt::hstring const& startEventName, LoggingFields const& fields);
[Windows.Foundation.Metadata.Overload("StartActivityWithFields")]
public LoggingActivity StartActivity(string startEventName, LoggingFields fields);
function startActivity(startEventName, fields)
Public Function StartActivity (startEventName As String, fields As LoggingFields) As LoggingActivity

參數

startEventName
String

Platform::String

winrt::hstring

開始事件的名稱。

fields
LoggingFields

此事件的欄位。

傳回

表示新活動的 物件。

實作

M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(System.String,Windows.Foundation.Diagnostics.LoggingFields) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(Platform::String,Windows.Foundation.Diagnostics.LoggingFields) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(winrt::hstring,Windows.Foundation.Diagnostics.LoggingFields)
屬性

備註

接受 LoggingFields 參數的方法也接受 NullNull值在語意上相當於新建構或清除的LoggingFields物件,並代表空的承載。

另請參閱

適用於

StartActivity(String, LoggingFields, LoggingLevel)

使用指定的欄位和層級寫入活動開始事件,並建立 LoggingActivity 物件。

public:
 virtual LoggingActivity ^ StartActivity(Platform::String ^ startEventName, LoggingFields ^ fields, LoggingLevel level) = StartActivity;
/// [Windows.Foundation.Metadata.Overload("StartActivityWithFieldsAndLevel")]
LoggingActivity StartActivity(winrt::hstring const& startEventName, LoggingFields const& fields, LoggingLevel const& level);
[Windows.Foundation.Metadata.Overload("StartActivityWithFieldsAndLevel")]
public LoggingActivity StartActivity(string startEventName, LoggingFields fields, LoggingLevel level);
function startActivity(startEventName, fields, level)
Public Function StartActivity (startEventName As String, fields As LoggingFields, level As LoggingLevel) As LoggingActivity

參數

startEventName
String

Platform::String

winrt::hstring

開始事件的名稱。

fields
LoggingFields

此事件的欄位。 可能是 **null **。

level
LoggingLevel

此事件的詳細資料層級。

傳回

表示新活動的 物件。

實作

M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(System.String,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(Platform::String,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(winrt::hstring,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel)
屬性

另請參閱

適用於

StartActivity(String, LoggingFields, LoggingLevel, LoggingOptions)

寫入具有指定欄位、層級和選項的活動開始事件,並建立 LoggingActivity 物件。

public:
 virtual LoggingActivity ^ StartActivity(Platform::String ^ startEventName, LoggingFields ^ fields, LoggingLevel level, LoggingOptions ^ options) = StartActivity;
/// [Windows.Foundation.Metadata.Overload("StartActivityWithFieldsAndOptions")]
LoggingActivity StartActivity(winrt::hstring const& startEventName, LoggingFields const& fields, LoggingLevel const& level, LoggingOptions const& options);
[Windows.Foundation.Metadata.Overload("StartActivityWithFieldsAndOptions")]
public LoggingActivity StartActivity(string startEventName, LoggingFields fields, LoggingLevel level, LoggingOptions options);
function startActivity(startEventName, fields, level, options)
Public Function StartActivity (startEventName As String, fields As LoggingFields, level As LoggingLevel, options As LoggingOptions) As LoggingActivity

參數

startEventName
String

Platform::String

winrt::hstring

此事件的名稱。

fields
LoggingFields

此事件的欄位。 可能是 Null

level
LoggingLevel

此事件的詳細資料層級。

options
LoggingOptions

此事件的選項。 傳遞 null 以使用預設選項。 這些選項適用于進階案例。 預設值是設計為適用于大部分事件。

傳回

表示新活動的 物件。

實作

M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(System.String,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel,Windows.Foundation.Diagnostics.LoggingOptions) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(Platform::String,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel,Windows.Foundation.Diagnostics.LoggingOptions) M:Windows.Foundation.Diagnostics.ILoggingTarget.StartActivity(winrt::hstring,Windows.Foundation.Diagnostics.LoggingFields,Windows.Foundation.Diagnostics.LoggingLevel,Windows.Foundation.Diagnostics.LoggingOptions)
屬性

備註

如果您提供 選項則會忽略 LoggingOptions.ActivityIdLoggingOptions.RelatedActivityIdLoggingOptions.Opcode ,因為新的 LoggingActivity 物件選項會設定如下:

RelatedId是使用此 LoggingActivity 的識別碼來設定。

系統會自動產生 識別碼

opcode設定為LoggingOptions.Opcode.Start

另請參閱

適用於