| | | 1 | | using System; |
| | | 2 | | using System.Net; |
| | | 3 | | |
| | | 4 | | namespace ApplicationCore |
| | | 5 | | { |
| | | 6 | | public class PostCommentResult |
| | | 7 | | { |
| | 13 | 8 | | public HttpStatusCode HttpStatusCode { get; } |
| | 2 | 9 | | public Uri? RedirectUrl { get; } |
| | 13 | 10 | | public string Error { get; } |
| | 4 | 11 | | public Exception? Exception { get; } |
| | | 12 | | |
| | 13 | 13 | | public PostCommentResult(HttpStatusCode httpStatusCode, string error) |
| | 13 | 14 | | { |
| | 13 | 15 | | HttpStatusCode = httpStatusCode; |
| | 13 | 16 | | Error = error; |
| | 13 | 17 | | } |
| | | 18 | | |
| | | 19 | | public PostCommentResult(HttpStatusCode httpStatusCode) |
| | 4 | 20 | | : this(httpStatusCode, string.Empty) |
| | 4 | 21 | | { |
| | | 22 | | |
| | 4 | 23 | | } |
| | | 24 | | |
| | | 25 | | public PostCommentResult(HttpStatusCode httpStatusCode, string error, Exception exception) |
| | 4 | 26 | | : this(httpStatusCode, error) |
| | 4 | 27 | | { |
| | 4 | 28 | | Exception = exception; |
| | 4 | 29 | | } |
| | | 30 | | |
| | | 31 | | public PostCommentResult(HttpStatusCode httpStatusCode, Uri redirectUri) |
| | 2 | 32 | | : this(httpStatusCode) |
| | 2 | 33 | | { |
| | 2 | 34 | | RedirectUrl = redirectUri; |
| | 2 | 35 | | } |
| | | 36 | | } |
| | | 37 | | } |