ComponentResultType Class
A result type: a success with an optional value, or an error with an optional value.
public sealed class ComponentResultType : ComponentValueType- Inheritance
ComponentValueTypeComponentResultType
Constructors
| Name | Description |
|---|---|
| ComponentResultType(ComponentValueType?, ComponentValueType?) | Initializes a new instance of the ComponentResultType class. |
ComponentResultType(ComponentValueType?, ComponentValueType?)
ComponentTypes.csInitializes a new instance of the ComponentResultType class.
public ComponentResultType(ComponentValueType? ok, ComponentValueType? error)Parameters
okComponentValueType?- The type of the value of a success, or null.
errorComponentValueType?- The type of the value of an error, or null.
Properties
| Name | Description |
|---|---|
| Error | Gets the type of the value of an error, or null. |
| Ok | Gets the type of the value of a success, or null. |
Error
ComponentTypes.csGets the type of the value of an error, or null.
public ComponentValueType? Error { get; }Property value
Gets the type of the value of a success, or null.
public ComponentValueType? Ok { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(ComponentValueType?) | Indicates whether the current object is equal to another object of the same type. |
| GetHashCode() | Serves as the default hash function. |
Equals(ComponentValueType?)
ComponentTypes.csIndicates whether the current object is equal to another object of the same type.
public override bool Equals(ComponentValueType? other)Parameters
otherComponentValueType?- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.