-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathIEvent.cs
267 lines (240 loc) · 8.74 KB
/
IEvent.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace GalleryServerPro.Business.Interfaces
{
/// <summary>
/// Represents an application event or error that occurred during the execution of Gallery Server Pro code.
/// </summary>
public interface IEvent
{
/// <summary>
/// Gets or sets a value that uniquely identifies an application event.
/// </summary>
/// <value>A value that uniquely identifies an application event.</value>
int EventId
{
get;
set;
}
/// <summary>
/// Gets or sets the type of the event.
/// </summary>
/// <value>The type of the event.</value>
EventType EventType
{
get;
set;
}
/// <summary>
/// Gets the ID of the gallery that is the source of this event.
/// </summary>
/// <value>The ID of the gallery that is the source of this event</value>
int GalleryId
{
get;
}
/// <summary>
/// Gets the UTC date and time the event occurred. Guaranteed to not be null.
/// </summary>
/// <value>The date and time the event occurred.</value>
System.DateTime TimestampUtc
{
get;
}
/// <summary>
/// Gets the message associated with the event. Guaranteed to not be null.
/// </summary>
/// <value>The message associated with the event.</value>
string Message
{
get;
}
/// <summary>
/// Gets the data associated with the event. When <see cref="EventType" /> is <see cref="Business.EventType.Error" />,
/// any items in the exception data are added. Guaranteed to not be null.
/// </summary>
/// <value>The data associate with the exception.</value>
List<KeyValuePair<string, string>> EventData
{
get;
}
/// <summary>
/// Gets the type of the exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. Guaranteed to not be null.
/// </summary>
/// <value>The type of the exception.</value>
string ExType
{
get;
}
/// <summary>
/// Gets the source of the exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. Guaranteed to not be null.
/// </summary>
/// <value>The source of the exception.</value>
string ExSource
{
get;
}
/// <summary>
/// Gets the target site of the exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. Guaranteed to not be null.
/// </summary>
/// <value>The target site of the exception.</value>
string ExTargetSite
{
get;
}
/// <summary>
/// Gets the stack trace of the exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. Guaranteed to not be null.
/// </summary>
/// <value>The stack trace of the exception.</value>
string ExStackTrace
{
get;
}
/// <summary>
/// Gets the type of the inner exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. Guaranteed to not be null.
/// </summary>
/// <value>The type of the inner exception.</value>
string InnerExType
{
get;
}
/// <summary>
/// Gets the message of the inner exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. Guaranteed to not be null.
/// </summary>
/// <value>The message of the inner exception.</value>
string InnerExMessage
{
get;
}
/// <summary>
/// Gets the source of the inner exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. Guaranteed to not be null.
/// </summary>
/// <value>The source of the inner exception.</value>
string InnerExSource
{
get;
}
/// <summary>
/// Gets the target site of the inner exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. Guaranteed to not be null.
/// </summary>
/// <value>The target site of the inner exception.</value>
string InnerExTargetSite
{
get;
}
/// <summary>
/// Gets the stack trace of the inner exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. Guaranteed to not be null.
/// </summary>
/// <value>The stack trace of the inner exception.</value>
string InnerExStackTrace
{
get;
}
/// <summary>
/// Gets the data associated with the inner exception. Contains a value only when <see cref="EventType" />
/// is <see cref="Business.EventType.Error" />. This is extracted from <see cref="System.Exception.Data"/>.
/// Guaranteed to not be null.
/// </summary>
/// <value>The data associate with the inner exception.</value>
ReadOnlyCollection<KeyValuePair<string, string>> InnerExData
{
get;
}
/// <summary>
/// Gets the URL of the page where the event occurred. Guaranteed to not be null.
/// </summary>
/// <value>The URL of the page where the event occurred.</value>
string Url
{
get;
}
/// <summary>
/// Gets the HTTP user agent where the event occurred. Guaranteed to not be null.
/// </summary>
/// <value>The HTTP user agent where the event occurred.</value>
string HttpUserAgent
{
get;
}
/// <summary>
/// Gets the form variables from the web page where the event occurred. Guaranteed to not be null.
/// </summary>
/// <value>The form variables from the web page where the event occurred.</value>
ReadOnlyCollection<KeyValuePair<string, string>> FormVariables
{
get;
}
/// <summary>
/// Gets the cookies from the web page where the event occurred. Guaranteed to not be null.
/// </summary>
/// <value>The cookies from the web page where the event occurred.</value>
ReadOnlyCollection<KeyValuePair<string, string>> Cookies
{
get;
}
/// <summary>
/// Gets the session variables from the web page where the event occurred. Guaranteed to not be null.
/// </summary>
/// <value>The session variables from the web page where the event occurred.</value>
ReadOnlyCollection<KeyValuePair<string, string>> SessionVariables
{
get;
}
/// <summary>
/// Gets the server variables from the web page where the event occurred. Guaranteed to not be null.
/// </summary>
/// <value>The server variables from the web page where the event occurred.</value>
ReadOnlyCollection<KeyValuePair<string, string>> ServerVariables
{
get;
}
/// <summary>
/// Gets the CSS class definitions that can be used to style the HTML generated by the HTML methods in this object.
/// </summary>
/// <value>The CSS class definitions that can be used to style the HTML generated by the HTML methods in this object.</value>
string CssStyles
{
get;
}
/// <summary>
/// Formats the name of the specified <paramref name="item"/> into an HTML paragraph tag. Example: If
/// <paramref name="item"/> = <see cref="EventItem.ExStackTrace" />, the text "Stack Trace" is returned as the content of the tag.
/// </summary>
/// <param name="item">The enum value to be used as the content of the paragraph element. It is HTML encoded.</param>
/// <returns>Returns an HTML paragraph tag.</returns>
string ToHtmlName(EventItem item);
/// <summary>
/// Formats the value of the specified <paramref name="item"/> into an HTML paragraph tag. Example: If
/// <paramref name="item"/> = <see cref="EventItem.ExStackTrace" />, the action stack trace data associated with the current event
/// is returned as the content of the tag. If present, line breaks (\r\n) are converted to <br /> tags.
/// </summary>
/// <param name="item">The enum value indicating the event item to be used as the content of the paragraph element.
/// The text is HTML encoded.</param>
/// <returns>Returns an HTML paragraph tag.</returns>
string ToHtmlValue(EventItem item);
/// <summary>
/// Generate HTML containing detailed information about the application event. Does not include the outer html
/// and body tag. The HTML may contain references to CSS classes for formatting purposes, so be sure to include
/// these CSS definitions in the containing web page. These CSS definitions can be accessed through the
/// <see cref="CssStyles"/> property.
/// </summary>
/// <returns>Returns an HTML formatted string containing detailed information about the exception.</returns>
string ToHtml();
/// <summary>
/// Generate a complete HTML page containing detailed information about the application event. Includes the outer html
/// and body tag, including definitions for the CSS classes that are referenced within the body. Does not depend
/// on external style sheets or other resources. This method can be used to generate the body of an HTML e-mail.
/// </summary>
/// <returns>Returns an HTML formatted string containing detailed information about the exception.</returns>
string ToHtmlPage();
}
}