Table of Contents

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 Exception

The Exception that represents the failure.

sensitivity FaultSensitivityDetails

The 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

IDictionary<String, Object>

Message

Gets the message of the underlying exception.

public string Message { get; }

Property Value

String

Namespace

Gets the namespace of the underlying exception.

public string Namespace { get; }

Property Value

String

Source

Gets the source of the underlying exception.

public string Source { get; }

Property Value

String

Stack

Gets the stack trace of the underlying exception.

public IEnumerable<string> Stack { get; }

Property Value

IEnumerable<String>

Type

Gets the type of the underlying exception.

public string Type { get; }

Property Value

String

Methods

GetUnderlyingException()

Gets the underlying exception to this Failure.

public Exception GetUnderlyingException()

Returns

Exception

The underlying exception to this Failure.

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

IEnumerator<KeyValuePair<String, Object>>

IReadOnlyCollection<KeyValuePair<String, Object>>.Count

int IReadOnlyCollection<KeyValuePair<string, object>>.Count { get; }

Returns

Int32

IReadOnlyDictionary<String, Object>.ContainsKey(String)

bool IReadOnlyDictionary<string, object>.ContainsKey(string key)

Parameters

key String

Returns

Boolean

IReadOnlyDictionary<String, Object>.Item[String]

object IReadOnlyDictionary<string, object>.this[string key] { get; }

Parameters

key String

Returns

Object

IReadOnlyDictionary<String, Object>.Keys

IEnumerable<string> IReadOnlyDictionary<string, object>.Keys { get; }

Returns

IEnumerable<String>

IReadOnlyDictionary<String, Object>.TryGetValue(String, out Object)

bool IReadOnlyDictionary<string, object>.TryGetValue(string key, out object value)

Parameters

key String
value Object

Returns

Boolean

IReadOnlyDictionary<String, Object>.Values

IEnumerable<object> IReadOnlyDictionary<string, object>.Values { get; }

Returns

IEnumerable<Object>

IEnumerable.GetEnumerator()

IEnumerator IEnumerable.GetEnumerator()

Returns

IEnumerator