LoggingChannel.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)
属性

另请参阅

适用于

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.Opcode ,因为新的 LoggingActivity 对象的选项将按如下所示设置:

ID 是自动生成的。

操作码设置为 LoggingOptions.Opcode.Start

另请参阅

适用于