Table of Contents

Method ToFunc

Namespace
SodaFlow.Functional
Assembly
SodaFlow.Functional.dll

ToFunc(Action)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<Unit> ToFunc(this Action action)

Parameters

action Action

The action to change.

Returns

Func<Unit>

A function which calls action and returns Value.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

ToFunc<T>(Action<T>)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T, Unit> ToFunc<T>(this Action<T> action)

Parameters

action Action<T>

The action to change.

Returns

Func<T, Unit>

A function which calls action with its argument and returns Value.

Type Parameters

T

The type of the argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

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

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, Unit> ToFunc<T1, T2>(this Action<T1, T2> action)

Parameters

action Action<T1, T2>

The action to change.

Returns

Func<T1, T2, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

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

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, Unit> ToFunc<T1, T2, T3>(this Action<T1, T2, T3> action)

Parameters

action Action<T1, T2, T3>

The action to change.

Returns

Func<T1, T2, T3, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

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

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, Unit> ToFunc<T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action)

Parameters

action Action<T1, T2, T3, T4>

The action to change.

Returns

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

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

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

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, Unit> ToFunc<T1, T2, T3, T4, T5>(this Action<T1, T2, T3, T4, T5> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

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

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, Unit> ToFunc<T1, T2, T3, T4, T5, T6>(this Action<T1, T2, T3, T4, T5, T6> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

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

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7>(this Action<T1, T2, T3, T4, T5, T6, T7> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

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

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, T8, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7, T8>(this Action<T1, T2, T3, T4, T5, T6, T7, T8> action)

Parameters

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

The action to change.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, T8, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

T8

The type of the eighth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9>(this Action<T1, T2, T3, T4, T5, T6, T7, T8, T9> action)

Parameters

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

The action to change.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

T8

The type of the eighth argument.

T9

The type of the ninth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> action)

Parameters

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

The action to change.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

T8

The type of the eighth argument.

T9

The type of the ninth argument.

T10

The type of the tenth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(this Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> action)

Parameters

action Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>

The action to change.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

T8

The type of the eighth argument.

T9

The type of the ninth argument.

T10

The type of the tenth argument.

T11

The type of the eleventh argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(this Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> action)

Parameters

action Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>

The action to change.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

T8

The type of the eighth argument.

T9

The type of the ninth argument.

T10

The type of the tenth argument.

T11

The type of the eleventh argument.

T12

The type of the twelfth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(this Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> action)

Parameters

action Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>

The action to change.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

T8

The type of the eighth argument.

T9

The type of the ninth argument.

T10

The type of the tenth argument.

T11

The type of the eleventh argument.

T12

The type of the twelfth argument.

T13

The type of the thirteenth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(this Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> action)

Parameters

action Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>

The action to change.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

T8

The type of the eighth argument.

T9

The type of the ninth argument.

T10

The type of the tenth argument.

T11

The type of the eleventh argument.

T12

The type of the twelfth argument.

T13

The type of the thirteenth argument.

T14

The type of the fourteenth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(this Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> action)

Parameters

action Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>

The action to change.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

T8

The type of the eighth argument.

T9

The type of the ninth argument.

T10

The type of the tenth argument.

T11

The type of the eleventh argument.

T12

The type of the twelfth argument.

T13

The type of the thirteenth argument.

T14

The type of the fourteenth argument.

T15

The type of the fifteenth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.

ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>)

Changes an action into a function that returns Unit. The result can go where a function that returns a value is necessary.

public static Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, Unit> ToFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(this Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> action)

Parameters

action Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>

The action to change.

Returns

Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, Unit>

A function which calls action with its arguments and returns Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

T3

The type of the third argument.

T4

The type of the fourth argument.

T5

The type of the fifth argument.

T6

The type of the sixth argument.

T7

The type of the seventh argument.

T8

The type of the eighth argument.

T9

The type of the ninth argument.

T10

The type of the tenth argument.

T11

The type of the eleventh argument.

T12

The type of the twelfth argument.

T13

The type of the thirteenth argument.

T14

The type of the fourteenth argument.

T15

The type of the fifteenth argument.

T16

The type of the sixteenth argument.

Remarks

This defers nothing. The function from this call runs action at each it is itself called.