Class Error<TObject, TKey>
- Namespace
- DynamicData.Kernel
- Assembly
- DynamicData.dll
An error container used to report errors from within dynamic data operators.
public sealed class Error<TObject, TKey> : IKeyValue<TObject, TKey>, IKey<TKey>, IEquatable<Error<TObject, TKey>> where TKey : notnull
Type Parameters
TObject
The type of the object.
TKey
The type of the key.
- Inheritance
-
Error<TObject, TKey>
- Implements
-
IKeyValue<TObject, TKey>IKey<TKey>IEquatable<Error<TObject, TKey>>
Remarks
Initializes a new instance of the Error<TObject, TKey> class.
Constructors
Error(Exception?, TObject, TKey)
An error container used to report errors from within dynamic data operators.
public Error(Exception? exception, TObject value, TKey key)
Parameters
exception
ExceptionThe exception that caused the error.
value
TObjectThe value for the error.
key
TKeyThe key for the error.
Remarks
Initializes a new instance of the Error<TObject, TKey> class.
Properties
Exception
Gets the exception.
public Exception? Exception { get; }
Property Value
Key
Gets the key.
public TKey Key { get; }
Property Value
- TKey
Value
Gets the object.
public TObject Value { get; }
Property Value
- TObject
Methods
Equals(Error<TObject, TKey>?)
public bool Equals(Error<TObject, TKey>? other)
Parameters
other
Error<TObject, TKey>
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(Error<TObject, TKey>, Error<TObject, TKey>)
public static bool operator ==(Error<TObject, TKey> left, Error<TObject, TKey> right)
Parameters
Returns
operator !=(Error<TObject, TKey>, Error<TObject, TKey>)
public static bool operator !=(Error<TObject, TKey> left, Error<TObject, TKey> right)