DelegateHelpers
Represents various extensions of delegates.
Produces a delegate whose first parameter is implicitly bound to the given object.
Produces a delegate whose first parameter is implicitly bound to the given object.
Produces a delegate whose first parameter is implicitly bound to the given object.
Produces a delegate whose first parameter is implicitly bound to the given object.
public static Func<T2, T3, TResult> Bind<T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> func, T1 obj)
Produces a delegate whose first parameter is implicitly bound to the given object.
Produces a delegate whose first parameter is implicitly bound to the given object.
public static Func<T2, T3, T4, TResult> Bind<T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> func, T1 obj)
Produces a delegate whose first parameter is implicitly bound to the given object.
Produces a delegate whose first parameter is implicitly bound to the given object.
public 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)
Produces a delegate whose first parameter is implicitly bound to the given object.
public static Action<T2, T3, T4, T5> Bind<T1, T2, T3, T4, T5>(this Action<T1, T2, T3, T4, T5> action, T1 obj)
Produces a delegate whose first parameter is implicitly bound to the given object.
Produces a delegate whose first parameter is implicitly bound to the given object.
Returns a new delegate of different type which
points to the same method as original delegate.
public static EventHandler<T> Contravariant<TBase, T>(this EventHandler<TBase> handler) where T : TBase
Performs contravariant conversion
of actual generic argument specified
for EventHandler<T> type.
public static Func<object, TDelegate> CreateClosedDelegateFactory<TDelegate>(Expression<TDelegate> expression) where TDelegate : Delegate
Creates a factory for closed delegates.
public static RefFunc<TRef, TArgs, TResult> CreateDelegate<T, TRef, TArgs, TResult>(method ptr, T obj)
public static Func<T1, T2, T3, T4, TResult> CreateDelegate<T, T1, T2, T3, T4, TResult>(method ptr, T obj)
public static Action<T1, T2, T3, T4, T5, T6> CreateDelegate<T, T1, T2, T3, T4, T5, T6>(method ptr, T obj)
public static Func<T1, T2, T3, T4, T5, TResult> CreateDelegate<T1, T2, T3, T4, T5, TResult>(method ptr)
public static Func<T1, T2, T3, T4, T5, TResult> CreateDelegate<T, T1, T2, T3, T4, T5, TResult>(method ptr, T obj)
public static Func<T1, T2, T3, T4, T5, T6, TResult> CreateDelegate<T1, T2, T3, T4, T5, T6, TResult>(method ptr)
public static Func<T1, T2, T3, T4, T5, T6, TResult> CreateDelegate<T, T1, T2, T3, T4, T5, T6, TResult>(method ptr, T obj)
public static TDelegate CreateOpenDelegate<TDelegate>(Expression<TDelegate> expression) where TDelegate : Delegate
Creates open delegate for the instance method, property, operator referenced
in expression tree.
public static Action<T, TValue> CreateOpenDelegate<T, TValue>(Expression<Func<T, TValue>> properyExpr)
Creates open delegate for instance property setter.
Creates a delegate that hides the return value.
Creates a delegate that hides the return value.
Converts action to async delegate.
public static Func<T, CancellationToken, ValueTask<TResult>> ToAsync<T, TResult>(this Func<T, TResult> action)
Converts function to async delegate.
Converts action to async delegate.
Converts function to async delegate.
public static Func<T1, T2, CancellationToken, ValueTask> ToAsync<T1, T2>(this Action<T1, T2> action)
Converts action to async delegate.
public static Func<T1, T2, CancellationToken, ValueTask<TResult>> ToAsync<T1, T2, TResult>(this Func<T1, T2, TResult> func)
Converts function to async delegate.
Converts implicitly bound delegate into its unbound version.
Converts implicitly bound delegate into its unbound version.
Converts implicitly bound delegate into its unbound version.
Converts implicitly bound delegate into its unbound version.
Converts implicitly bound delegate into its unbound version.
Converts implicitly bound delegate into its unbound version.
public static Func<T, T1, T2, T3, TResult> Unbind<T, T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> func)
Converts implicitly bound delegate into its unbound version.
Converts implicitly bound delegate into its unbound version.
public static Func<T, T1, T2, T3, T4, TResult> Unbind<T, T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> func)
Converts implicitly bound delegate into its unbound version.
public static Action<T, T1, T2, T3, T4> Unbind<T, T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action)
Converts implicitly bound delegate into its unbound version.
public 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)
Converts implicitly bound delegate into its unbound version.
public static Action<T, T1, T2, T3, T4, T5> Unbind<T, T1, T2, T3, T4, T5>(this Action<T1, T2, T3, T4, T5> action)
Converts implicitly bound delegate into its unbound version.
Converts implicitly bound delegate into its unbound version.