Table of Contents

Interface IExecutor<TIn, TOut>

Namespace
Executables
Assembly
executables.dll

Represents an executor that processes input and returns a result.

public interface IExecutor<in TIn, out TOut>

Type Parameters

TIn

Input type.

TOut

Output type.

Examples

IExecutor<string, Result<int>> executor =
  Executable.Create((string text) => int.Parse(text))
    .GetExecutor()
    .MapException((FormatException ex) => new InvalidOperationException("Invalid number", ex))
    .WithResult();

Remarks

Executor is the runtime layer of the library. It performs execution and is the place where policies, operators, context initialization, error handling, caching, and metrics are applied.

Obtain an executor from an executable and then attach runtime behavior such as operators, result wrapping, or exception mapping.

Methods

Execute(TIn)

Executes the operation for the specified input value.

TOut Execute(TIn input)

Parameters

input TIn

Input value.

Returns

TOut

Execution result.

See Also