Merge pull request #2799 from BrzVlad/fix-conc-card-clean
[mono.git] / mcs / class / corlib / System.Diagnostics.Tracing / EventWrittenEventArgs.cs
1 //
2 // EventWrittenEventArgs.cs
3 //
4 // Authors:
5 //      Frederik Carlier  <frederik.carlier@quamotion.mobi>
6 //
7 // Copyright (C) 2015 Quamotion (http://quamotion.mobi)
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
16 //
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28
29 using System.Collections.Generic;
30 using System.Collections.ObjectModel;
31
32 namespace System.Diagnostics.Tracing
33 {
34         public class EventWrittenEventArgs : EventArgs
35         {
36                 internal EventWrittenEventArgs (EventSource eventSource)
37                 {
38                         this.EventSource = eventSource;
39                 }
40
41                 public Guid ActivityId
42                 {
43                         get { return EventSource.CurrentThreadActivityId; }
44                 }
45
46                 public EventChannel Channel
47                 {
48                         get { return EventChannel.None; }
49                 }
50
51                 public int EventId
52                 {
53                         get;
54                         internal set;
55                 }
56
57                 public string EventName
58                 {
59                         get;
60                         internal set;
61                 }
62
63                 public EventSource EventSource
64                 {
65                         get;
66                         private set;
67                 }
68
69                 public EventKeywords Keywords
70                 {
71                         get { return EventKeywords.None; }
72                 }
73
74                 public EventLevel Level
75                 {
76                         get { return EventLevel.LogAlways; }
77                 }
78
79                 public string Message
80                 {
81                         get;
82                         internal set;
83                 }
84
85                 public EventOpcode Opcode
86                 {
87                         get { return EventOpcode.Info; }
88                 }
89
90                 public ReadOnlyCollection<object> Payload
91                 {
92                         get;
93                         internal set;
94                 }
95
96                 public ReadOnlyCollection<string> PayloadNames
97                 {
98                         get;
99                         internal set;
100                 }
101
102                 public Guid RelatedActivityId
103                 {
104                         get;
105                         internal set;
106                 }
107
108                 public EventTags Tags
109                 {
110                         get { return EventTags.None; }
111                 }
112
113                 public EventTask Task
114                 {
115                         get { return EventTask.None; }
116                 }
117
118                 public byte Version
119                 {
120                         get { return 0; }
121                 }
122         }
123 }
124