Description
LckResult represents the outcome of an operation in LckService. Instead of throwing exceptions, methods return this structured result type, which contains a success flag, an optional error code, a descriptive message, and a value produced by the operation.
Usage
WithLckResult, always check the Success property first. If it’s true, use the value from Result (in generic cases). If it’s false, handle the failure by checking the Error code and reading the Message for context.
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. |