|
Crescendo SDK
|
Loading...
Searching...
No Matches
CrescendoDLL.SDKCore.Result< T > Class Template Reference
Represents the outcome of an operation, which can either be successful or a failure. More...
Inheritance diagram for CrescendoDLL.SDKCore.Result< T >:
Static Public Member Functions |
|
| static Result< T > | Create< T > (T? value) |
| Creates a new CrescendoDLL.SDKCore.Result<T> based on the provided value. If the value is not null, a successful CrescendoDLL.SDKCore.Result<T> is created. Otherwise, a failed CrescendoDLL.SDKCore.Result<T> with a null value error is created. |
|
| static Result | Failure (Error error) |
| Creates a new failed CrescendoDLL.SDKCore.Result with the specified error. |
|
| static Result< T > | Failure< T > (Error error) |
| Creates a new failed CrescendoDLL.SDKCore.Result<T> with the specified error. |
|
| static implicit | operator Result< T > (T? value) |
| Implicitly converts a nullable value of type T to a CrescendoDLL.SDKCore.Result<T>. If the value is not null, a successful CrescendoDLL.SDKCore.Result<T> is created. Otherwise, a failed CrescendoDLL.SDKCore.Result<T> with a null value error is created. |
|
| static Result | Success () |
| Creates a new successful CrescendoDLL.SDKCore.Result. |
|
| static Result< T > | Success< T > (T value) |
| Creates a new successful CrescendoDLL.SDKCore.Result<T> with the specified value. |
|
Protected Member Functions |
|
| Result (bool isSuccess, Error error) | |
| Initializes a new instance of the CrescendoDLL.SDKCore.Result class. |
|
Properties |
|
| Error | Error [get]
|
| Gets the error that occurred if the operation failed. |
|
| bool | IsFailure [get]
|
| Gets a value indicating whether the operation failed. |
|
| bool | IsSuccess [get]
|
| Gets a value indicating whether the operation was successful. |
|
| T | Value [get]
|
| Gets the value of the result if it is successful. |
|
Detailed Description
Represents the outcome of an operation, which can either be successful or a failure.
Represents the outcome of an operation with a value, which can either be successful or a failure.
- Template Parameters
-
T The type of the value.