DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.9.0" />

.NET API 564,632 bytes

 DelegateHelpers

public static class DelegateHelpers
Represents various extensions of delegates.
public static Action Bind<T>(this Action<T> action, T obj)

Produces a delegate whose first parameter is implicitly bound to the given object.

public static Func<TResult> Bind<T, TResult>(this Func<T, TResult> func, T obj)

Produces a delegate whose first parameter is implicitly bound to the given object.

public static Func<T2, TResult> Bind<T1, T2, TResult>(this Func<T1, T2, TResult> func, T1 obj)

Produces a delegate whose first parameter is implicitly bound to the given object.

public static Action<T2> Bind<T1, T2>(this Action<T1, T2> action, T1 obj)

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.

public static Action<T2, T3> Bind<T1, T2, T3>(this Action<T1, T2, T3> action, T1 obj)

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.

public static Action<T2, T3, T4> Bind<T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action, T1 obj)

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.

public static Func<bool> Bind<T>(this Predicate<T> predicate, T obj)

Produces a delegate whose first parameter is implicitly bound to the given object.

public static TDelegate ChangeType<TDelegate>(this Delegate d) where TDelegate : Delegate

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 RefAction<T, TArgs> CreateDelegate<T, TArgs>(method ptr)

public static RefAction<TRef, TArgs> CreateDelegate<T, TRef, TArgs>(method ptr, T obj)

public static RefFunc<T, TArgs, TResult> CreateDelegate<T, TArgs, TResult>(method ptr)

public static RefFunc<TRef, TArgs, TResult> CreateDelegate<T, TRef, TArgs, TResult>(method ptr, T obj)

public static Action CreateDelegate(method ptr)

public static Action CreateDelegate<T>(method ptr, T obj)

public static Action<T> CreateDelegate<T>(method ptr)

public static Action<T1> CreateDelegate<T, T1>(method ptr, T obj)

public static Func<TResult> CreateDelegate<TResult>(method ptr)

public static Func<TResult> CreateDelegate<T, TResult>(method ptr, T obj)

public static Action<T1, T2> CreateDelegate<T1, T2>(method ptr)

public static Action<T1, T2> CreateDelegate<T, T1, T2>(method ptr, T obj)

public static Func<T, TResult> CreateDelegate<T, TResult>(method ptr)

public static Func<TArg, TResult> CreateDelegate<T, TArg, TResult>(method ptr, T obj)

public static Action<T1, T2, T3> CreateDelegate<T1, T2, T3>(method ptr)

public static Action<T1, T2, T3> CreateDelegate<T, T1, T2, T3>(method ptr, T obj)

public static Func<T1, T2, TResult> CreateDelegate<T1, T2, TResult>(method ptr)

public static Func<T1, T2, TResult> CreateDelegate<T, T1, T2, TResult>(method ptr, T obj)

public static Action<T1, T2, T3, T4> CreateDelegate<T1, T2, T3, T4>(method ptr)

public static Action<T1, T2, T3, T4> CreateDelegate<T, T1, T2, T3, T4>(method ptr, T obj)

public static Func<T1, T2, T3, TResult> CreateDelegate<T1, T2, T3, TResult>(method ptr)

public static Func<T1, T2, T3, TResult> CreateDelegate<T, T1, T2, T3, TResult>(method ptr, T obj)

public static Action<T1, T2, T3, T4, T5> CreateDelegate<T1, T2, T3, T4, T5>(method ptr)

public static Action<T1, T2, T3, T4, T5> CreateDelegate<T, T1, T2, T3, T4, T5>(method ptr, T obj)

public static Func<T1, T2, T3, T4, TResult> CreateDelegate<T1, T2, T3, T4, TResult>(method ptr)

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<T1, T2, T3, T4, T5, T6>(method ptr)

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 ReadOnlySpanAction<T, TArg> CreateDelegate<T, TArg>(method ptr)

public static ReadOnlySpanAction<TItem, TArg> CreateDelegate<T, TItem, TArg>(method ptr, T obj)

public static SpanAction<T, TArg> CreateDelegate<T, TArg>(method ptr)

public static SpanAction<TItem, TArg> CreateDelegate<T, TItem, TArg>(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.

public static Action<T> Unbind<T>(this Action action)

Converts implicitly bound delegate into its unbound version.

public static Func<T, TResult> Unbind<T, TResult>(this Func<TResult> func)

Converts implicitly bound delegate into its unbound version.

public static Func<T, TArg, TResult> Unbind<T, TArg, TResult>(this Func<TArg, TResult> func)

Converts implicitly bound delegate into its unbound version.

public static Action<T, TArg> Unbind<T, TArg>(this Action<TArg> action)

Converts implicitly bound delegate into its unbound version.

public static Func<T, T1, T2, TResult> Unbind<T, T1, T2, TResult>(this Func<T1, T2, TResult> func)

Converts implicitly bound delegate into its unbound version.

public static Action<T, T1, T2> Unbind<T, T1, T2>(this Action<T1, T2> action)

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.

public static Action<T, T1, T2, T3> Unbind<T, T1, T2, T3>(this Action<T1, T2, T3> action)

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.

public static Predicate<T> Unbind<T>(this Func<bool> func)

Converts implicitly bound delegate into its unbound version.