LoggingActivity.StopActivity Method

Definition

Overloads

StopActivity(String)

Marks the activity as closed/disposed and generates a stop event with the specified event name.

StopActivity(String, LoggingFields)

Marks the activity as closed/disposed and generates a stop event with the specified event name and fields.

StopActivity(String, LoggingFields, LoggingOptions)

Marks the activity as closed/disposed and generates a stop event with the specified event name, fields, and options.

StopActivity(String)

Marks the activity as closed/disposed and generates a stop event with the specified event name.

public:
 virtual void StopActivity(Platform::String ^ stopEventName) = StopActivity;
/// [Windows.Foundation.Metadata.Overload("StopActivity")]
void StopActivity(winrt::hstring const& stopEventName);
[Windows.Foundation.Metadata.Overload("StopActivity")]
public void StopActivity(string stopEventName);
function stopActivity(stopEventName)
Public Sub StopActivity (stopEventName As String)

Parameters

stopEventName
String

Platform::String

winrt::hstring

The name for the stop event.

Attributes

Remarks

The level for this event is the same as the level specified for the start event.

This function will fail if the activity has already been closed or disposed.

See also

Applies to

StopActivity(String, LoggingFields)

Marks the activity as closed/disposed and generates a stop event with the specified event name and fields.

public:
 virtual void StopActivity(Platform::String ^ stopEventName, LoggingFields ^ fields) = StopActivity;
/// [Windows.Foundation.Metadata.Overload("StopActivityWithFields")]
void StopActivity(winrt::hstring const& stopEventName, LoggingFields const& fields);
[Windows.Foundation.Metadata.Overload("StopActivityWithFields")]
public void StopActivity(string stopEventName, LoggingFields fields);
function stopActivity(stopEventName, fields)
Public Sub StopActivity (stopEventName As String, fields As LoggingFields)

Parameters

stopEventName
String

Platform::String

winrt::hstring

The name for this event.

fields
LoggingFields

The fields for this event. May be null.

Attributes

Remarks

Methods that accept a LoggingFields parameter also accept null. A null value is semantically equivalent to a newly-constructed or cleared LoggingFields object and represents an empty payload.

See also

Applies to

StopActivity(String, LoggingFields, LoggingOptions)

Marks the activity as closed/disposed and generates a stop event with the specified event name, fields, and options.

public:
 virtual void StopActivity(Platform::String ^ stopEventName, LoggingFields ^ fields, LoggingOptions ^ options) = StopActivity;
/// [Windows.Foundation.Metadata.Overload("StopActivityWithFieldsAndOptions")]
void StopActivity(winrt::hstring const& stopEventName, LoggingFields const& fields, LoggingOptions const& options);
[Windows.Foundation.Metadata.Overload("StopActivityWithFieldsAndOptions")]
public void StopActivity(string stopEventName, LoggingFields fields, LoggingOptions options);
function stopActivity(stopEventName, fields, options)
Public Sub StopActivity (stopEventName As String, fields As LoggingFields, options As LoggingOptions)

Parameters

stopEventName
String

Platform::String

winrt::hstring

The name for the stop event.

fields
LoggingFields

The fields for this event. May be null.

options
LoggingOptions

The options for this event. Pass null to use the default options. The options are for advanced scenarios. The default values are designed to work well for most events.

Attributes

Remarks

If you pass LoggingOptions:

LoggingOptions.Keywords is ignored because the keywords for the stop event are based on the keywords for the start event.

LoggingOptions.Opcode is ignored because the opcode is always LoggingOptions.Stop for a Stop event.

LoggingOptions.ActivityId is ignored because the Id from this LoggingActivity is used.

LoggingOptions.RelatedActivityId is ignored because it is only used for the start event.

See also

Applies to