Breyta

Deila með


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
EventOpcode

Fields

Name Value Description
Info 0

An informational event.

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 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.

DataCollectionStart 3

A trace collection start event.

DataCollectionStop 4

A trace collection stop event.

Extension 5

An extension event.

Reply 6

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

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.

Suspend 8

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

Send 9

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

Receive 240

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

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

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

Applies to