EventOpcode EventOpcode EventOpcode EventOpcode Enum

Definition

Defines the standard operation codes that the event source attaches to events.

public enum class EventOpcode
public enum EventOpcode
type EventOpcode = 
Public Enum EventOpcode
Inheritance

Fields

DataCollectionStart DataCollectionStart DataCollectionStart DataCollectionStart 3

A trace collection start event.

DataCollectionStop DataCollectionStop DataCollectionStop DataCollectionStop 4

A trace collection stop event.

Extension Extension Extension Extension 5

An extension event.

Info Info Info Info 0

An informational event.

Receive Receive Receive Receive 240

An event that is published when one activity in an application receives data.

Reply Reply Reply Reply 6

An event that is published after an activity in an application replies to an event.

Resume Resume Resume Resume 7

An event that is published after an activity in an application resumes from a suspended state. The event should follow an event that has the Suspend operation code.

Send Send Send Send 9

An event that is published when one activity in an application transfers data or system resources to another activity.

Start Start Start Start 1

An event that is published when an application starts a new transaction or activity. This operation code can be embedded within another transaction or activity when multiple events that have the Start code follow each other without an intervening event that has a Stop code.

Stop Stop Stop Stop 2

An event that is published when an activity or a transaction in an application ends. The event corresponds to the last unpaired event that has a Start operation code.

Suspend Suspend Suspend Suspend 8

An event that is published when an activity in an application is suspended.

Examples

The following example shows how to use the Start enumeration member to specify a start operation. This example is part of a larger example provided for the EventSource class.

[Event(3, Message = "loading page {1} activityID={0}", Opcode = EventOpcode.Start, 
    Task = Tasks.Page, Keywords = Keywords.Page, Level = EventLevel.Informational)]
public void PageStart(int ID, string url) { if (IsEnabled()) WriteEvent(3, ID, url); }
<[Event](3, Message:="loading page {1} activityID={0}", Opcode:=EventOpcode.Start, Task:=Tasks.Page, Keywords:=Keywords.Page, Level:=EventLevel.Informational)> _
Public Sub PageStart(ByVal ID As Integer, ByVal url As String)
    If IsEnabled() Then
        WriteEvent(3, ID, url)
    End If
End Sub 'PageStart

The following example shows how to use the Stop enumeration member to specify a stop operation. This example is part of a larger example provided for the EventSource class.

[Event(4, Opcode = EventOpcode.Stop, Task = Tasks.Page, Keywords = Keywords.Page, Level = EventLevel.Informational)]
public void PageStop(int ID) { if (IsEnabled()) WriteEvent(4, ID); }
<[Event](4, Opcode:=EventOpcode.Stop, Task:=Tasks.Page, Keywords:=Keywords.Page, Level:=EventLevel.Informational)> _
Public Sub PageStop(ByVal ID As Integer)
    If IsEnabled() Then
        WriteEvent(4, ID)
    End If
End Sub 'PageStop

Applies to