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
actionActionThe action to change.
Returns
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
actionAction<T>The action to change.
Returns
Type Parameters
TThe 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
actionAction<T1, T2>The action to change.
Returns
Type Parameters
T1The type of the first argument.
T2The 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
actionAction<T1, T2, T3>The action to change.
Returns
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The 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
actionAction<T1, T2, T3, T4>The action to change.
Returns
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The 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
actionAction<T1, T2, T3, T4, T5>The action to change.
Returns
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The 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
actionAction<T1, T2, T3, T4, T5, T6>The action to change.
Returns
- Func<T1, T2, T3, T4, T5, T6, Unit>
A function which calls
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The type of the seventh argument.
T8The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The type of the seventh argument.
T8The type of the eighth argument.
T9The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The type of the seventh argument.
T8The type of the eighth argument.
T9The type of the ninth argument.
T10The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The type of the seventh argument.
T8The type of the eighth argument.
T9The type of the ninth argument.
T10The type of the tenth argument.
T11The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The type of the seventh argument.
T8The type of the eighth argument.
T9The type of the ninth argument.
T10The type of the tenth argument.
T11The type of the eleventh argument.
T12The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The type of the seventh argument.
T8The type of the eighth argument.
T9The type of the ninth argument.
T10The type of the tenth argument.
T11The type of the eleventh argument.
T12The type of the twelfth argument.
T13The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The type of the seventh argument.
T8The type of the eighth argument.
T9The type of the ninth argument.
T10The type of the tenth argument.
T11The type of the eleventh argument.
T12The type of the twelfth argument.
T13The type of the thirteenth argument.
T14The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The type of the seventh argument.
T8The type of the eighth argument.
T9The type of the ninth argument.
T10The type of the tenth argument.
T11The type of the eleventh argument.
T12The type of the twelfth argument.
T13The type of the thirteenth argument.
T14The type of the fourteenth argument.
T15The 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
actionAction<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
actionwith its arguments and returns Value.
Type Parameters
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
T5The type of the fifth argument.
T6The type of the sixth argument.
T7The type of the seventh argument.
T8The type of the eighth argument.
T9The type of the ninth argument.
T10The type of the tenth argument.
T11The type of the eleventh argument.
T12The type of the twelfth argument.
T13The type of the thirteenth argument.
T14The type of the fourteenth argument.
T15The type of the fifteenth argument.
T16The type of the sixteenth argument.
Remarks
This defers nothing. The function from this call runs
action at each it is itself called.