An immutable, lightweight, and memory efficient implementation of IResult that supports at most one error message.
More...
|
| static SimpleResult | Ok () |
| | Gets a cached successful result with no errors.
|
| static SimpleResult | Error () |
| | Gets a cached failed result with no error message.
|
| static SimpleResult | Error (string errorMessage) |
| | Creates a failed result with a single error message.
|
|
| bool | IsOk [get] |
| | Value indicating whether the operation was successful.
|
| IEnumerable< string > | Errors [get] |
| | Collection of error messages describing why the operation failed.
|
An immutable, lightweight, and memory efficient implementation of IResult that supports at most one error message.
◆ Error() [1/2]
| SimpleResult FileSurfer.Core.Models.SimpleResult.Error |
( |
| ) |
|
|
inlinestatic |
Gets a cached failed result with no error message.
- Returns
- Failed SimpleResult instance without error details.
◆ Error() [2/2]
| SimpleResult FileSurfer.Core.Models.SimpleResult.Error |
( |
string | errorMessage | ) |
|
|
inlinestatic |
Creates a failed result with a single error message.
- Parameters
-
| errorMessage | Error message describing the failure. |
- Returns
- Failed SimpleResult containing the provided error message.
◆ Ok()
| SimpleResult FileSurfer.Core.Models.SimpleResult.Ok |
( |
| ) |
|
|
inlinestatic |
Gets a cached successful result with no errors.
- Returns
- Successful SimpleResult instance.
◆ Errors
| IEnumerable<string> FileSurfer.Core.Models.SimpleResult.Errors |
|
get |
◆ IsOk
| bool FileSurfer.Core.Models.SimpleResult.IsOk |
|
get |
The documentation for this class was generated from the following file:
- /home/janecea/Documents/CODE/PROJECTS/FileSurfer/src/FileSurfer.Core/Models/IResult.cs