Class Failure
- Namespace
- Cuemon.Diagnostics
- Assembly
- Cuemon.Core.dll
Represents a failure model with detailed information about an exception.
public class Failure : IReadOnlyDictionary<string, object>, IReadOnlyCollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IEquatable<Failure>
- Inheritance
-
Failure
- Implements
Constructors
Failure(Exception, FaultSensitivityDetails)
Initializes a new instance of the Failure class.
public Failure(Exception exception, FaultSensitivityDetails sensitivity)
Parameters
exception
ExceptionThe Exception that represents the failure.
sensitivity
FaultSensitivityDetailsThe FaultSensitivityDetails of the fault.
Exceptions
- ArgumentNullException
Thrown when
exception
is null.
Properties
Data
Gets the data associated with the underlying exception.
public IDictionary<string, object> Data { get; }
Property Value
Message
Gets the message of the underlying exception.
public string Message { get; }
Property Value
Namespace
Gets the namespace of the underlying exception.
public string Namespace { get; }
Property Value
Source
Gets the source of the underlying exception.
public string Source { get; }
Property Value
Stack
Gets the stack trace of the underlying exception.
public IEnumerable<string> Stack { get; }
Property Value
Type
Gets the type of the underlying exception.
public string Type { get; }
Property Value
Methods
GetUnderlyingException()
Gets the underlying exception to this Failure.
public Exception GetUnderlyingException()
Returns
GetUnderlyingSensitivity()
Gets the underlying sensitivity details of this Failure.
public FaultSensitivityDetails GetUnderlyingSensitivity()
Returns
- FaultSensitivityDetails
The underlying sensitivity details of this Failure.
Explicit Interface Implementations
IEnumerable<KeyValuePair<String, Object>>.GetEnumerator()
IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator()
Returns
IReadOnlyCollection<KeyValuePair<String, Object>>.Count
int IReadOnlyCollection<KeyValuePair<string, object>>.Count { get; }
Returns
IReadOnlyDictionary<String, Object>.ContainsKey(String)
bool IReadOnlyDictionary<string, object>.ContainsKey(string key)
Parameters
key
String
Returns
IReadOnlyDictionary<String, Object>.Item[String]
object IReadOnlyDictionary<string, object>.this[string key] { get; }
Parameters
key
String
Returns
IReadOnlyDictionary<String, Object>.Keys
IEnumerable<string> IReadOnlyDictionary<string, object>.Keys { get; }
Returns
IReadOnlyDictionary<String, Object>.TryGetValue(String, out Object)
bool IReadOnlyDictionary<string, object>.TryGetValue(string key, out object value)
Parameters
Returns
IReadOnlyDictionary<String, Object>.Values
IEnumerable<object> IReadOnlyDictionary<string, object>.Values { get; }
Returns
IEnumerable.GetEnumerator()
IEnumerator IEnumerable.GetEnumerator()