Class Error
Represents an error.
Implements
Namespace: Sartorius.SAF.Validation
Assembly: Sartorius.SAF.dll
Syntax
[Serializable]
[SuppressMessage("Naming", "CA1716:Identifiers should not match keywords", Justification = "Breaking changes")]
public class Error : IError
Constructors
View SourceError(Guid)
Creates a new instance of the Error class with the specified error id.
Declaration
protected Error(Guid id)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | The error id. |
Remarks
Use this constructor when overriding ErrorText.
Error(Guid, object, string)
Creates a new instance of the Error class.
Declaration
public Error(Guid id, object source, string errorText)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | The error id. |
| object | source | The error source. |
| string | errorText | The error text. |
Error(Guid, string)
Creates a new instance of the Error class with the specified error id and error message.
Declaration
public Error(Guid id, string errorText)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | id | The error id. |
| string | errorText | The error text. |
Properties
View SourceErrorText
The error text.
Declaration
public virtual string ErrorText { get; }
Property Value
| Type | Description |
|---|---|
| string |
Id
The unique identifier of the error.
Declaration
public Guid Id { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
Methods
View SourceEquals(IError)
Determines whether the specified IError is equal to this instance.
Declaration
protected bool Equals(IError other)
Parameters
| Type | Name | Description |
|---|---|---|
| IError | other | The oth er IError to compare to this object. |
Returns
| Type | Description |
|---|---|
| bool |
|
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
View SourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
View SourceGetSourceId()
Gets a unique identifier of the error source as a hash code.
Declaration
public int? GetSourceId()
Returns
| Type | Description |
|---|---|
| int? | The unique identifier as hash code. |