Description
LckResult is the standard return type for LckService operations. Instead of throwing exceptions, methods return this structured result containing a success flag, optional error code, descriptive message, and the operation’s value. It serves the same purpose as Result<T> in LckCore but is used by the higher-level service layer.
Usage
UseLckResult whenever you call an LckService method. Always check Success before accessing the value.
References
Properties
| Name | Type | Description |
|---|---|---|
| Success | bool | Indicates whether the operation was successful. |
| Message | string | Provides an optional message, typically used for error information. |
| Error | LckError? | Contains the error code or type if the operation failed. |
| Result | T | The result value of the operation if successful; default value of T otherwise. |
See Also
- Result<T> — Similar result type used by LckCore methods
- LckError — Error codes returned in the Error property
- LckService — Service class whose methods return LckResult