Anonymous types

Namespace containing short definitions of anonymous functions useful for older .NET environment.

These types are used internally by library.

String

Represents function that only output string.

public delegate string String();

State

Represents function that changes state.

public delegate TState State<TState>(TState input);

Function

Multiple definitions of generic function delegate.

Alternative for Func which doesn’t appear in old .NET versions.

public delegate TOut Function<TIn, TOut>(TIn input);
public delegate void Function<TIn>(TIn input);
public delegate void Function();

First type parameter is always related to the result, next ones for input parameters.

Energy.Base.Anonymous.Function<int, int, int> sum = (x, y) => x + y;

Event

Event function delegates.

public delegate void Event();
public delegate void Event<TEvent>(TEvent argument);