Represents various extensions of delegates.
InheritanceDelegateHelpers
Namespace: DotNext Assembly: DotNext.dll Syntaxpublic static class DelegateHelpers
Methods | Edit this page View Source Bind<T>(Action<T>, T)
Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Action Bind<T>(this Action<T> action, T obj) where T : class
Parameters Type Name Description Action<T> action
The action to bind.
T objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description ActionThe delegate targeting the specified object.
Type Parameters Name Description TThe type of the first parameter to bind.
Exceptions | Edit this page View Source Bind<T>(Predicate<T>, T)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Func<bool> Bind<T>(this Predicate<T> predicate, T obj) where T : class
Parameters Type Name Description Predicate<T> predicate
The predicate to bind.
T objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Func<bool>The delegate targeting the specified object.
Type Parameters Name Description TThe type of the first parameter to bind.
Exceptions | Edit this page View Source Bind<T1, T2>(Action<T1, T2>, T1)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Action<T2> Bind<T1, T2>(this Action<T1, T2> action, T1 obj) where T1 : class
Parameters Type Name Description Action<T1, T2> action
The action to bind.
T1 objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Action<T2>The delegate targeting the specified object.
Type Parameters Name Description T1The type of the first parameter to bind.
T2The type of the second parameter.
Exceptions | Edit this page View Source Bind<T, TResult>(Func<T, TResult>, T)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Func<TResult> Bind<T, TResult>(this Func<T, TResult> func, T obj) where T : class
Parameters Type Name Description Func<T, TResult> func
The action to bind.
T objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Func<TResult>The delegate targeting the specified object.
Type Parameters Name Description TThe type of the first parameter to bind.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source Bind<T1, T2, T3>(Action<T1, T2, T3>, T1)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Action<T2, T3> Bind<T1, T2, T3>(this Action<T1, T2, T3> action, T1 obj) where T1 : class
Parameters Type Name Description Action<T1, T2, T3> action
The action to bind.
T1 objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Action<T2, T3>The delegate targeting the specified object.
Type Parameters Name Description T1The type of the first parameter to bind.
T2The type of the second parameter.
T3The type of the third parameter.
Exceptions | Edit this page View Source Bind<T1, T2, TResult>(Func<T1, T2, TResult>, T1)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Func<T2, TResult> Bind<T1, T2, TResult>(this Func<T1, T2, TResult> func, T1 obj) where T1 : class
Parameters Type Name Description Func<T1, T2, TResult> func
The action to bind.
T1 objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Func<T2, TResult>The delegate targeting the specified object.
Type Parameters Name Description T1The type of the first parameter to bind.
T2The type of the second parameter.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source Bind<T1, T2, T3, T4>(Action<T1, T2, T3, T4>, T1)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Action<T2, T3, T4> Bind<T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action, T1 obj) where T1 : class
Parameters Type Name Description Action<T1, T2, T3, T4> action
The action to bind.
T1 objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Action<T2, T3, T4>The delegate targeting the specified object.
Type Parameters Name Description T1The type of the first parameter to bind.
T2The type of the second parameter.
T3The type of the third parameter.
T4The type of the fourth parameter.
Exceptions | Edit this page View Source Bind<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>, T1)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Func<T2, T3, TResult> Bind<T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> func, T1 obj) where T1 : class
Parameters Type Name Description Func<T1, T2, T3, TResult> func
The action to bind.
T1 objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Func<T2, T3, TResult>The delegate targeting the specified object.
Type Parameters Name Description T1The type of the first parameter to bind.
T2The type of the second parameter.
T3The type of the third parameter.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source Bind<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>, T1)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Action<T2, T3, T4, T5> Bind<T1, T2, T3, T4, T5>(this Action<T1, T2, T3, T4, T5> action, T1 obj) where T1 : class
Parameters Type Name Description Action<T1, T2, T3, T4, T5> action
The action to bind.
T1 objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Action<T2, T3, T4, T5>The delegate targeting the specified object.
Type Parameters Name Description T1The type of the first parameter to bind.
T2The type of the second parameter.
T3The type of the third parameter.
T4The type of the fourth parameter.
T5The type of the fifth parameter.
Exceptions | Edit this page View Source Bind<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>, T1)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Func<T2, T3, T4, TResult> Bind<T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> func, T1 obj) where T1 : class
Parameters Type Name Description Func<T1, T2, T3, T4, TResult> func
The action to bind.
T1 objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Func<T2, T3, T4, TResult>The delegate targeting the specified object.
Type Parameters Name Description T1The type of the first parameter to bind.
T2The type of the second parameter.
T3The type of the third parameter.
T4The type of the fourth parameter.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source Bind<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult>, T1)Produces a delegate whose first parameter is implicitly bound to the given object.
Declarationpublic static Func<T2, T3, T4, T5, TResult> Bind<T1, T2, T3, T4, T5, TResult>(this Func<T1, T2, T3, T4, T5, TResult> func, T1 obj) where T1 : class
Parameters Type Name Description Func<T1, T2, T3, T4, T5, TResult> func
The action to bind.
T1 objThe object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.
Returns Type Description Func<T2, T3, T4, T5, TResult>The delegate targeting the specified object.
Type Parameters Name Description T1The type of the first parameter to bind.
T2The type of the second parameter.
T3The type of the third parameter.
T4The type of the fourth parameter.
T5The type of the fifth parameter.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source ChangeType<TDelegate>(Delegate)Returns a new delegate of different type which points to the same method as original delegate.
Declarationpublic static TDelegate ChangeType<TDelegate>(this Delegate d) where TDelegate : Delegate
Parameters Type Name Description Delegate d
Delegate to convert.
Returns Type Description TDelegateA method wrapped into new delegate type.
Type Parameters Name Description TDelegateA new delegate type.
Exceptions | Edit this page View Source Contravariant<TBase, T>(EventHandler<TBase>)Performs contravariant conversion of actual generic argument specified for EventHandler<TEventArgs> type.
Declarationpublic static EventHandler<T> Contravariant<TBase, T>(this EventHandler<TBase> handler) where TBase : class where T : class, TBase
Parameters Type Name Description EventHandler<TBase> handler
The handler to convert.
Returns Type Description EventHandler<T>The delegate referencing the same method as original delegate.
Type Parameters Name Description TBaseInput type of the delegate.
TA subtype of TBase
.
Creates a factory for closed delegates.
Declarationpublic static Func<object, TDelegate> CreateClosedDelegateFactory<TDelegate>(Expression<TDelegate> expression) where TDelegate : Delegate
Parameters Type Name Description Expression<TDelegate> expression
The expression tree containing instance method, property, operator call.
Returns Type Description Func<object, TDelegate>The factory of closed delegate.
Type Parameters Name Description TDelegateThe type of the delegate describing expression tree.
| Edit this page View Source CreateDelegate(delegate*<void>)Converts static method represented by the pointer to the open delegate of type Action.
Declaration[CLSCompliant(false)]
public static Action CreateDelegate(delegate*<void> ptr)
Parameters Type Name Description delegate*<void> ptr
The function pointer.
Returns Type Description ActionThe delegate instance.
Exceptions | Edit this page View Source CreateDelegate<TResult>(delegate*<TResult>)Converts static method represented by the pointer to the open delegate of type Func<TResult>.
Declaration[CLSCompliant(false)]
public static Func<TResult> CreateDelegate<TResult>(delegate*<TResult> ptr)
Parameters Type Name Description delegate*<TResult> ptr
The function pointer.
Returns Type Description Func<TResult>The delegate instance.
Type Parameters Name Description TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<TResult>(delegate*<TResult>)Converts static method represented by the pointer to the open delegate of type Func<TResult>.
Declaration[CLSCompliant(false)]
public static Func<TResult> CreateDelegate<TResult>(delegate*<TResult> ptr)
Parameters Type Name Description delegate*<TResult> ptr
The function pointer.
Returns Type Description Func<TResult>The delegate instance.
Type Parameters Name Description TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T>(delegate*<T, void>, T)Converts static method represented by the pointer to the closed delegate of type Action.
Declaration[CLSCompliant(false)]
public static Action CreateDelegate<T>(delegate*<T, void> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, void> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description ActionThe delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
Exceptions | Edit this page View Source CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void>)Converts static method represented by the pointer to the open delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<T, TArg> CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void> ptr)
Parameters Type Name Description delegate*<Span<T>, TArg, void> ptr
The function pointer.
Returns Type Description SpanAction<T, TArg>The delegate instance.
Type Parameters Name Description TThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void>)Converts static method represented by the pointer to the open delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<T, TArg> CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void> ptr)
Parameters Type Name Description delegate*<Span<T>, TArg, void> ptr
The function pointer.
Returns Type Description SpanAction<T, TArg>The delegate instance.
Type Parameters Name Description TThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void>)Converts static method represented by the pointer to the open delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<T, TArg> CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void> ptr)
Parameters Type Name Description delegate*<Span<T>, TArg, void> ptr
The function pointer.
Returns Type Description SpanAction<T, TArg>The delegate instance.
Type Parameters Name Description TThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void>)Converts static method represented by the pointer to the open delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<T, TArg> CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void> ptr)
Parameters Type Name Description delegate*<Span<T>, TArg, void> ptr
The function pointer.
Returns Type Description SpanAction<T, TArg>The delegate instance.
Type Parameters Name Description TThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void>)Converts static method represented by the pointer to the open delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<T, TArg> CreateDelegate<T, TArg>(delegate*<Span<T>, TArg, void> ptr)
Parameters Type Name Description delegate*<Span<T>, TArg, void> ptr
The function pointer.
Returns Type Description SpanAction<T, TArg>The delegate instance.
Type Parameters Name Description TThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T, TResult>(delegate*<T, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<TResult>.
Declaration[CLSCompliant(false)]
public static Func<TResult> CreateDelegate<T, TResult>(delegate*<T, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, TResult>(delegate*<T, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<TResult>.
Declaration[CLSCompliant(false)]
public static Func<TResult> CreateDelegate<T, TResult>(delegate*<T, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, TResult>(delegate*<T1, T2, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, TResult> CreateDelegate<T1, T2, TResult>(delegate*<T1, T2, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, TResult>The delegate instance.
Type Parameters Name Description T1The type of the first argument.
T2The type of the second argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, TResult>(delegate*<T1, T2, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, TResult> CreateDelegate<T1, T2, TResult>(delegate*<T1, T2, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, TResult>The delegate instance.
Type Parameters Name Description T1The type of the first argument.
T2The type of the second argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, TResult>(delegate*<T1, T2, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, TResult> CreateDelegate<T1, T2, TResult>(delegate*<T1, T2, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, TResult>The delegate instance.
Type Parameters Name Description T1The type of the first argument.
T2The type of the second argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void>, T)Converts static method represented by the pointer to the closed delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<TItem, TArg> CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, Span<TItem>, TArg, void> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description SpanAction<TItem, TArg>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
TItemThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void>, T)Converts static method represented by the pointer to the closed delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<TItem, TArg> CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, Span<TItem>, TArg, void> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description SpanAction<TItem, TArg>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
TItemThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void>, T)Converts static method represented by the pointer to the closed delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<TItem, TArg> CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, Span<TItem>, TArg, void> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description SpanAction<TItem, TArg>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
TItemThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void>, T)Converts static method represented by the pointer to the closed delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<TItem, TArg> CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, Span<TItem>, TArg, void> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description SpanAction<TItem, TArg>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
TItemThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void>, T)Converts static method represented by the pointer to the closed delegate of type SpanAction<T, TArg>.
Declaration[CLSCompliant(false)]
public static SpanAction<TItem, TArg> CreateDelegate<T, TItem, TArg>(delegate*<T, Span<TItem>, TArg, void> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, Span<TItem>, TArg, void> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description SpanAction<TItem, TArg>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
TItemThe type of the objects in the read-only span.
TArgThe type of the object that represents the state.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, T3, TResult>(delegate*<T1, T2, T3, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, T3, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, TResult> CreateDelegate<T1, T2, T3, TResult>(delegate*<T1, T2, T3, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, T3, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, T3, TResult>The delegate instance.
Type Parameters Name Description T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, T3, TResult>(delegate*<T1, T2, T3, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, T3, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, TResult> CreateDelegate<T1, T2, T3, TResult>(delegate*<T1, T2, T3, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, T3, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, T3, TResult>The delegate instance.
Type Parameters Name Description T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, TResult>(delegate*<T, T1, T2, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, TResult> CreateDelegate<T, T1, T2, TResult>(delegate*<T, T1, T2, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
T1The type of the first argument.
T2The type of the second argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, TResult>(delegate*<T, T1, T2, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, TResult> CreateDelegate<T, T1, T2, TResult>(delegate*<T, T1, T2, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
T1The type of the first argument.
T2The type of the second argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, TResult>(delegate*<T, T1, T2, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, TResult> CreateDelegate<T, T1, T2, TResult>(delegate*<T, T1, T2, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
T1The type of the first argument.
T2The type of the second argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, T3, T4, TResult>(delegate*<T1, T2, T3, T4, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, T3, T4, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, TResult> CreateDelegate<T1, T2, T3, T4, TResult>(delegate*<T1, T2, T3, T4, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, T3, T4, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, T3, T4, TResult>The delegate instance.
Type Parameters Name Description T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, T3, T4, TResult>(delegate*<T1, T2, T3, T4, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, T3, T4, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, TResult> CreateDelegate<T1, T2, T3, T4, TResult>(delegate*<T1, T2, T3, T4, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, T3, T4, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, T3, T4, TResult>The delegate instance.
Type Parameters Name Description T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, T3, TResult>(delegate*<T, T1, T2, T3, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, T3, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, TResult> CreateDelegate<T, T1, T2, T3, TResult>(delegate*<T, T1, T2, T3, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, T3, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, T3, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, T3, TResult>(delegate*<T, T1, T2, T3, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, T3, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, TResult> CreateDelegate<T, T1, T2, T3, TResult>(delegate*<T, T1, T2, T3, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, T3, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, T3, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, T3, T4, T5, TResult>(delegate*<T1, T2, T3, T4, T5, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, T3, T4, T5, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, TResult> CreateDelegate<T1, T2, T3, T4, T5, TResult>(delegate*<T1, T2, T3, T4, T5, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, T3, T4, T5, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, T3, T4, T5, TResult>The delegate instance.
Type Parameters Name Description 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.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, T3, T4, T5, TResult>(delegate*<T1, T2, T3, T4, T5, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, T3, T4, T5, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, TResult> CreateDelegate<T1, T2, T3, T4, T5, TResult>(delegate*<T1, T2, T3, T4, T5, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, T3, T4, T5, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, T3, T4, T5, TResult>The delegate instance.
Type Parameters Name Description 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.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, T3, T4, TResult>(delegate*<T, T1, T2, T3, T4, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, T3, T4, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, TResult> CreateDelegate<T, T1, T2, T3, T4, TResult>(delegate*<T, T1, T2, T3, T4, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, T3, T4, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, T3, T4, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, T3, T4, TResult>(delegate*<T, T1, T2, T3, T4, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, T3, T4, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, TResult> CreateDelegate<T, T1, T2, T3, T4, TResult>(delegate*<T, T1, T2, T3, T4, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, T3, T4, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, T3, T4, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
T1The type of the first argument.
T2The type of the second argument.
T3The type of the third argument.
T4The type of the fourth argument.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T1, T2, T3, T4, T5, T6, TResult>(delegate*<T1, T2, T3, T4, T5, T6, TResult>)Converts static method represented by the pointer to the open delegate of type Func<T1, T2, T3, T4, T5, T6, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, T6, TResult> CreateDelegate<T1, T2, T3, T4, T5, T6, TResult>(delegate*<T1, T2, T3, T4, T5, T6, TResult> ptr)
Parameters Type Name Description delegate*<T1, T2, T3, T4, T5, T6, TResult> ptr
The function pointer.
Returns Type Description Func<T1, T2, T3, T4, T5, T6, TResult>The delegate instance.
Type Parameters Name Description 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.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, T3, T4, T5, TResult>(delegate*<T, T1, T2, T3, T4, T5, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, T3, T4, T5, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, TResult> CreateDelegate<T, T1, T2, T3, T4, T5, TResult>(delegate*<T, T1, T2, T3, T4, T5, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, T3, T4, T5, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, T3, T4, T5, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
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.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, T3, T4, T5, TResult>(delegate*<T, T1, T2, T3, T4, T5, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, T3, T4, T5, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, TResult> CreateDelegate<T, T1, T2, T3, T4, T5, TResult>(delegate*<T, T1, T2, T3, T4, T5, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, T3, T4, T5, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, T3, T4, T5, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
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.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateDelegate<T, T1, T2, T3, T4, T5, T6, TResult>(delegate*<T, T1, T2, T3, T4, T5, T6, TResult>, T)Converts static method represented by the pointer to the closed delegate of type Func<T1, T2, T3, T4, T5, T6, TResult>.
Declaration[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, T6, TResult> CreateDelegate<T, T1, T2, T3, T4, T5, T6, TResult>(delegate*<T, T1, T2, T3, T4, T5, T6, TResult> ptr, T obj) where T : class?
Parameters Type Name Description delegate*<T, T1, T2, T3, T4, T5, T6, TResult> ptr
The function pointer.
T objThe object to be passed as first argument implicitly.
Returns Type Description Func<T1, T2, T3, T4, T5, T6, TResult>The delegate instance.
Type Parameters Name Description TThe type of the implicit capture object.
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.
TResultThe type of the result.
Exceptions | Edit this page View Source CreateOpenDelegate<TDelegate>(Expression<TDelegate>)Creates open delegate for the instance method, property, operator referenced in expression tree.
Declarationpublic static TDelegate CreateOpenDelegate<TDelegate>(Expression<TDelegate> expression) where TDelegate : Delegate
Parameters Type Name Description Expression<TDelegate> expression
The expression tree containing instance method call.
Returns Type Description TDelegateThe open delegate.
Type Parameters Name Description TDelegateThe type of the delegate describing expression tree.
Exceptions | Edit this page View Source CreateOpenDelegate<T, TValue>(Expression<Func<T, TValue>>)Creates open delegate for instance property setter.
Declarationpublic static Action<T, TValue> CreateOpenDelegate<T, TValue>(Expression<Func<T, TValue>> properyExpr) where T : class
Parameters Type Name Description Expression<Func<T, TValue>> properyExpr
The expression representing property.
Returns Type Description Action<T, TValue>The open delegate representing property setter.
Type Parameters Name Description TThe declaring type.
TValueThe type of property value.
| Edit this page View Source HideReturnValue<TResult>(Func<TResult>)Creates a delegate that hides the return value.
Declarationpublic static Action HideReturnValue<TResult>(this Func<TResult> func)
Parameters Type Name Description Func<TResult> func
The function.
Returns Type Description ActionThe action that invokes the same method as func
.
The type of the result.
Exceptions | Edit this page View Source HideReturnValue<T, TResult>(Func<T, TResult>)Creates a delegate that hides the return value.
Declarationpublic static Action<T> HideReturnValue<T, TResult>(this Func<T, TResult> func)
Parameters Type Name Description Func<T, TResult> func
The function.
Returns Type Description Action<T>The action that invokes the same method as func
.
The type of the argument to be passed to the action.
TResultThe type of the result.
Exceptions | Edit this page View Source ToAsync(Action)Converts action to async delegate.
Declarationpublic static Func<CancellationToken, ValueTask> ToAsync(this Action action)
Parameters Type Name Description Action action
Synchronous action.
Returns Exceptions | Edit this page View Source ToAsync<T>(Action<T>)Converts action to async delegate.
Declarationpublic static Func<T, CancellationToken, ValueTask> ToAsync<T>(this Action<T> action)
Parameters Type Name Description Action<T> action
Synchronous action.
Returns Type Parameters Name Description TThe type of the argument to be passed to the action.
Exceptions | Edit this page View Source ToAsync<TResult>(Func<TResult>)Converts function to async delegate.
Declarationpublic static Func<CancellationToken, ValueTask<TResult>> ToAsync<TResult>(this Func<TResult> func)
Parameters Type Name Description Func<TResult> func
Synchronous function.
Returns Type Parameters Name Description TResultThe type of the return value.
Exceptions | Edit this page View Source ToAsync<T1, T2>(Action<T1, T2>)Converts action to async delegate.
Declarationpublic static Func<T1, T2, CancellationToken, ValueTask> ToAsync<T1, T2>(this Action<T1, T2> action)
Parameters Type Name Description Action<T1, T2> action
Synchronous action.
Returns Type Parameters Name Description T1The type of the first argument to be passed to the action.
T2The type of the second argument to be passed to the action.
Exceptions | Edit this page View Source ToAsync<T, TResult>(Func<T, TResult>)Converts function to async delegate.
Declarationpublic static Func<T, CancellationToken, ValueTask<TResult>> ToAsync<T, TResult>(this Func<T, TResult> action)
Parameters Type Name Description Func<T, TResult> action
Synchronous function.
Returns Type Parameters Name Description TThe type of the argument to be passed to the action.
TResultThe type of the return value.
Exceptions | Edit this page View Source ToAsync<T1, T2, TResult>(Func<T1, T2, TResult>)Converts function to async delegate.
Declarationpublic static Func<T1, T2, CancellationToken, ValueTask<TResult>> ToAsync<T1, T2, TResult>(this Func<T1, T2, TResult> func)
Parameters Type Name Description Func<T1, T2, TResult> func
Synchronous action.
Returns Type Parameters Name Description T1The type of the first argument to be passed to the action.
T2The type of the second argument to be passed to the action.
TResultThe type of the return value.
Exceptions | Edit this page View Source Unbind<T>(Action)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Action<T> Unbind<T>(this Action action) where T : class
Parameters Type Name Description Action action
The delegate to unbind.
Returns Type Description Action<T>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
Exceptions | Edit this page View Source Unbind<T>(Func<bool>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Predicate<T> Unbind<T>(this Func<bool> func) where T : class
Parameters Type Name Description Func<bool> func
The delegate to unbind.
Returns Type Description Predicate<T>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
Exceptions | Edit this page View Source Unbind<T, TArg>(Action<TArg>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Action<T, TArg> Unbind<T, TArg>(this Action<TArg> action) where T : class
Parameters Type Name Description Action<TArg> action
The delegate to unbind.
Returns Type Description Action<T, TArg>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
TArgThe type of the first explicit parameter.
Exceptions | Edit this page View Source Unbind<T, TResult>(Func<TResult>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Func<T, TResult> Unbind<T, TResult>(this Func<TResult> func) where T : class
Parameters Type Name Description Func<TResult> func
The delegate to unbind.
Returns Type Description Func<T, TResult>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source Unbind<T, T1, T2>(Action<T1, T2>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Action<T, T1, T2> Unbind<T, T1, T2>(this Action<T1, T2> action) where T : class
Parameters Type Name Description Action<T1, T2> action
The delegate to unbind.
Returns Type Description Action<T, T1, T2>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
T1The type of the first explicit parameter.
T2The type of the second explicit parameter.
Exceptions | Edit this page View Source Unbind<T, TArg, TResult>(Func<TArg, TResult>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Func<T, TArg, TResult> Unbind<T, TArg, TResult>(this Func<TArg, TResult> func) where T : class
Parameters Type Name Description Func<TArg, TResult> func
The delegate to unbind.
Returns Type Description Func<T, TArg, TResult>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
TArgThe type of the first explicit parameter.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source Unbind<T, T1, T2, T3>(Action<T1, T2, T3>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Action<T, T1, T2, T3> Unbind<T, T1, T2, T3>(this Action<T1, T2, T3> action) where T : class
Parameters Type Name Description Action<T1, T2, T3> action
The delegate to unbind.
Returns Type Description Action<T, T1, T2, T3>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
T1The type of the first explicit parameter.
T2The type of the second explicit parameter.
T3The type of the third explicit parameter.
Exceptions | Edit this page View Source Unbind<T, T1, T2, TResult>(Func<T1, T2, TResult>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Func<T, T1, T2, TResult> Unbind<T, T1, T2, TResult>(this Func<T1, T2, TResult> func) where T : class
Parameters Type Name Description Func<T1, T2, TResult> func
The delegate to unbind.
Returns Type Description Func<T, T1, T2, TResult>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
T1The type of the first explicit parameter.
T2The type of the second explicit parameter.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source Unbind<T, T1, T2, T3, T4>(Action<T1, T2, T3, T4>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Action<T, T1, T2, T3, T4> Unbind<T, T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action) where T : class
Parameters Type Name Description Action<T1, T2, T3, T4> action
The delegate to unbind.
Returns Type Description Action<T, T1, T2, T3, T4>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
T1The type of the first explicit parameter.
T2The type of the second explicit parameter.
T3The type of the third explicit parameter.
T4The type of the fourth explicit parameter.
Exceptions | Edit this page View Source Unbind<T, T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Func<T, T1, T2, T3, TResult> Unbind<T, T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> func) where T : class
Parameters Type Name Description Func<T1, T2, T3, TResult> func
The delegate to unbind.
Returns Type Description Func<T, T1, T2, T3, TResult>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
T1The type of the first explicit parameter.
T2The type of the second explicit parameter.
T3The type of the third explicit parameter.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source Unbind<T, T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Action<T, T1, T2, T3, T4, T5> Unbind<T, T1, T2, T3, T4, T5>(this Action<T1, T2, T3, T4, T5> action) where T : class
Parameters Type Name Description Action<T1, T2, T3, T4, T5> action
The delegate to unbind.
Returns Type Description Action<T, T1, T2, T3, T4, T5>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
T1The type of the first explicit parameter.
T2The type of the second explicit parameter.
T3The type of the third explicit parameter.
T4The type of the fourth explicit parameter.
T5The type of the fifth explicit parameter.
Exceptions | Edit this page View Source Unbind<T, T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Func<T, T1, T2, T3, T4, TResult> Unbind<T, T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> func) where T : class
Parameters Type Name Description Func<T1, T2, T3, T4, TResult> func
The delegate to unbind.
Returns Type Description Func<T, T1, T2, T3, T4, TResult>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
T1The type of the first explicit parameter.
T2The type of the second explicit parameter.
T3The type of the third explicit parameter.
T4The type of the fourth explicit parameter.
TResultThe type of the return value of the method that the delegate encapsulates.
Exceptions | Edit this page View Source Unbind<T, T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult>)Converts implicitly bound delegate into its unbound version.
Declarationpublic static Func<T, T1, T2, T3, T4, T5, TResult> Unbind<T, T1, T2, T3, T4, T5, TResult>(this Func<T1, T2, T3, T4, T5, TResult> func) where T : class
Parameters Type Name Description Func<T1, T2, T3, T4, T5, TResult> func
The delegate to unbind.
Returns Type Description Func<T, T1, T2, T3, T4, T5, TResult>Unbound version of the delegate.
Type Parameters Name Description TThe expected type of Target.
T1The type of the first explicit parameter.
T2The type of the second explicit parameter.
T3The type of the third explicit parameter.
T4The type of the fourth explicit parameter.
T5The type of the fifth explicit parameter.
TResultThe type of the return value of the method that the delegate encapsulates.
ExceptionsRetroSearch 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