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

With LckResult, 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

NameTypeDescription
SuccessboolIndicates whether the operation was successful.
MessagestringProvides an optional message, typically used for error information.
ErrorLckError?Contains the error code or type if the operation failed.
ResultTThe result value of the operation if successful; default value of T otherwise.