Interface IMessageResult
Represents the result of message processing operations, including success status and detailed failure information.
public interface IMessageResult
- Extension Methods
Properties
AuthorizationResult
Gets the authorization result associated with this message result.
object? AuthorizationResult { get; }
Property Value
Disposition
Gets a value describing how this result was produced — whether a handler ran, or the operation was satisfied without one.
MessageDisposition Disposition { get; }
Property Value
- MessageDisposition
Handled unless an implementation states otherwise.
Remarks
Succeeded answers whether the operation failed; this answers what produced the outcome, and the two are independent. A cached result and a suppressed duplicate both succeed with no handler invocation, so a caller that records completion on the strength of Succeeded alone can mark a message complete that nothing handled. Implementations that run a handler need not override this.
This is the only member describing how the result was produced. A second boolean "was this a cache hit" member is deliberately absent: two members answering one question can disagree, and a boolean cannot express a third state — a suppressed duplicate would read as a genuine handled result.
ErrorMessage
Gets the error message when the operation fails, or null when successful.
string? ErrorMessage { get; }
Property Value
ProblemDetails
Gets the problem details when the operation fails, providing structured error information.
IMessageProblemDetails? ProblemDetails { get; }
Property Value
- IMessageProblemDetails
The problem details when the operation fails; otherwise, null.
Succeeded
Gets a value indicating whether the message processing operation completed successfully.
bool Succeeded { get; }
Property Value
UntypedReturnValue
Gets the return value as an untyped object, or null when the result carries no value.
object? UntypedReturnValue { get; }
Property Value
Remarks
Provides a non-generic accessor to the typed ReturnValue. Because
IMessageResult<T> is covariant only for reference types, a value-type result
(e.g. IMessageResult<int>) is not assignable to IMessageResult<object>;
this accessor lets consumers read the (boxed) return value without knowing T.
ValidationResult
Gets the validation result associated with this message result.
object? ValidationResult { get; }