Table of Contents

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

Error

An Error instance describing the failure.

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

true if 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

true if the result is successful; otherwise, false.