Class Function
Provides extension methods for delegates Function<TArgs, TResult> and Function<T, TArgs, TResult>.
Inherited Members
Namespace: DotNext
Assembly: DotNext.Reflection.dll
Syntax
public static class Function
Methods
| Improve this Doc View SourceArgList<TArgs, TResult>(Function<TArgs, TResult>)
Allocates list of arguments on the stack.
Declaration
public static TArgs ArgList<TArgs, TResult>(this Function<TArgs, TResult> function)
where TArgs : struct
Parameters
Type | Name | Description |
---|---|---|
Function<TArgs, TResult> | function | The function instance. |
Returns
Type | Description |
---|---|
TArgs | Allocated list of arguments. |
Type Parameters
Name | Description |
---|---|
TArgs | The type representing list of arguments. |
TResult | The return type of the function. |
ArgList<T, TArgs, TResult>(Function<T, TArgs, TResult>)
Allocates list of arguments on the stack.
Declaration
public static TArgs ArgList<T, TArgs, TResult>(this Function<T, TArgs, TResult> function)
where TArgs : struct
Parameters
Type | Name | Description |
---|---|---|
Function<T, TArgs, TResult> | function | The function instance. |
Returns
Type | Description |
---|---|
TArgs | Allocated list of arguments. |
Type Parameters
Name | Description |
---|---|
T | Type of explicit |
TArgs | The type representing list of arguments. |
TResult | The return type of the function. |
Bind<T, TArgs, TResult>(Function<T, TArgs, TResult>, T)
Converts Function<T, TArgs, TResult> into Function<TArgs, TResult> through capturing of the first argument of Function<T, TArgs, TResult> delegate.
Declaration
public static Function<TArgs, TResult> Bind<T, TArgs, TResult>(this Function<T, TArgs, TResult> function, T this)
where TArgs : struct
Parameters
Type | Name | Description |
---|---|---|
Function<T, TArgs, TResult> | function | The function to be converted. |
T | this | The first argument to be captured. |
Returns
Type | Description |
---|---|
Function<TArgs, TResult> | The function instance. |
Type Parameters
Name | Description |
---|---|
T | Type of instance to be passed into underlying method. |
TArgs | Type of structure with function arguments allocated on the stack. |
TResult | Type of function return value. |
Capture<T, TArgs, TResult>(Function<T, TArgs, TResult>, T)
Converts Function<T, TArgs, TResult> into Function<TArgs, TResult> through capturing of the first argument of Function<T, TArgs, TResult> delegate.
Declaration
[Obsolete("Use Bind method instead", true)]
public static Function<TArgs, TResult> Capture<T, TArgs, TResult>(Function<T, TArgs, TResult> function, T this)
where TArgs : struct
Parameters
Type | Name | Description |
---|---|---|
Function<T, TArgs, TResult> | function | The function to be converted. |
T | this | The first argument to be captured. |
Returns
Type | Description |
---|---|
Function<TArgs, TResult> | The function instance. |
Type Parameters
Name | Description |
---|---|
T | Type of instance to be passed into underlying method. |
TArgs | Type of structure with function arguments allocated on the stack. |
TResult | Type of function return value. |
Invoke<TResult>(Function<ValueTuple, TResult>)
Invokes function.
Declaration
public static TResult Invoke<TResult>(this Function<ValueTuple, TResult> function)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple, TResult> | function | The function to be invoked. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
TResult | The type of function return value. |
Invoke<T, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(Function<T, (T1, T2, T3, T4, T5, T6, T7, T8), TResult>, T, T1, T2, T3, T4, T5, T6, T7, T8)
Invokes function.
Declaration
public static TResult Invoke<T, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(this Function<T, (T1, T2, T3, T4, T5, T6, T7, T8), TResult> function, in T instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8>>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
T7 | arg7 | The seventh function argument. |
T8 | arg8 | The eighth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
T7 | The type of the seventh function argument. |
T8 | The type of the eighth function argument. |
TResult | The type of function return value. |
Invoke<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(Function<(T1, T2, T3, T4, T5, T6, T7, T8, T9), TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9)
Invokes function.
Declaration
public static TResult Invoke<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(this Function<(T1, T2, T3, T4, T5, T6, T7, T8, T9), TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8, T9>>, TResult> | function | The function to be invoked. |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
T7 | arg7 | The seventh function argument. |
T8 | arg8 | The eighth function argument. |
T9 | arg9 | The ninth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
T7 | The type of the seventh function argument. |
T8 | The type of the eighth function argument. |
T9 | The type of the ninth function argument. |
TResult | The type of function return value. |
Invoke<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(Function<T, (T1, T2, T3, T4, T5, T6, T7, T8, T9), TResult>, T, T1, T2, T3, T4, T5, T6, T7, T8, T9)
Invokes function.
Declaration
public static TResult Invoke<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(this Function<T, (T1, T2, T3, T4, T5, T6, T7, T8, T9), TResult> function, in T instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8, T9>>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
T7 | arg7 | The seventh function argument. |
T8 | arg8 | The eighth function argument. |
T9 | arg9 | The ninth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
T7 | The type of the seventh function argument. |
T8 | The type of the eighth function argument. |
T9 | The type of the ninth function argument. |
TResult | The type of function return value. |
Invoke<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(Function<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
Invokes function.
Declaration
public static TResult Invoke<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(this Function<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8, T9, T10>>, TResult> | function | The function to be invoked. |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
T7 | arg7 | The seventh function argument. |
T8 | arg8 | The eighth function argument. |
T9 | arg9 | The ninth function argument. |
T10 | arg10 | The tenth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
T7 | The type of the seventh function argument. |
T8 | The type of the eighth function argument. |
T9 | The type of the ninth function argument. |
T10 | The type of the tenth function argument. |
TResult | The type of function return value. |
Invoke<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(Function<T, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), TResult>, T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
Invokes function.
Declaration
public static TResult Invoke<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(this Function<T, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), TResult> function, in T instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8, T9, T10>>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
T7 | arg7 | The seventh function argument. |
T8 | arg8 | The eighth function argument. |
T9 | arg9 | The ninth function argument. |
T10 | arg10 | The tenth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
T7 | The type of the seventh function argument. |
T8 | The type of the eighth function argument. |
T9 | The type of the ninth function argument. |
T10 | The type of the tenth function argument. |
TResult | The type of function return value. |
Invoke<T, TResult>(Function<T, ValueTuple, TResult>, T)
Invokes function.
Declaration
public static TResult Invoke<T, TResult>(this Function<T, ValueTuple, TResult> function, in T instance)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple, TResult> | function | The function to be invoked. |
T | instance | Explicit |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
TResult | The type of function return value. |
Invoke<TParam, TResult>(Function<(TParam), TResult>, TParam)
Invokes function.
Declaration
public static TResult Invoke<TParam, TResult>(this Function<(TParam), TResult> function, TParam arg)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<TParam>, TResult> | function | The function to be invoked. |
TParam | arg | The first function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
TParam | The type of the first function argument. |
TResult | The type of function return value. |
Invoke<T, TParam, TResult>(Function<T, (TParam), TResult>, T, TParam)
Invokes function.
Declaration
public static TResult Invoke<T, TParam, TResult>(this Function<T, (TParam), TResult> function, in T instance, TParam arg)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<TParam>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
TParam | arg | The first function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
TParam | The type of the first function argument. |
TResult | The type of function return value. |
Invoke<T1, T2, TResult>(Function<(T1, T2), TResult>, T1, T2)
Invokes function.
Declaration
public static TResult Invoke<T1, T2, TResult>(this Function<(T1, T2), TResult> function, T1 arg1, T2 arg2)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<T1, T2>, TResult> | function | The function to be invoked. |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
TResult | The type of function return value. |
Invoke<T, T1, T2, TResult>(Function<T, (T1, T2), TResult>, T, T1, T2)
Invokes function.
Declaration
public static TResult Invoke<T, T1, T2, TResult>(this Function<T, (T1, T2), TResult> function, in T instance, T1 arg1, T2 arg2)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<T1, T2>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
TResult | The type of function return value. |
Invoke<TParam1, TParam2, TParam3, TResult>(Function<(TParam1, TParam2, TParam3), TResult>, TParam1, TParam2, TParam3)
Invokes function.
Declaration
public static TResult Invoke<TParam1, TParam2, TParam3, TResult>(this Function<(TParam1, TParam2, TParam3), TResult> function, TParam1 arg1, TParam2 arg2, TParam3 arg3)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<TParam1, TParam2, TParam3>, TResult> | function | The function to be invoked. |
TParam1 | arg1 | The first function argument. |
TParam2 | arg2 | The second function argument. |
TParam3 | arg3 | The third function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
TParam1 | The type of the first function argument. |
TParam2 | The type of the second function argument. |
TParam3 | The type of the third function argument. |
TResult | The type of function return value. |
Invoke<T, T1, T2, T3, TResult>(Function<T, (T1, T2, T3), TResult>, T, T1, T2, T3)
Invokes function.
Declaration
public static TResult Invoke<T, T1, T2, T3, TResult>(this Function<T, (T1, T2, T3), TResult> function, in T instance, T1 arg1, T2 arg2, T3 arg3)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<T1, T2, T3>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
TResult | The type of function return value. |
Invoke<T1, T2, T3, T4, TResult>(Function<(T1, T2, T3, T4), TResult>, T1, T2, T3, T4)
Invokes function.
Declaration
public static TResult Invoke<T1, T2, T3, T4, TResult>(this Function<(T1, T2, T3, T4), TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<T1, T2, T3, T4>, TResult> | function | The function to be invoked. |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
TResult | The type of function return value. |
Invoke<T, T1, T2, T3, T4, TResult>(Function<T, (T1, T2, T3, T4), TResult>, T, T1, T2, T3, T4)
Invokes function.
Declaration
public static TResult Invoke<T, T1, T2, T3, T4, TResult>(this Function<T, (T1, T2, T3, T4), TResult> function, in T instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<T1, T2, T3, T4>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
TResult | The type of function return value. |
Invoke<T1, T2, T3, T4, T5, TResult>(Function<(T1, T2, T3, T4, T5), TResult>, T1, T2, T3, T4, T5)
Invokes function.
Declaration
public static TResult Invoke<T1, T2, T3, T4, T5, TResult>(this Function<(T1, T2, T3, T4, T5), TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<T1, T2, T3, T4, T5>, TResult> | function | The function to be invoked. |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
TResult | The type of function return value. |
Invoke<T, T1, T2, T3, T4, T5, TResult>(Function<T, (T1, T2, T3, T4, T5), TResult>, T, T1, T2, T3, T4, T5)
Invokes function.
Declaration
public static TResult Invoke<T, T1, T2, T3, T4, T5, TResult>(this Function<T, (T1, T2, T3, T4, T5), TResult> function, in T instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<T1, T2, T3, T4, T5>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
TResult | The type of function return value. |
Invoke<T1, T2, T3, T4, T5, T6, TResult>(Function<(T1, T2, T3, T4, T5, T6), TResult>, T1, T2, T3, T4, T5, T6)
Invokes function.
Declaration
public static TResult Invoke<T1, T2, T3, T4, T5, T6, TResult>(this Function<(T1, T2, T3, T4, T5, T6), TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<T1, T2, T3, T4, T5, T6>, TResult> | function | The function to be invoked. |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
TResult | The type of function return value. |
Invoke<T, T1, T2, T3, T4, T5, T6, TResult>(Function<T, (T1, T2, T3, T4, T5, T6), TResult>, T, T1, T2, T3, T4, T5, T6)
Invokes function.
Declaration
public static TResult Invoke<T, T1, T2, T3, T4, T5, T6, TResult>(this Function<T, (T1, T2, T3, T4, T5, T6), TResult> function, in T instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<T1, T2, T3, T4, T5, T6>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
TResult | The type of function return value. |
Invoke<T1, T2, T3, T4, T5, T6, T7, TResult>(Function<(T1, T2, T3, T4, T5, T6, T7), TResult>, T1, T2, T3, T4, T5, T6, T7)
Invokes function.
Declaration
public static TResult Invoke<T1, T2, T3, T4, T5, T6, T7, TResult>(this Function<(T1, T2, T3, T4, T5, T6, T7), TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<T1, T2, T3, T4, T5, T6, T7>, TResult> | function | The function to be invoked. |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
T7 | arg7 | The seventh function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
T7 | The type of the seventh function argument. |
TResult | The type of function return value. |
Invoke<T, T1, T2, T3, T4, T5, T6, T7, TResult>(Function<T, (T1, T2, T3, T4, T5, T6, T7), TResult>, T, T1, T2, T3, T4, T5, T6, T7)
Invokes function.
Declaration
public static TResult Invoke<T, T1, T2, T3, T4, T5, T6, T7, TResult>(this Function<T, (T1, T2, T3, T4, T5, T6, T7), TResult> function, in T instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
Parameters
Type | Name | Description |
---|---|---|
Function<T, ValueTuple<T1, T2, T3, T4, T5, T6, T7>, TResult> | function | The function to be invoked. |
T | instance | Explicit |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
T7 | arg7 | The seventh function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T | The type of the explicit |
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
T7 | The type of the seventh function argument. |
TResult | The type of function return value. |
Invoke<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(Function<(T1, T2, T3, T4, T5, T6, T7, T8), TResult>, T1, T2, T3, T4, T5, T6, T7, T8)
Invokes function.
Declaration
public static TResult Invoke<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(this Function<(T1, T2, T3, T4, T5, T6, T7, T8), TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8)
Parameters
Type | Name | Description |
---|---|---|
Function<ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8>>, TResult> | function | The function to be invoked. |
T1 | arg1 | The first function argument. |
T2 | arg2 | The second function argument. |
T3 | arg3 | The third function argument. |
T4 | arg4 | The fourth function argument. |
T5 | arg5 | The fifth function argument. |
T6 | arg6 | The sixth function argument. |
T7 | arg7 | The seventh function argument. |
T8 | arg8 | The eighth function argument. |
Returns
Type | Description |
---|---|
TResult | Function return value. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first function argument. |
T2 | The type of the second function argument. |
T3 | The type of the third function argument. |
T4 | The type of the fourth function argument. |
T5 | The type of the fifth function argument. |
T6 | The type of the sixth function argument. |
T7 | The type of the seventh function argument. |
T8 | The type of the eighth function argument. |
TResult | The type of function return value. |
TryInvoke<TArgs, TResult>(Function<TArgs, TResult>, TArgs)
Invokes function without throwing exception in case of its failure.
Declaration
public static Result<TResult> TryInvoke<TArgs, TResult>(this Function<TArgs, TResult> function, in TArgs arguments)
where TArgs : struct
Parameters
Type | Name | Description |
---|---|---|
Function<TArgs, TResult> | function | The function to invoke. |
TArgs | arguments | Function arguments in the form of public structure fields. |
Returns
Type | Description |
---|---|
Result<TResult> | Function return value. |
Type Parameters
Name | Description |
---|---|
TArgs | Type of structure with function arguments allocated on the stack. |
TResult | Type of function return value. |
TryInvoke<T, TArgs, TResult>(Function<T, TArgs, TResult>, T, TArgs)
Invokes function without throwing exception in case of its failure.
Declaration
public static Result<TResult> TryInvoke<T, TArgs, TResult>(this Function<T, TArgs, TResult> function, in T this, in TArgs arguments)
where TArgs : struct
Parameters
Type | Name | Description |
---|---|---|
Function<T, TArgs, TResult> | function | The function to invoke. |
T | this | Hidden |
TArgs | arguments | Function arguments in the form of public structure fields. |
Returns
Type | Description |
---|---|
Result<TResult> | Function return value. |
Type Parameters
Name | Description |
---|---|
T | Type of instance to be passed into underlying method. |
TArgs | Type of structure with function arguments allocated on the stack. |
TResult | Type of function return value. |