Table of Contents

Class Lambda

Namespace
LfrlAnvil.Functional
Assembly
LfrlAnvil.Functional.dll

Contains various methods related to delegates and expression trees.

public static class Lambda
Inheritance
Lambda
Inherited Members

Fields

NoOp

Represents an Action that does nothing.

public static readonly Action NoOp

Field Value

Action

Methods

ExpressionOf<TReturn>(Expression<Func<TReturn>>)

Returns the provided expression func.

[Pure]
public static Expression<Func<TReturn>> ExpressionOf<TReturn>(Expression<Func<TReturn>> func)

Parameters

func Expression<Func<TReturn>>

Expression to return.

Returns

Expression<Func<TReturn>>

func.

Type Parameters

TReturn

Expression's return type.

ExpressionOf<T1, TReturn>(Expression<Func<T1, TReturn>>)

Returns the provided expression func.

[Pure]
public static Expression<Func<T1, TReturn>> ExpressionOf<T1, TReturn>(Expression<Func<T1, TReturn>> func)

Parameters

func Expression<Func<T1, TReturn>>

Expression to return.

Returns

Expression<Func<T1, TReturn>>

func.

Type Parameters

T1

Expression's first parameter's type.

TReturn

Expression's return type.

ExpressionOf<T1, T2, TReturn>(Expression<Func<T1, T2, TReturn>>)

Returns the provided expression func.

[Pure]
public static Expression<Func<T1, T2, TReturn>> ExpressionOf<T1, T2, TReturn>(Expression<Func<T1, T2, TReturn>> func)

Parameters

func Expression<Func<T1, T2, TReturn>>

Expression to return.

Returns

Expression<Func<T1, T2, TReturn>>

func.

Type Parameters

T1

Expression's first parameter's type.

T2

Expression's second parameter's type.

TReturn

Expression's return type.

ExpressionOf<T1, T2, T3, TReturn>(Expression<Func<T1, T2, T3, TReturn>>)

Returns the provided expression func.

[Pure]
public static Expression<Func<T1, T2, T3, TReturn>> ExpressionOf<T1, T2, T3, TReturn>(Expression<Func<T1, T2, T3, TReturn>> func)

Parameters

func Expression<Func<T1, T2, T3, TReturn>>

Expression to return.

Returns

Expression<Func<T1, T2, T3, TReturn>>

func.

Type Parameters

T1

Expression's first parameter's type.

T2

Expression's second parameter's type.

T3

Expression's third parameter's type.

TReturn

Expression's return type.

ExpressionOf<T1, T2, T3, T4, TReturn>(Expression<Func<T1, T2, T3, T4, TReturn>>)

Returns the provided expression func.

[Pure]
public static Expression<Func<T1, T2, T3, T4, TReturn>> ExpressionOf<T1, T2, T3, T4, TReturn>(Expression<Func<T1, T2, T3, T4, TReturn>> func)

Parameters

func Expression<Func<T1, T2, T3, T4, TReturn>>

Expression to return.

Returns

Expression<Func<T1, T2, T3, T4, TReturn>>

func.

Type Parameters

T1

Expression's first parameter's type.

T2

Expression's second parameter's type.

T3

Expression's third parameter's type.

T4

Expression's fourth parameter's type.

TReturn

Expression's return type.

ExpressionOf<T1, T2, T3, T4, T5, TReturn>(Expression<Func<T1, T2, T3, T4, T5, TReturn>>)

Returns the provided expression func.

[Pure]
public static Expression<Func<T1, T2, T3, T4, T5, TReturn>> ExpressionOf<T1, T2, T3, T4, T5, TReturn>(Expression<Func<T1, T2, T3, T4, T5, TReturn>> func)

Parameters

func Expression<Func<T1, T2, T3, T4, T5, TReturn>>

Expression to return.

Returns

Expression<Func<T1, T2, T3, T4, T5, TReturn>>

func.

Type Parameters

T1

Expression's first parameter's type.

T2

Expression's second parameter's type.

T3

Expression's third parameter's type.

T4

Expression's fourth parameter's type.

T5

Expression's fifth parameter's type.

TReturn

Expression's return type.

ExpressionOf<T1, T2, T3, T4, T5, T6, TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>>)

Returns the provided expression func.

[Pure]
public static Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>> ExpressionOf<T1, T2, T3, T4, T5, T6, TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>> func)

Parameters

func Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>>

Expression to return.

Returns

Expression<Func<T1, T2, T3, T4, T5, T6, TReturn>>

func.

Type Parameters

T1

Expression's first parameter's type.

T2

Expression's second parameter's type.

T3

Expression's third parameter's type.

T4

Expression's fourth parameter's type.

T5

Expression's fifth parameter's type.

T6

Expression's sixth parameter's type.

TReturn

Expression's return type.

ExpressionOf<T1, T2, T3, T4, T5, T6, T7, TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>>)

Returns the provided expression func.

[Pure]
public static Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>> ExpressionOf<T1, T2, T3, T4, T5, T6, T7, TReturn>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>> func)

Parameters

func Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>>

Expression to return.

Returns

Expression<Func<T1, T2, T3, T4, T5, T6, T7, TReturn>>

func.

Type Parameters

T1

Expression's first parameter's type.

T2

Expression's second parameter's type.

T3

Expression's third parameter's type.

T4

Expression's fourth parameter's type.

T5

Expression's fifth parameter's type.

T6

Expression's sixth parameter's type.

T7

Expression's seventh parameter's type.

TReturn

Expression's return type.

Of(Action)

Returns the provided action.

[Pure]
public static Action Of(Action action)

Parameters

action Action

Delegate to return.

Returns

Action

action.

Of<T1>(OutFunc<T1>)

Returns the provided func.

[Pure]
public static OutFunc<T1> Of<T1>(OutFunc<T1> func)

Parameters

func OutFunc<T1>

Delegate to return.

Returns

OutFunc<T1>

func.

Type Parameters

T1

Delegate's second out parameter's type.

Of<T1>(Action<T1>)

Returns the provided action.

[Pure]
public static Action<T1> Of<T1>(Action<T1> action)

Parameters

action Action<T1>

Delegate to return.

Returns

Action<T1>

action.

Type Parameters

T1

Delegate's first parameter's type.

Of<TReturn>(Func<TReturn>)

Returns the provided func.

[Pure]
public static Func<TReturn> Of<TReturn>(Func<TReturn> func)

Parameters

func Func<TReturn>

Delegate to return.

Returns

Func<TReturn>

func.

Type Parameters

TReturn

Delegate's return type.

Of<T1, T2>(OutFunc<T1, T2>)

Returns the provided func.

[Pure]
public static OutFunc<T1, T2> Of<T1, T2>(OutFunc<T1, T2> func)

Parameters

func OutFunc<T1, T2>

Delegate to return.

Returns

OutFunc<T1, T2>

func.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second out parameter's type.

Of<T1, T2>(Action<T1, T2>)

Returns the provided action.

[Pure]
public static Action<T1, T2> Of<T1, T2>(Action<T1, T2> action)

Parameters

action Action<T1, T2>

Delegate to return.

Returns

Action<T1, T2>

action.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

Of<T1, TReturn>(Func<T1, TReturn>)

Returns the provided func.

[Pure]
public static Func<T1, TReturn> Of<T1, TReturn>(Func<T1, TReturn> func)

Parameters

func Func<T1, TReturn>

Delegate to return.

Returns

Func<T1, TReturn>

func.

Type Parameters

T1

Delegate's first parameter's type.

TReturn

Delegate's return type.

Of<T1, T2, T3>(OutFunc<T1, T2, T3>)

Returns the provided func.

[Pure]
public static OutFunc<T1, T2, T3> Of<T1, T2, T3>(OutFunc<T1, T2, T3> func)

Parameters

func OutFunc<T1, T2, T3>

Delegate to return.

Returns

OutFunc<T1, T2, T3>

func.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third out parameter's type.

Of<T1, T2, T3>(Action<T1, T2, T3>)

Returns the provided action.

[Pure]
public static Action<T1, T2, T3> Of<T1, T2, T3>(Action<T1, T2, T3> action)

Parameters

action Action<T1, T2, T3>

Delegate to return.

Returns

Action<T1, T2, T3>

action.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

Of<T1, T2, TReturn>(Func<T1, T2, TReturn>)

Returns the provided func.

[Pure]
public static Func<T1, T2, TReturn> Of<T1, T2, TReturn>(Func<T1, T2, TReturn> func)

Parameters

func Func<T1, T2, TReturn>

Delegate to return.

Returns

Func<T1, T2, TReturn>

func.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

TReturn

Delegate's return type.

Of<T1, T2, T3, T4>(OutFunc<T1, T2, T3, T4>)

Returns the provided func.

[Pure]
public static OutFunc<T1, T2, T3, T4> Of<T1, T2, T3, T4>(OutFunc<T1, T2, T3, T4> func)

Parameters

func OutFunc<T1, T2, T3, T4>

Delegate to return.

Returns

OutFunc<T1, T2, T3, T4>

func.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

T4

Delegate's fourth out parameter's type.

Of<T1, T2, T3, T4>(Action<T1, T2, T3, T4>)

Returns the provided action.

[Pure]
public static Action<T1, T2, T3, T4> Of<T1, T2, T3, T4>(Action<T1, T2, T3, T4> action)

Parameters

action Action<T1, T2, T3, T4>

Delegate to return.

Returns

Action<T1, T2, T3, T4>

action.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

T4

Delegate's fourth parameter's type.

Of<T1, T2, T3, TReturn>(Func<T1, T2, T3, TReturn>)

Returns the provided func.

[Pure]
public static Func<T1, T2, T3, TReturn> Of<T1, T2, T3, TReturn>(Func<T1, T2, T3, TReturn> func)

Parameters

func Func<T1, T2, T3, TReturn>

Delegate to return.

Returns

Func<T1, T2, T3, TReturn>

func.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

TReturn

Delegate's return type.

Of<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>)

Returns the provided action.

[Pure]
public static Action<T1, T2, T3, T4, T5> Of<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5> action)

Parameters

action Action<T1, T2, T3, T4, T5>

Delegate to return.

Returns

Action<T1, T2, T3, T4, T5>

action.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

T4

Delegate's fourth parameter's type.

T5

Delegate's fifth parameter's type.

Of<T1, T2, T3, T4, TReturn>(Func<T1, T2, T3, T4, TReturn>)

Returns the provided func.

[Pure]
public static Func<T1, T2, T3, T4, TReturn> Of<T1, T2, T3, T4, TReturn>(Func<T1, T2, T3, T4, TReturn> func)

Parameters

func Func<T1, T2, T3, T4, TReturn>

Delegate to return.

Returns

Func<T1, T2, T3, T4, TReturn>

func.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

T4

Delegate's fourth parameter's type.

TReturn

Delegate's return type.

Of<T1, T2, T3, T4, T5, T6>(Action<T1, T2, T3, T4, T5, T6>)

Returns the provided action.

[Pure]
public static Action<T1, T2, T3, T4, T5, T6> Of<T1, T2, T3, T4, T5, T6>(Action<T1, T2, T3, T4, T5, T6> action)

Parameters

action Action<T1, T2, T3, T4, T5, T6>

Delegate to return.

Returns

Action<T1, T2, T3, T4, T5, T6>

action.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

T4

Delegate's fourth parameter's type.

T5

Delegate's fifth parameter's type.

T6

Delegate's sixth parameter's type.

Of<T1, T2, T3, T4, T5, TReturn>(Func<T1, T2, T3, T4, T5, TReturn>)

Returns the provided func.

[Pure]
public static Func<T1, T2, T3, T4, T5, TReturn> Of<T1, T2, T3, T4, T5, TReturn>(Func<T1, T2, T3, T4, T5, TReturn> func)

Parameters

func Func<T1, T2, T3, T4, T5, TReturn>

Delegate to return.

Returns

Func<T1, T2, T3, T4, T5, TReturn>

func.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

T4

Delegate's fourth parameter's type.

T5

Delegate's fifth parameter's type.

TReturn

Delegate's return type.

Of<T1, T2, T3, T4, T5, T6, T7>(Action<T1, T2, T3, T4, T5, T6, T7>)

Returns the provided action.

[Pure]
public static Action<T1, T2, T3, T4, T5, T6, T7> Of<T1, T2, T3, T4, T5, T6, T7>(Action<T1, T2, T3, T4, T5, T6, T7> action)

Parameters

action Action<T1, T2, T3, T4, T5, T6, T7>

Delegate to return.

Returns

Action<T1, T2, T3, T4, T5, T6, T7>

action.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

T4

Delegate's fourth parameter's type.

T5

Delegate's fifth parameter's type.

T6

Delegate's sixth parameter's type.

T7

Delegate's seventh parameter's type.

Of<T1, T2, T3, T4, T5, T6, TReturn>(Func<T1, T2, T3, T4, T5, T6, TReturn>)

Returns the provided func.

[Pure]
public static Func<T1, T2, T3, T4, T5, T6, TReturn> Of<T1, T2, T3, T4, T5, T6, TReturn>(Func<T1, T2, T3, T4, T5, T6, TReturn> func)

Parameters

func Func<T1, T2, T3, T4, T5, T6, TReturn>

Delegate to return.

Returns

Func<T1, T2, T3, T4, T5, T6, TReturn>

func.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

T4

Delegate's fourth parameter's type.

T5

Delegate's fifth parameter's type.

T6

Delegate's sixth parameter's type.

TReturn

Delegate's return type.

Of<T1, T2, T3, T4, T5, T6, T7, TReturn>(Func<T1, T2, T3, T4, T5, T6, T7, TReturn>)

Returns the provided func.

[Pure]
public static Func<T1, T2, T3, T4, T5, T6, T7, TReturn> Of<T1, T2, T3, T4, T5, T6, T7, TReturn>(Func<T1, T2, T3, T4, T5, T6, T7, TReturn> func)

Parameters

func Func<T1, T2, T3, T4, T5, T6, T7, TReturn>

Delegate to return.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, TReturn>

func.

Type Parameters

T1

Delegate's first parameter's type.

T2

Delegate's second parameter's type.

T3

Delegate's third parameter's type.

T4

Delegate's fourth parameter's type.

T5

Delegate's fifth parameter's type.

T6

Delegate's sixth parameter's type.

T7

Delegate's seventh parameter's type.

TReturn

Delegate's return type.