forked from stevenh/HttpServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathErrorPageEventArgs.cs
41 lines (35 loc) · 1.15 KB
/
ErrorPageEventArgs.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
using System;
namespace HttpServer
{
/// <summary>
/// Arguments for <see cref="Server.ErrorPageRequested"/>.
/// </summary>
public class ErrorPageEventArgs : EventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="ErrorPageEventArgs"/> class.
/// </summary>
/// <param name="context">The context.</param>
public ErrorPageEventArgs(IHttpContext context)
{
Context = context;
}
internal IHttpContext Context { get; private set; }
/// <summary>
/// Gets or sets thrown exception
/// </summary>
public Exception Exception { get; internal set; }
/// <summary>
/// Gets or sets if error page was provided.
/// </summary>
public bool IsHandled { get; set; }
/// <summary>
/// Gets requested resource.
/// </summary>
public IRequest Request { get { return Context.Request; } }
/// <summary>
/// Gets response to send
/// </summary>
public IResponse Response { get{ return Context.Response;} }
}
}