Class EquatableException<T>
A base class for custom exceptions that implements IEquatable to allow for equality comparison.
Inherited Members
Namespace: Tableau.Migration
Assembly: Tableau.Migration.dll
Syntax
public abstract class EquatableException<T> : Exception, ISerializable, IEquatable<T> where T : EquatableException<T>
Type Parameters
Name | Description |
---|---|
T | The type of the derived exception class. |
Constructors
EquatableException()
Initializes a new instance of the EquatableException<T> class.
Declaration
protected EquatableException()
EquatableException(string)
Initializes a new instance of the EquatableException<T> class with a specified error message.
Declaration
protected EquatableException(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | The message that describes the error. |
EquatableException(string, Exception)
Initializes a new instance of the EquatableException<T> class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public EquatableException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
string | message | The error message that explains the reason for the exception. |
Exception | innerException | The exception that is the cause of the current exception. |
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
Equals(T?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(T? other)
Parameters
Type | Name | Description |
---|---|---|
T | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
EqualsCore(T)
Determines whether the specified exception is equal to the current exception. Derived classes can override this method to add additional comparison logic.
Declaration
protected virtual bool EqualsCore(T other)
Parameters
Type | Name | Description |
---|---|---|
T | other | The exception to compare with the current exception. |
Returns
Type | Description |
---|---|
bool | true if the specified exception is equal to the current exception; otherwise, false. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |