struct
Result
Same as TResult, but with no output object.
Public
Constructors
Result
Methods
IsSuccessful
Returns true if the result is one of the success states.
GetFullErrorMessage
Returns error message and additional error message as a combined string.
staticSuccess
Creates the success result object.
- status
- One of the successful result status code.
Returns: Newly created TResult object.
staticFail
Creates the fail result object.
- errorMessage
- Error message describing the failure.
- status
- One of the failure result status code.
- additionalErrorMessage
- Additional error message for information that cannot easily be stored in .
Returns: Newly created TResult object.
staticFail
Creates the fail result object by inheriting the status from another result object.
Other result object error message is appended in the additional error message.
- errorMessage
- Error message describing the failure.
- childResult
- Result from which to inherit the failure status and append the error message.
- additionalErrorMessage
- Additional error message for information that cannot easily be stored in . The other result's error message will be appended to this error message.
Returns: Newly created TResult object.
Fields
Status
ErrorMessage
AdditionalErrorMessage
Private
Constructors
Result
Result
Methods
staticCombineAdditionalErrorMessage
Combines error messages from two result objects into a string that can be used as an additional string object for the new result object.
- additionalErrorMessage
- Additional error message for the primary result object.
- childErrorMessage
- Error message from the child result object. Can be null.
- childAdditionalErrorMessage
- Additional error message from the child result object.
Returns: Combined string with all three error messages.
staticCombineErrorMessage
Combines the error message and additional error message into a single string.