Class Error
An error.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Error
Constructors
Error()
Initializes a new instance of the Error class.
Declaration
public Error()
Error(ErrorCode, Exception)
Initializes a new instance of the Error class.
Declaration
public Error(ErrorCode code, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
ErrorCode | code | The code. |
System.Exception | exception | The exception. |
Error(ErrorCode, String)
Initializes a new instance of the Error class.
Declaration
public Error(ErrorCode code, string message)
Parameters
Type | Name | Description |
---|---|---|
ErrorCode | code | The code. |
System.String | message | The message. |
Properties
Code
Gets or sets the code.
Declaration
public ErrorCode Code { get; set; }
Property Value
Type | Description |
---|---|
ErrorCode |
CodeValue
Gets or sets the code.
Declaration
public int CodeValue { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ErrorCode
Gets or sets the code.
Declaration
[Obsolete("Use Code instead.")]
public ErrorCode ErrorCode { get; set; }
Property Value
Type | Description |
---|---|
ErrorCode |
Exception
Gets or sets the exception.
Declaration
public Exception Exception { get; set; }
Property Value
Type | Description |
---|---|
System.Exception |
Message
Gets or sets the message.
Declaration
public string Message { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
FromJson(String)
Deserializes an instance from JSON.
Declaration
public static Error FromJson(string errorJson)
Parameters
Type | Name | Description |
---|---|---|
System.String | errorJson | The JSON to deserialize. |
Returns
Type | Description |
---|---|
Error | The deserialized error. |
GetDescription()
Gets the description for this Error.
Declaration
public virtual string GetDescription()
Returns
Type | Description |
---|---|
System.String |
ToJson()
Serializes this instance to JSON.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
System.String | The serialized JSON. |
ToJson(Error)
Serializes an instance to JSON.
Declaration
public static string ToJson(Error error)
Parameters
Type | Name | Description |
---|---|---|
Error | error | The error. |
Returns
Type | Description |
---|---|
System.String | The serialized JSON. |
ToString()
Returns the string representation of this error.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()