-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathFileNotFoundEventArgs.cs
More file actions
55 lines (49 loc) · 1.6 KB
/
FileNotFoundEventArgs.cs
File metadata and controls
55 lines (49 loc) · 1.6 KB
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
using System;
namespace Waher.Networking.HTTP
{
/// <summary>
/// Event arguments for file not found events.
/// </summary>
public class FileNotFoundEventArgs : EventArgs
{
private NotFoundException exception;
private readonly HttpRequest request;
private readonly HttpResponse response;
private readonly string fullPath;
/// <summary>
/// Event arguments for file not found events.
/// </summary>
/// <param name="Exception">Exception that will be returned to client.</param>
/// <param name="FullPath">Full path to requested file that was not found.</param>
/// <param name="Request">HTTP Request</param>
/// <param name="Response">HTTP Response</param>
public FileNotFoundEventArgs(NotFoundException Exception, string FullPath, HttpRequest Request, HttpResponse Response)
{
this.exception = Exception;
this.fullPath = FullPath;
this.request = Request;
this.response = Response;
}
/// <summary>
/// Exception that will be returned to client. Change, if a custom exception is to be returned. Set to null, if the
/// handler manages sending the response asynchronously, and does custom logging.
/// </summary>
public NotFoundException Exception
{
get => this.exception;
set => this.exception = value;
}
/// <summary>
/// Current request object.
/// </summary>
public HttpRequest Request => this.request;
/// <summary>
/// Current response object.
/// </summary>
public HttpResponse Response => this.response;
/// <summary>
/// Full path to requested file that was not found.
/// </summary>
public string FullPath => this.fullPath;
}
}