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

start 事件的名称。

返回

一个 对象 , 表示新活动。

实现

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

start 事件的名称。

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

start 事件的名称。

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 的 ID 设置的。

ID 是自动生成的。

opcode 设置为 LoggingOptions.Opcode.Start

另请参阅

适用于