Edit

Share via


ActivityEvent Constructors

Definition

Overloads

ActivityEvent(String)

Initializes a new activity event instance using the specified name and the current time as the event timestamp.

ActivityEvent(String, DateTimeOffset, ActivityTagsCollection)

Initializes a new activity event instance using the specified name, timestamp and tags.

ActivityEvent(String)

Source:
ActivityEvent.cs
Source:
ActivityEvent.cs
Source:
ActivityEvent.cs

Initializes a new activity event instance using the specified name and the current time as the event timestamp.

public:
 ActivityEvent(System::String ^ name);
public ActivityEvent (string name);
new System.Diagnostics.ActivityEvent : string -> System.Diagnostics.ActivityEvent
Public Sub New (name As String)

Parameters

name
String

The event name.

Applies to

ActivityEvent(String, DateTimeOffset, ActivityTagsCollection)

Source:
ActivityEvent.cs
Source:
ActivityEvent.cs
Source:
ActivityEvent.cs

Initializes a new activity event instance using the specified name, timestamp and tags.

public ActivityEvent (string name, DateTimeOffset timestamp = default, System.Diagnostics.ActivityTagsCollection? tags = default);
new System.Diagnostics.ActivityEvent : string * DateTimeOffset * System.Diagnostics.ActivityTagsCollection -> System.Diagnostics.ActivityEvent
Public Sub New (name As String, Optional timestamp As DateTimeOffset = Nothing, Optional tags As ActivityTagsCollection = Nothing)

Parameters

name
String

The event name.

timestamp
DateTimeOffset

The event timestamp. Timestamp must only be used for the events that happened in the past, not at the moment of this call.

tags
ActivityTagsCollection

The event tags.

Applies to