Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NotificationResponse.cs
1using System;
3
5{
10 {
15 {
16 this.ServerError = false;
17 this.TransmissionError = false;
18 this.Ok = true;
19 this.Error = false;
20 this.ErrorMessage = string.Empty;
21 this.Exception = null;
22 }
23
29 : this((Exception)ex)
30 {
31 this.ServerError = true;
32 this.TransmissionError = false;
33 }
34
41 : this((Exception)ex)
42 {
43 this.ServerError = true;
44 this.TransmissionError = false;
45 this.ErrorMessage = ErrorMessage;
46 }
47
53 {
54 this.ServerError = false;
55 this.TransmissionError = true;
56 this.Ok = false;
57 this.Error = true;
58 this.ErrorMessage = ErrorMessage;
59 this.Exception = ex;
60 }
61
65 public bool Ok { get; private set; }
66
70 public bool Error { get; private set; }
71
75 public bool ServerError { get; private set; }
76
80 public bool TransmissionError { get; private set; }
81
85 public string ErrorMessage { get; private set; }
86
90 public Exception Exception { get; private set; }
91 }
92}
Exception class for web exceptions.
Definition: WebException.cs:11
Firebase response to sending a notification message.
bool TransmissionError
If error occurred during transmission.
bool Ok
If notification was successfully sent.
NotificationResponse(Exception ex)
Error occurred while attempting to send notification.
bool Error
If notification was unable to be sent.
NotificationResponse(WebException ex, string ErrorMessage)
Error returned from server.
bool ServerError
If error was returned by server.
NotificationResponse(WebException ex)
Error returned from server.
string ErrorMessage
Any error message, if Error is true.
Exception Exception
Any exception object, if Error is true.