Interface IResult
- Namespace
- FunctionalDdd
- Assembly
- FunctionalDdd.RailwayOrientedProgramming.dll
Non-generic base interface for result types, exposing success/failure state and error information.
public interface IResult
- Extension Methods
Remarks
This interface allows polymorphic handling of results without knowing the success value type. Use IResult<TValue> for typed access to the success value.
Properties
Error
Gets the error information if this is a failure result.
Error Error { get; }
Property Value
Exceptions
- InvalidOperationException
Thrown when accessed on a successful result.
IsFailure
Gets a value indicating whether this result represents a failure.
bool IsFailure { get; }
Property Value
- bool
trueif the result is a failure; otherwise,false.
IsSuccess
Gets a value indicating whether this result represents a successful outcome.
bool IsSuccess { get; }
Property Value
- bool
trueif the result is successful; otherwise,false.