Show / Hide Table of Contents

Class Function

Provides extension methods for delegates Function<A, R> and Function<T, A, R>.

Inheritance
Object
Function
Namespace: DotNext
Assembly: DotNext.Reflection.dll
Syntax
public static class Function : object

Methods

| Improve this Doc View Source

ArgList<A, R>(Function<A, R>)

Allocates list of arguments on the stack.

Declaration
public static A ArgList<A, R>(this Function<A, R> function)

    where A : struct
Parameters
Type Name Description
Function<A, R> function

The function instance.

Returns
Type Description
A

Allocated list of arguments.

Type Parameters
Name Description
A

The type representing list of arguments.

R

The return type of the function.

| Improve this Doc View Source

ArgList<T, A, R>(Function<T, A, R>)

Allocates list of arguments on the stack.

Declaration
public static A ArgList<T, A, R>(this Function<T, A, R> function)

    where A : struct
Parameters
Type Name Description
Function<T, A, R> function

The function instance.

Returns
Type Description
A

Allocated list of arguments.

Type Parameters
Name Description
T

Type of explicit this argument.

A

The type representing list of arguments.

R

The return type of the function.

| Improve this Doc View Source

Capture<T, A, R>(Function<T, A, R>, T)

Converts Function<T, A, R> into Function<A, R> through capturing of the first argument of Function<T, A, R> delegate.

Declaration
public static Function<A, R> Capture<T, A, R>(this Function<T, A, R> function, T this)

    where A : struct
Parameters
Type Name Description
Function<T, A, R> function

The function to be converted.

T this

The first argument to be captured.

Returns
Type Description
Function<A, R>

The function instance.

Type Parameters
Name Description
T

Type of instance to be passed into underlying method.

A

Type of structure with function arguments allocated on the stack.

R

Type of function return value.

| Improve this Doc View Source

Invoke<R>(Function<ValueTuple, R>)

Invokes function.

Declaration
public static R Invoke<R>(this Function<ValueTuple, R> function)
Parameters
Type Name Description
Function<ValueTuple, R> function

The function to be invoked.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P1, P2, P3, P4, P5, P6, P7, P8, R>(Function<T, (P1, P2, P3, P4, P5, P6, P7, P8), R>, T, P1, P2, P3, P4, P5, P6, P7, P8)

Invokes function.

Declaration
public static R Invoke<T, P1, P2, P3, P4, P5, P6, P7, P8, R>(this Function<T, (P1, P2, P3, P4, P5, P6, P7, P8), R> function, in T instance, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6, P7 arg7, P8 arg8)
Parameters
Type Name Description
Function<T, ValueTuple<P1, P2, P3, P4, P5, P6, P7, ValueTuple<P8>>, R> function

The function to be invoked.

T instance

Explicit this argument.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

P7 arg7

The seventh function argument.

P8 arg8

The eighth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

P7

The type of the seventh function argument.

P8

The type of the eighth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P1, P2, P3, P4, P5, P6, P7, P8, P9, R>(Function<(P1, P2, P3, P4, P5, P6, P7, P8, P9), R>, P1, P2, P3, P4, P5, P6, P7, P8, P9)

Invokes function.

Declaration
public static R Invoke<P1, P2, P3, P4, P5, P6, P7, P8, P9, R>(this Function<(P1, P2, P3, P4, P5, P6, P7, P8, P9), R> function, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6, P7 arg7, P8 arg8, P9 arg9)
Parameters
Type Name Description
Function<ValueTuple<P1, P2, P3, P4, P5, P6, P7, ValueTuple<P8, P9>>, R> function

The function to be invoked.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

P7 arg7

The seventh function argument.

P8 arg8

The eighth function argument.

P9 arg9

The ninth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

P7

The type of the seventh function argument.

P8

The type of the eighth function argument.

P9

The type of the ninth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, R>(Function<T, (P1, P2, P3, P4, P5, P6, P7, P8, P9), R>, T, P1, P2, P3, P4, P5, P6, P7, P8, P9)

Invokes function.

Declaration
public static R Invoke<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, R>(this Function<T, (P1, P2, P3, P4, P5, P6, P7, P8, P9), R> function, in T instance, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6, P7 arg7, P8 arg8, P9 arg9)
Parameters
Type Name Description
Function<T, ValueTuple<P1, P2, P3, P4, P5, P6, P7, ValueTuple<P8, P9>>, R> function

The function to be invoked.

T instance

Explicit this argument.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

P7 arg7

The seventh function argument.

P8 arg8

The eighth function argument.

P9 arg9

The ninth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

P7

The type of the seventh function argument.

P8

The type of the eighth function argument.

P9

The type of the ninth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>(Function<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10), R>, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)

Invokes function.

Declaration
public static R Invoke<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>(this Function<(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10), R> function, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6, P7 arg7, P8 arg8, P9 arg9, P10 arg10)
Parameters
Type Name Description
Function<ValueTuple<P1, P2, P3, P4, P5, P6, P7, ValueTuple<P8, P9, P10>>, R> function

The function to be invoked.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

P7 arg7

The seventh function argument.

P8 arg8

The eighth function argument.

P9 arg9

The ninth function argument.

P10 arg10

The tenth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

P7

The type of the seventh function argument.

P8

The type of the eighth function argument.

P9

The type of the ninth function argument.

P10

The type of the tenth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>(Function<T, (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10), R>, T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)

Invokes function.

Declaration
public static R Invoke<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>(this Function<T, (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10), R> function, in T instance, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6, P7 arg7, P8 arg8, P9 arg9, P10 arg10)
Parameters
Type Name Description
Function<T, ValueTuple<P1, P2, P3, P4, P5, P6, P7, ValueTuple<P8, P9, P10>>, R> function

The function to be invoked.

T instance

Explicit this argument.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

P7 arg7

The seventh function argument.

P8 arg8

The eighth function argument.

P9 arg9

The ninth function argument.

P10 arg10

The tenth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

P7

The type of the seventh function argument.

P8

The type of the eighth function argument.

P9

The type of the ninth function argument.

P10

The type of the tenth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, R>(Function<T, ValueTuple, R>, T)

Invokes function.

Declaration
public static R Invoke<T, R>(this Function<T, ValueTuple, R> function, in T instance)
Parameters
Type Name Description
Function<T, ValueTuple, R> function

The function to be invoked.

T instance

Explicit this argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P, R>(Function<ValueTuple<P>, R>, P)

Invokes function.

Declaration
public static R Invoke<P, R>(this Function<ValueTuple<P>, R> function, P arg)
Parameters
Type Name Description
Function<ValueTuple<P>, R> function

The function to be invoked.

P arg

The first function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P

The type of the first function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P, R>(Function<T, ValueTuple<P>, R>, T, P)

Invokes function.

Declaration
public static R Invoke<T, P, R>(this Function<T, ValueTuple<P>, R> function, in T instance, P arg)
Parameters
Type Name Description
Function<T, ValueTuple<P>, R> function

The function to be invoked.

T instance

Explicit this argument.

P arg

The first function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

P

The type of the first function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P1, P2, R>(Function<(P1, P2), R>, P1, P2)

Invokes function.

Declaration
public static R Invoke<P1, P2, R>(this Function<(P1, P2), R> function, P1 arg1, P2 arg2)
Parameters
Type Name Description
Function<ValueTuple<P1, P2>, R> function

The function to be invoked.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P1

The type of the first function argument.

P2

The type of the second function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P1, P2, R>(Function<T, (P1, P2), R>, T, P1, P2)

Invokes function.

Declaration
public static R Invoke<T, P1, P2, R>(this Function<T, (P1, P2), R> function, in T instance, P1 arg1, P2 arg2)
Parameters
Type Name Description
Function<T, ValueTuple<P1, P2>, R> function

The function to be invoked.

T instance

Explicit this argument.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

P1

The type of the first function argument.

P2

The type of the second function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P1, P2, P3, R>(Function<(P1, P2, P3), R>, P1, P2, P3)

Invokes function.

Declaration
public static R Invoke<P1, P2, P3, R>(this Function<(P1, P2, P3), R> function, P1 arg1, P2 arg2, P3 arg3)
Parameters
Type Name Description
Function<ValueTuple<P1, P2, P3>, R> function

The function to be invoked.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P1, P2, P3, R>(Function<T, (P1, P2, P3), R>, T, P1, P2, P3)

Invokes function.

Declaration
public static R Invoke<T, P1, P2, P3, R>(this Function<T, (P1, P2, P3), R> function, in T instance, P1 arg1, P2 arg2, P3 arg3)
Parameters
Type Name Description
Function<T, ValueTuple<P1, P2, P3>, R> function

The function to be invoked.

T instance

Explicit this argument.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P1, P2, P3, P4, R>(Function<(P1, P2, P3, P4), R>, P1, P2, P3, P4)

Invokes function.

Declaration
public static R Invoke<P1, P2, P3, P4, R>(this Function<(P1, P2, P3, P4), R> function, P1 arg1, P2 arg2, P3 arg3, P4 arg4)
Parameters
Type Name Description
Function<ValueTuple<P1, P2, P3, P4>, R> function

The function to be invoked.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P1, P2, P3, P4, R>(Function<T, (P1, P2, P3, P4), R>, T, P1, P2, P3, P4)

Invokes function.

Declaration
public static R Invoke<T, P1, P2, P3, P4, R>(this Function<T, (P1, P2, P3, P4), R> function, in T instance, P1 arg1, P2 arg2, P3 arg3, P4 arg4)
Parameters
Type Name Description
Function<T, ValueTuple<P1, P2, P3, P4>, R> function

The function to be invoked.

T instance

Explicit this

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P1, P2, P3, P4, P5, R>(Function<(P1, P2, P3, P4, P5), R>, P1, P2, P3, P4, P5)

Invokes function.

Declaration
public static R Invoke<P1, P2, P3, P4, P5, R>(this Function<(P1, P2, P3, P4, P5), R> function, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5)
Parameters
Type Name Description
Function<ValueTuple<P1, P2, P3, P4, P5>, R> function

The function to be invoked.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P1, P2, P3, P4, P5, R>(Function<T, (P1, P2, P3, P4, P5), R>, T, P1, P2, P3, P4, P5)

Invokes function.

Declaration
public static R Invoke<T, P1, P2, P3, P4, P5, R>(this Function<T, (P1, P2, P3, P4, P5), R> function, in T instance, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5)
Parameters
Type Name Description
Function<T, ValueTuple<P1, P2, P3, P4, P5>, R> function

The function to be invoked.

T instance

Explicit this

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this

P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P1, P2, P3, P4, P5, P6, R>(Function<(P1, P2, P3, P4, P5, P6), R>, P1, P2, P3, P4, P5, P6)

Invokes function.

Declaration
public static R Invoke<P1, P2, P3, P4, P5, P6, R>(this Function<(P1, P2, P3, P4, P5, P6), R> function, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6)
Parameters
Type Name Description
Function<ValueTuple<P1, P2, P3, P4, P5, P6>, R> function

The function to be invoked.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P1, P2, P3, P4, P5, P6, R>(Function<T, (P1, P2, P3, P4, P5, P6), R>, T, P1, P2, P3, P4, P5, P6)

Invokes function.

Declaration
public static R Invoke<T, P1, P2, P3, P4, P5, P6, R>(this Function<T, (P1, P2, P3, P4, P5, P6), R> function, in T instance, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6)
Parameters
Type Name Description
Function<T, ValueTuple<P1, P2, P3, P4, P5, P6>, R> function

The function to be invoked.

T instance

Explicit this argument.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P1, P2, P3, P4, P5, P6, P7, R>(Function<(P1, P2, P3, P4, P5, P6, P7), R>, P1, P2, P3, P4, P5, P6, P7)

Invokes function.

Declaration
public static R Invoke<P1, P2, P3, P4, P5, P6, P7, R>(this Function<(P1, P2, P3, P4, P5, P6, P7), R> function, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6, P7 arg7)
Parameters
Type Name Description
Function<ValueTuple<P1, P2, P3, P4, P5, P6, P7>, R> function

The function to be invoked.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

P7 arg7

The seventh function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

P7

The type of the seventh function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<T, P1, P2, P3, P4, P5, P6, P7, R>(Function<T, (P1, P2, P3, P4, P5, P6, P7), R>, T, P1, P2, P3, P4, P5, P6, P7)

Invokes function.

Declaration
public static R Invoke<T, P1, P2, P3, P4, P5, P6, P7, R>(this Function<T, (P1, P2, P3, P4, P5, P6, P7), R> function, in T instance, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6, P7 arg7)
Parameters
Type Name Description
Function<T, ValueTuple<P1, P2, P3, P4, P5, P6, P7>, R> function

The function to be invoked.

T instance

Explicit this argument.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

P7 arg7

The seventh function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
T

The type of the explicit this argument.

P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

P7

The type of the seventh function argument.

R

The type of function return value.

| Improve this Doc View Source

Invoke<P1, P2, P3, P4, P5, P6, P7, P8, R>(Function<(P1, P2, P3, P4, P5, P6, P7, P8), R>, P1, P2, P3, P4, P5, P6, P7, P8)

Invokes function.

Declaration
public static R Invoke<P1, P2, P3, P4, P5, P6, P7, P8, R>(this Function<(P1, P2, P3, P4, P5, P6, P7, P8), R> function, P1 arg1, P2 arg2, P3 arg3, P4 arg4, P5 arg5, P6 arg6, P7 arg7, P8 arg8)
Parameters
Type Name Description
Function<ValueTuple<P1, P2, P3, P4, P5, P6, P7, ValueTuple<P8>>, R> function

The function to be invoked.

P1 arg1

The first function argument.

P2 arg2

The second function argument.

P3 arg3

The third function argument.

P4 arg4

The fourth function argument.

P5 arg5

The fifth function argument.

P6 arg6

The sixth function argument.

P7 arg7

The seventh function argument.

P8 arg8

The eighth function argument.

Returns
Type Description
R

Function return value.

Type Parameters
Name Description
P1

The type of the first function argument.

P2

The type of the second function argument.

P3

The type of the third function argument.

P4

The type of the fourth function argument.

P5

The type of the fifth function argument.

P6

The type of the sixth function argument.

P7

The type of the seventh function argument.

P8

The type of the eighth function argument.

R

The type of function return value.

| Improve this Doc View Source

TryInvoke<A, R>(Function<A, R>, A)

Invokes function without throwing exception in case of its failure.

Declaration
public static Result<R> TryInvoke<A, R>(this Function<A, R> function, in A arguments)

    where A : struct
Parameters
Type Name Description
Function<A, R> function

The function to invoke.

A arguments

Function arguments in the form of public structure fields.

Returns
Type Description
Result<R>

Function return value.

Type Parameters
Name Description
A

Type of structure with function arguments allocated on the stack.

R

Type of function return value.

| Improve this Doc View Source

TryInvoke<T, A, R>(Function<T, A, R>, T, A)

Invokes function without throwing exception in case of its failure.

Declaration
public static Result<R> TryInvoke<T, A, R>(this Function<T, A, R> function, in T this, in A arguments)

    where A : struct
Parameters
Type Name Description
Function<T, A, R> function

The function to invoke.

T this

Hidden this parameter.

A arguments

Function arguments in the form of public structure fields.

Returns
Type Description
Result<R>

Function return value.

Type Parameters
Name Description
T

Type of instance to be passed into underlying method.

A

Type of structure with function arguments allocated on the stack.

R

Type of function return value.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX