Table of Contents

Method ToAsyncFunc

Namespace
SodaFlow.Functional
Assembly
SodaFlow.Functional.dll

ToAsyncFunc(Func<Task>)

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

public static Func<Task<Unit>> ToAsyncFunc(this Func<Task> action)

Parameters

action Func<Task>

The action to change.

Returns

Func<Task<Unit>>

A function which calls action and, after it completes, produces Value.

Remarks

This defers nothing more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T>(Func<T, Task>)

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

public static Func<T, Task<Unit>> ToAsyncFunc<T>(this Func<T, Task> action)

Parameters

action Func<T, Task>

The action to change.

Returns

Func<T, Task<Unit>>

A function which calls action with its argument and, after it completes, produces Value.

Type Parameters

T

The type of the argument.

Remarks

This defers nothing more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2>(Func<T1, T2, Task>)

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

public static Func<T1, T2, Task<Unit>> ToAsyncFunc<T1, T2>(this Func<T1, T2, Task> action)

Parameters

action Func<T1, T2, Task>

The action to change.

Returns

Func<T1, T2, Task<Unit>>

A function which calls action with its arguments and, after it completes, produces Value.

Type Parameters

T1

The type of the first argument.

T2

The type of the second argument.

Remarks

This defers nothing more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3>(Func<T1, T2, T3, Task>)

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

public static Func<T1, T2, T3, Task<Unit>> ToAsyncFunc<T1, T2, T3>(this Func<T1, T2, T3, Task> action)

Parameters

action Func<T1, T2, T3, Task>

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4>(Func<T1, T2, T3, T4, Task>)

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

public static Func<T1, T2, T3, T4, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4>(this Func<T1, T2, T3, T4, Task> action)

Parameters

action Func<T1, T2, T3, T4, Task>

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5>(Func<T1, T2, T3, T4, T5, Task>)

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

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

Parameters

action Func<T1, T2, T3, T4, T5, Task>

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5, T6>(Func<T1, T2, T3, T4, T5, T6, Task>)

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

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

Parameters

action Func<T1, T2, T3, T4, T5, T6, Task>

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7>(Func<T1, T2, T3, T4, T5, T6, T7, Task>)

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

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

Parameters

action Func<T1, T2, T3, T4, T5, T6, T7, Task>

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8>(Func<T1, T2, T3, T4, T5, T6, T7, T8, Task>)

Changes an asynchronous action into a function that gives 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, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, Task> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, Task>)

Changes an asynchronous action into a function that gives 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, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, Task> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Task>)

Changes an asynchronous action into a function that gives 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, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Task> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, Task>)

Changes an asynchronous action into a function that gives 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, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, Task> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, Task>)

Changes an asynchronous action into a function that gives 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, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, Task> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Task>)

Changes an asynchronous action into a function that gives 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, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Task> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, Task>)

Changes an asynchronous action into a function that gives 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, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, Task> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

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

Changes an asynchronous action into a function that gives 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, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, Task> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.

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

Changes an asynchronous action into a function that gives 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, Task<Unit>> ToAsyncFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, Task> action)

Parameters

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

The action to change.

Returns

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

A function which calls action with its arguments and, after it completes, produces 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 more than the action defers. The function from this call runs action at each call, and its task completes when that action's does.