Provides extension methods for delegate Func<TResult> and predefined functions.
Namespace: DotNext Assembly: DotNext.dll Syntax Methods | Edit this page View Source AsConverter<TInput, TOutput>(Func<TInput, TOutput>)Converts Func<T, TResult> into Converter<TInput, TOutput>.
Declarationpublic static Converter<TInput, TOutput> AsConverter<TInput, TOutput>(this Func<TInput, TOutput> function)
Parameters Type Name Description Func<TInput, TOutput> function
The function to convert.
Returns Type Parameters Name Description TInputType of input argument.
TOutputReturn type of the converter.
| Edit this page View Source AsPredicate<T>(Func<T, bool>)Converts Func<T, TResult> into predicate.
Declarationpublic static Predicate<T> AsPredicate<T>(this Func<T, bool> predicate)
Parameters Type Name Description Func<T, bool> predicate
A delegate to convert.
Returns Type Description Predicate<T>A delegate of type Predicate<T> referencing the same method as original delegate.
Type Parameters Name Description TType of predicate argument.
| Edit this page View Source Constant<T>(T)Constructs Func<TResult> returning the same instance each call.
Declarationpublic static Func<T> Constant<T>(T obj)
Parameters Type Name Description T obj
The object to be returned from the delegate.
Returns Type Description Func<T>The delegate returning obj
each call.
The type of the object to be returned from the delegate.
| Edit this page View Source Identity<T>()The converter which returns input argument without any modifications.
Declarationpublic static Func<T, T> Identity<T>()
Returns Type Description Func<T, T>
The identity function.
Type Parameters Name Description TType of input and output.
| Edit this page View Source Identity<T>(Action<T>)Represents Action<T> as Func<T, TResult> which doesn't modify the input value.
Declarationpublic static Func<T, T> Identity<T>(this Action<T> action)
Parameters Type Name Description Action<T> action
The action to be converted.
Returns Type Parameters Name Description TThe type of the element.
| Edit this page View Source Identity<TInput, TOutput>()The function which returns input argument without any modifications.
Declarationpublic static Func<TInput, TOutput> Identity<TInput, TOutput>() where TInput : TOutput
Returns Type Description Func<TInput, TOutput>
The identity function.
Type Parameters Name Description TInputType of input.
TOutputType of output.
| Edit this page View Source IsNotNull<T>()Returns predicate checking that input argument is not null.
Declarationpublic static Func<T, bool> IsNotNull<T>() where T : class?
Returns Type Description Func<T, bool>
The predicate instance.
Type Parameters Name Description TType of the predicate argument.
| Edit this page View Source IsNull<T>()Returns predicate implementing nullability check.
Declarationpublic static Func<T, bool> IsNull<T>() where T : class?
Returns Type Description Func<T, bool>
The predicate instance.
Type Parameters Name Description TType of predicate argument.
| Edit this page View Source IsTypeOf<T>()Gets a predicate that can be used to check whether the specified object is of specific type.
Declarationpublic static Func<object?, bool> IsTypeOf<T>()
Returns Type Parameters Name Description T
The target type.
| Edit this page View Source TryInvoke<TResult>(Func<TResult>)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<TResult>(this Func<TResult> function)
Parameters Type Name Description Func<TResult> function
The function to invoke.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description TResultThe result type.
| Edit this page View Source TryInvoke<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(this Func<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 Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult> function
The function to invoke.
T1 arg1The first function argument.
T2 arg2The second function argument.
T3 arg3The third function argument.
T4 arg4The fourth function argument.
T5 arg5The fifth function argument.
T6 arg6The sixth function argument.
T7 arg7The seventh function argument.
T8 arg8The eighth function argument.
T9 arg9The ninth function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description T1The type of the first function argument.
T2The type of the second function argument.
T3The type of the third function argument.
T4The type of the fourth function argument.
T5The type of the fifth function argument.
T6The type of the sixth function argument.
T7The type of the seventh function argument.
T8The type of the eighth function argument.
T9The type of the ninth function argument.
TResultThe result type.
| Edit this page View Source TryInvoke<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(this Func<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 Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult> function
The function to invoke.
T1 arg1The first function argument.
T2 arg2The second function argument.
T3 arg3The third function argument.
T4 arg4The fourth function argument.
T5 arg5The fifth function argument.
T6 arg6The sixth function argument.
T7 arg7The seventh function argument.
T8 arg8The eighth function argument.
T9 arg9The ninth function argument.
T10 arg10The tenth function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description T1The type of the first function argument.
T2The type of the second function argument.
T3The type of the third function argument.
T4The type of the fourth function argument.
T5The type of the fifth function argument.
T6The type of the sixth function argument.
T7The type of the seventh function argument.
T8The type of the eighth function argument.
T9The type of the ninth function argument.
T10The type of the tenth function argument.
TResultThe result type.
| Edit this page View Source TryInvoke<T, TResult>(Func<T, TResult>, T)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T, TResult>(this Func<T, TResult> function, T arg)
Parameters Type Name Description Func<T, TResult> function
The function to invoke.
T argThe first function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description TThe type of the first function argument.
TResultThe result type.
| Edit this page View Source TryInvoke<T1, T2, TResult>(Func<T1, T2, TResult>, T1, T2)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T1, T2, TResult>(this Func<T1, T2, TResult> function, T1 arg1, T2 arg2)
Parameters Type Name Description Func<T1, T2, TResult> function
The function to invoke.
T1 arg1The first function argument.
T2 arg2The second function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description T1The type of the first function argument.
T2The type of the second function argument.
TResultThe result type.
| Edit this page View Source TryInvoke<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>, T1, T2, T3)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> function, T1 arg1, T2 arg2, T3 arg3)
Parameters Type Name Description Func<T1, T2, T3, TResult> function
The function to invoke.
T1 arg1The first function argument.
T2 arg2The second function argument.
T3 arg3The third function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description T1The type of the first function argument.
T2The type of the second function argument.
T3The type of the third function argument.
TResultThe result type.
| Edit this page View Source TryInvoke<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>, T1, T2, T3, T4)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
Parameters Type Name Description Func<T1, T2, T3, T4, TResult> function
The function to invoke.
T1 arg1The first function argument.
T2 arg2The second function argument.
T3 arg3The third function argument.
T4 arg4The fourth function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description T1The type of the first function argument.
T2The type of the second function argument.
T3The type of the third function argument.
T4The type of the fourth function argument.
TResultThe result type.
| Edit this page View Source TryInvoke<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T1, T2, T3, T4, T5, TResult>(this Func<T1, T2, T3, T4, T5, TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
Parameters Type Name Description Func<T1, T2, T3, T4, T5, TResult> function
The function to invoke.
T1 arg1The first function argument.
T2 arg2The second function argument.
T3 arg3The third function argument.
T4 arg4The fourth function argument.
T5 arg5The fifth function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description T1The type of the first function argument.
T2The type of the second function argument.
T3The type of the third function argument.
T4The type of the fourth function argument.
T5The type of the fifth function argument.
TResultThe result type.
| Edit this page View Source TryInvoke<T1, T2, T3, T4, T5, T6, TResult>(Func<T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T1, T2, T3, T4, T5, T6, TResult>(this Func<T1, T2, T3, T4, T5, T6, TResult> function, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
Parameters Type Name Description Func<T1, T2, T3, T4, T5, T6, TResult> function
The function to invoke.
T1 arg1The first function argument.
T2 arg2The second function argument.
T3 arg3The third function argument.
T4 arg4The fourth function argument.
T5 arg5The fifth function argument.
T6 arg6The sixth function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description T1The type of the first function argument.
T2The type of the second function argument.
T3The type of the third function argument.
T4The type of the fourth function argument.
T5The type of the fifth function argument.
T6The type of the sixth function argument.
TResultThe result type.
| Edit this page View Source TryInvoke<T1, T2, T3, T4, T5, T6, T7, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, TResult>, T1, T2, T3, T4, T5, T6, T7)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T1, T2, T3, T4, T5, T6, T7, TResult>(this Func<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 Func<T1, T2, T3, T4, T5, T6, T7, TResult> function
The function to invoke.
T1 arg1The first function argument.
T2 arg2The second function argument.
T3 arg3The third function argument.
T4 arg4The fourth function argument.
T5 arg5The fifth function argument.
T6 arg6The sixth function argument.
T7 arg7The seventh function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description T1The type of the first function argument.
T2The type of the second function argument.
T3The type of the third function argument.
T4The type of the fourth function argument.
T5The type of the fifth function argument.
T6The type of the sixth function argument.
T7The type of the seventh function argument.
TResultThe result type.
| Edit this page View Source TryInvoke<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult>, T1, T2, T3, T4, T5, T6, T7, T8)Invokes function without throwing the exception.
Declarationpublic static Result<TResult> TryInvoke<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(this Func<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 Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult> function
The function to invoke.
T1 arg1The first function argument.
T2 arg2The second function argument.
T3 arg3The third function argument.
T4 arg4The fourth function argument.
T5 arg5The fifth function argument.
T6 arg6The sixth function argument.
T7 arg7The seventh function argument.
T8 arg8The eighth function argument.
Returns Type Description Result<TResult>The invocation result.
Type Parameters Name Description T1The type of the first function argument.
T2The type of the second function argument.
T3The type of the third function argument.
T4The type of the fourth function argument.
T5The type of the fifth function argument.
T6The type of the sixth function argument.
T7The type of the seventh function argument.
T8The type of the eighth function argument.
TResultThe result type.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4