Show / Hide Table of Contents

Class DelegateHelpers

Represents various extensions of delegates.

Inheritance
object
DelegateHelpers
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public static class DelegateHelpers

Methods

View Source

AsConverter<T>(Predicate<T>)

Represents predicate as type Converter<TInput, TOutput>.

Declaration
public static Converter<T, bool> AsConverter<T>(this Predicate<T> predicate) where T : allows ref struct
Parameters
Type Name Description
Predicate<T> predicate
Returns
Type Description
Converter<T, bool>

A delegate of type Converter<TInput, TOutput> referencing the same method as original predicate.

Type Parameters
Name Description
T
View Source

AsFunc<T>(Predicate<T>)

Represents predicate as type Func<T, TResult>.

Declaration
public static Func<T, bool> AsFunc<T>(this Predicate<T> predicate) where T : allows ref struct
Parameters
Type Name Description
Predicate<T> predicate
Returns
Type Description
Func<T, bool>

A delegate of type Func<T, TResult> referencing the same method as original predicate.

Type Parameters
Name Description
T
View Source

AsFunc<TInput, TOutput>(Converter<TInput, TOutput>)

Converts Converter<TInput, TOutput> into Func<T, TResult>.

Declaration
public static Func<TInput, TOutput> AsFunc<TInput, TOutput>(this Converter<TInput, TOutput> converter) where TInput : allows ref struct where TOutput : allows ref struct
Parameters
Type Name Description
Converter<TInput, TOutput> converter
Returns
Type Description
Func<TInput, TOutput>

A delegate of type Func<T, TResult> referencing the same method as original delegate.

Type Parameters
Name Description
TInput
TOutput
View Source

AsPredicate<TInput>(Converter<TInput, bool>)

Converts Converter<TInput, TOutput> into predicate.

Declaration
public static Predicate<TInput> AsPredicate<TInput>(this Converter<TInput, bool> converter) where TInput : allows ref struct
Parameters
Type Name Description
Converter<TInput, bool> converter
Returns
Type Description
Predicate<TInput>

A delegate of type Predicate<T> referencing the same method as original delegate.

Type Parameters
Name Description
TInput
View Source

AsPredicate<T>(Func<T, bool>)

Converts Func<T, TResult> into predicate.

Declaration
public static Predicate<T> AsPredicate<T>(this Func<T, bool> func) where T : allows ref struct
Parameters
Type Name Description
Func<T, bool> func
Returns
Type Description
Predicate<T>

A delegate of type Predicate<T> referencing the same method as original delegate.

Type Parameters
Name Description
T
View Source

Bind<T>(Action<T>, T)

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

Declaration
public static Action Bind<T>(this Action<T> receiver, T obj) where T : class
Parameters
Type Name Description
Action<T> receiver
T obj

The object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.

Returns
Type Description
Action

The delegate targeting the specified object.

Type Parameters
Name Description
T
Exceptions
Type Condition
ArgumentNullException

obj is null.

View Source

Bind<T>(Predicate<T>, T)

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

Declaration
public static Func<bool> Bind<T>(this Predicate<T> receiver, T obj) where T : class
Parameters
Type Name Description
Predicate<T> receiver
T obj

The 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
T
Exceptions
Type Condition
ArgumentNullException

obj is null.

View Source

Bind<T1, T2>(Action<T1, T2>, T1)

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

Declaration
public static Action<T2> Bind<T1, T2>(this Action<T1, T2> receiver, T1 obj) where T1 : class where T2 : notnull, allows ref struct
Parameters
Type Name Description
Action<T1, T2> receiver
T1 obj

The 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
T1
T2
Exceptions
Type Condition
ArgumentNullException

obj is null.

View Source

Bind<T, TResult>(Func<T, TResult>, T)

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

Declaration
public static Func<TResult> Bind<T, TResult>(this Func<T, TResult> receiver, T obj) where T : class where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T, TResult> receiver
T obj

The 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
T
TResult
Exceptions
Type Condition
ArgumentNullException

obj is null.

View Source

Bind<T1, T2, T3>(Action<T1, T2, T3>, T1)

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

Declaration
public static Action<T2, T3> Bind<T1, T2, T3>(this Action<T1, T2, T3> receiver, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3> receiver
T1 obj

The 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
T1
T2
T3
Exceptions
Type Condition
ArgumentNullException

obj is null.

View Source

Bind<T1, T2, TResult>(Func<T1, T2, TResult>, T1)

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

Declaration
public static Func<T2, TResult> Bind<T1, T2, TResult>(this Func<T1, T2, TResult> receiver, T1 obj) where T1 : class where T2 : notnull, allows ref struct where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T1, T2, TResult> receiver
T1 obj

The 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
T1
T2
TResult
Exceptions
Type Condition
ArgumentNullException

obj is null.

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.

Declaration
public static Action<T2, T3, T4> Bind<T1, T2, T3, T4>(this Action<T1, T2, T3, T4> receiver, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where T4 : notnull, allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3, T4> receiver
T1 obj

The 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
T1
T2
T3
T4
Exceptions
Type Condition
ArgumentNullException

obj is null.

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.

Declaration
public static Func<T2, T3, TResult> Bind<T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> receiver, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T1, T2, T3, TResult> receiver
T1 obj

The 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
T1
T2
T3
TResult
Exceptions
Type Condition
ArgumentNullException

obj is null.

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.

Declaration
public static Action<T2, T3, T4, T5> Bind<T1, T2, T3, T4, T5>(this Action<T1, T2, T3, T4, T5> receiver, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where T4 : notnull, allows ref struct where T5 : notnull, allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3, T4, T5> receiver
T1 obj

The 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
T1
T2
T3
T4
T5
Exceptions
Type Condition
ArgumentNullException

obj is null.

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.

Declaration
public static Func<T2, T3, T4, TResult> Bind<T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> receiver, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where T4 : notnull, allows ref struct where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T1, T2, T3, T4, TResult> receiver
T1 obj

The 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
T1
T2
T3
T4
TResult
Exceptions
Type Condition
ArgumentNullException

obj is null.

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.

Declaration
public static Func<T2, T3, T4, T5, TResult> Bind<T1, T2, T3, T4, T5, TResult>(this Func<T1, T2, T3, T4, T5, TResult> receiver, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where T4 : notnull, allows ref struct where T5 : notnull, allows ref struct where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T1, T2, T3, T4, T5, TResult> receiver
T1 obj

The 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
T1
T2
T3
T4
T5
TResult
Exceptions
Type Condition
ArgumentNullException

obj is null.

View Source

ChangeType<TDelegate>(Delegate)

Returns a new delegate of different type which points to the same method as original delegate.

Declaration
public static TDelegate ChangeType<TDelegate>(this Delegate d) where TDelegate : Delegate
Parameters
Type Name Description
Delegate d

Delegate to convert.

Returns
Type Description
TDelegate

A method wrapped into new delegate type.

Type Parameters
Name Description
TDelegate

A new delegate type.

Exceptions
Type Condition
ArgumentException

Cannot convert delegate type.

View Source

Constant<T>(bool)

Returns a predicate which always returns the specified value.

Declaration
public static Predicate<T> Constant<T>(bool value) where T : allows ref struct
Parameters
Type Name Description
bool value

The value to be returned by the predicate.

Returns
Type Description
Predicate<T>

A cached predicate always returning value.

Type Parameters
Name Description
T
View Source

Constant<TResult>(TResult)

Constructs Func<TResult> returning the same instance each call.

Declaration
public static Func<TResult> Constant<TResult>(TResult obj)
Parameters
Type Name Description
TResult obj

The object to be returned from the delegate.

Returns
Type Description
Func<TResult>

The delegate returning obj each call.

Type Parameters
Name Description
TResult
View Source

Constant<T, TResult>(TResult)

Constructs Func<T, TResult> returning the same instance each call.

Declaration
public static Func<T, TResult> Constant<T, TResult>(TResult obj) where T : allows ref struct
Parameters
Type Name Description
TResult obj

The object to be returned from the delegate.

Returns
Type Description
Func<T, TResult>

The delegate returning obj each call.

Type Parameters
Name Description
T
TResult
View Source

Convert<TInput, TOutput>(TInput)

Returns the input argument.

Declaration
public static TOutput Convert<TInput, TOutput>(TInput arg) where TInput : TOutput
Parameters
Type Name Description
TInput arg

The argument to be returned.

Returns
Type Description
TOutput

The same as arg.

Type Parameters
Name Description
TInput
TOutput
View Source

CreateClosedDelegateFactory<TDelegate>(Expression<TDelegate>)

Creates a factory for closed delegates.

Declaration
public static Func<object, TDelegate> CreateClosedDelegateFactory<TDelegate>(this 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
TDelegate

The type of the delegate describing expression tree.

View Source

CreateOpenDelegate<TDelegate>(Expression<TDelegate>)

Creates open delegate for the instance method, property, operator referenced in expression tree.

Declaration
public static TDelegate CreateOpenDelegate<TDelegate>(this Expression<TDelegate> expression) where TDelegate : Delegate
Parameters
Type Name Description
Expression<TDelegate> expression

The expression tree containing instance method call.

Returns
Type Description
TDelegate

The open delegate.

Type Parameters
Name Description
TDelegate

The type of the delegate describing expression tree.

Exceptions
Type Condition
ArgumentException

expression is not valid expression tree.

View Source

CreateOpenDelegate<T, TValue>(Expression<Func<T, TValue>>)

Creates open delegate for instance property setter.

Declaration
public static Action<T, TValue> CreateOpenDelegate<T, TValue>(this Expression<Func<T, TValue>> propertyExpr) where T : class where TValue : allows ref struct
Parameters
Type Name Description
Expression<Func<T, TValue>> propertyExpr

The expression representing property.

Returns
Type Description
Action<T, TValue>

The open delegate representing property setter.

Type Parameters
Name Description
T

The declaring type.

TValue

The type of property value.

View Source

FromPointer(delegate*<void>)

Declaration
[CLSCompliant(false)]
public static Action FromPointer(delegate*<void> ptr)
Parameters
Type Name Description
delegate*<void> ptr
Returns
Type Description
Action
View Source

FromPointer<TResult>(delegate*<TResult>)

Declaration
[CLSCompliant(false)]
public static Func<TResult> FromPointer<TResult>(delegate*<TResult> ptr) where TResult : allows ref struct
Parameters
Type Name Description
delegate*<TResult> ptr
Returns
Type Description
Func<TResult>
Type Parameters
Name Description
TResult
View Source

FromPointer<TResult>(delegate*<TResult>)

Declaration
[CLSCompliant(false)]
public static Func<TResult> FromPointer<TResult>(delegate*<TResult> ptr) where TResult : allows ref struct
Parameters
Type Name Description
delegate*<TResult> ptr
Returns
Type Description
Func<TResult>
Type Parameters
Name Description
TResult
View Source

FromPointer<TTarget>(delegate*<TTarget, void>, TTarget)

Declaration
[CLSCompliant(false)]
public static Action FromPointer<TTarget>(delegate*<TTarget, void> ptr, TTarget target) where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, void> ptr
TTarget target
Returns
Type Description
Action
Type Parameters
Name Description
TTarget
View Source

FromPointer<TItem, TArg>(delegate*<Span<TItem>, TArg, void>)

Declaration
[CLSCompliant(false)]
public static SpanAction<TItem, TArg> FromPointer<TItem, TArg>(delegate*<Span<TItem>, TArg, void> ptr) where TArg : allows ref struct
Parameters
Type Name Description
delegate*<Span<TItem>, TArg, void> ptr
Returns
Type Description
SpanAction<TItem, TArg>
Type Parameters
Name Description
TItem
TArg
View Source

FromPointer<TItem, TArg>(delegate*<Span<TItem>, TArg, void>)

Declaration
[CLSCompliant(false)]
public static SpanAction<TItem, TArg> FromPointer<TItem, TArg>(delegate*<Span<TItem>, TArg, void> ptr) where TArg : allows ref struct
Parameters
Type Name Description
delegate*<Span<TItem>, TArg, void> ptr
Returns
Type Description
SpanAction<TItem, TArg>
Type Parameters
Name Description
TItem
TArg
View Source

FromPointer<TItem, TArg>(delegate*<Span<TItem>, TArg, void>)

Declaration
[CLSCompliant(false)]
public static SpanAction<TItem, TArg> FromPointer<TItem, TArg>(delegate*<Span<TItem>, TArg, void> ptr) where TArg : allows ref struct
Parameters
Type Name Description
delegate*<Span<TItem>, TArg, void> ptr
Returns
Type Description
SpanAction<TItem, TArg>
Type Parameters
Name Description
TItem
TArg
View Source

FromPointer<TItem, TArg>(delegate*<Span<TItem>, TArg, void>)

Declaration
[CLSCompliant(false)]
public static SpanAction<TItem, TArg> FromPointer<TItem, TArg>(delegate*<Span<TItem>, TArg, void> ptr) where TArg : allows ref struct
Parameters
Type Name Description
delegate*<Span<TItem>, TArg, void> ptr
Returns
Type Description
SpanAction<TItem, TArg>
Type Parameters
Name Description
TItem
TArg
View Source

FromPointer<TResult, TTarget>(delegate*<TTarget, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<TResult> FromPointer<TResult, TTarget>(delegate*<TTarget, TResult> ptr, TTarget target) where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, TResult> ptr
TTarget target
Returns
Type Description
Func<TResult>
Type Parameters
Name Description
TResult
TTarget
View Source

FromPointer<TResult, TTarget>(delegate*<TTarget, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<TResult> FromPointer<TResult, TTarget>(delegate*<TTarget, TResult> ptr, TTarget target) where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, TResult> ptr
TTarget target
Returns
Type Description
Func<TResult>
Type Parameters
Name Description
TResult
TTarget
View Source

FromPointer<T1, T2, TResult>(delegate*<T1, T2, TResult>)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, TResult> FromPointer<T1, T2, TResult>(delegate*<T1, T2, TResult> ptr) where T1 : allows ref struct where T2 : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
delegate*<T1, T2, TResult> ptr
Returns
Type Description
Func<T1, T2, TResult>
Type Parameters
Name Description
T1
T2
TResult
View Source

FromPointer<T1, T2, TResult>(delegate*<T1, T2, TResult>)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, TResult> FromPointer<T1, T2, TResult>(delegate*<T1, T2, TResult> ptr) where T1 : allows ref struct where T2 : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
delegate*<T1, T2, TResult> ptr
Returns
Type Description
Func<T1, T2, TResult>
Type Parameters
Name Description
T1
T2
TResult
View Source

FromPointer<TItem, TArg, T>(delegate*<T, Span<TItem>, TArg, void>, T)

Declaration
[CLSCompliant(false)]
public static SpanAction<TItem, TArg> FromPointer<TItem, TArg, T>(delegate*<T, Span<TItem>, TArg, void> ptr, T obj) where TArg : allows ref struct where T : class
Parameters
Type Name Description
delegate*<T, Span<TItem>, TArg, void> ptr
T obj
Returns
Type Description
SpanAction<TItem, TArg>
Type Parameters
Name Description
TItem
TArg
T
View Source

FromPointer<TItem, TArg, T>(delegate*<T, Span<TItem>, TArg, void>, T)

Declaration
[CLSCompliant(false)]
public static SpanAction<TItem, TArg> FromPointer<TItem, TArg, T>(delegate*<T, Span<TItem>, TArg, void> ptr, T obj) where TArg : allows ref struct where T : class
Parameters
Type Name Description
delegate*<T, Span<TItem>, TArg, void> ptr
T obj
Returns
Type Description
SpanAction<TItem, TArg>
Type Parameters
Name Description
TItem
TArg
T
View Source

FromPointer<TItem, TArg, T>(delegate*<T, Span<TItem>, TArg, void>, T)

Declaration
[CLSCompliant(false)]
public static SpanAction<TItem, TArg> FromPointer<TItem, TArg, T>(delegate*<T, Span<TItem>, TArg, void> ptr, T obj) where TArg : allows ref struct where T : class
Parameters
Type Name Description
delegate*<T, Span<TItem>, TArg, void> ptr
T obj
Returns
Type Description
SpanAction<TItem, TArg>
Type Parameters
Name Description
TItem
TArg
T
View Source

FromPointer<TItem, TArg, T>(delegate*<T, Span<TItem>, TArg, void>, T)

Declaration
[CLSCompliant(false)]
public static SpanAction<TItem, TArg> FromPointer<TItem, TArg, T>(delegate*<T, Span<TItem>, TArg, void> ptr, T obj) where TArg : allows ref struct where T : class
Parameters
Type Name Description
delegate*<T, Span<TItem>, TArg, void> ptr
T obj
Returns
Type Description
SpanAction<TItem, TArg>
Type Parameters
Name Description
TItem
TArg
T
View Source

FromPointer<T1, T2, T3, TResult>(delegate*<T1, T2, T3, TResult>)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, TResult> FromPointer<T1, T2, T3, TResult>(delegate*<T1, T2, T3, TResult> ptr) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
delegate*<T1, T2, T3, TResult> ptr
Returns
Type Description
Func<T1, T2, T3, TResult>
Type Parameters
Name Description
T1
T2
T3
TResult
View Source

FromPointer<T1, T2, T3, TResult>(delegate*<T1, T2, T3, TResult>)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, TResult> FromPointer<T1, T2, T3, TResult>(delegate*<T1, T2, T3, TResult> ptr) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
delegate*<T1, T2, T3, TResult> ptr
Returns
Type Description
Func<T1, T2, T3, TResult>
Type Parameters
Name Description
T1
T2
T3
TResult
View Source

FromPointer<T1, T2, TResult, TTarget>(delegate*<TTarget, T1, T2, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, TResult> FromPointer<T1, T2, TResult, TTarget>(delegate*<TTarget, T1, T2, TResult> ptr, TTarget target) where T1 : allows ref struct where T2 : allows ref struct where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, T1, T2, TResult> ptr
TTarget target
Returns
Type Description
Func<T1, T2, TResult>
Type Parameters
Name Description
T1
T2
TResult
TTarget
View Source

FromPointer<T1, T2, TResult, TTarget>(delegate*<TTarget, T1, T2, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, TResult> FromPointer<T1, T2, TResult, TTarget>(delegate*<TTarget, T1, T2, TResult> ptr, TTarget target) where T1 : allows ref struct where T2 : allows ref struct where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, T1, T2, TResult> ptr
TTarget target
Returns
Type Description
Func<T1, T2, TResult>
Type Parameters
Name Description
T1
T2
TResult
TTarget
View Source

FromPointer<T1, T2, T3, T4, TResult>(delegate*<T1, T2, T3, T4, TResult>)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, TResult> FromPointer<T1, T2, T3, T4, TResult>(delegate*<T1, T2, T3, T4, TResult> ptr) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
delegate*<T1, T2, T3, T4, TResult> ptr
Returns
Type Description
Func<T1, T2, T3, T4, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
TResult
View Source

FromPointer<T1, T2, T3, T4, TResult>(delegate*<T1, T2, T3, T4, TResult>)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, TResult> FromPointer<T1, T2, T3, T4, TResult>(delegate*<T1, T2, T3, T4, TResult> ptr) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
delegate*<T1, T2, T3, T4, TResult> ptr
Returns
Type Description
Func<T1, T2, T3, T4, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
TResult
View Source

FromPointer<T1, T2, T3, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, TResult> FromPointer<T1, T2, T3, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, TResult> ptr, TTarget target) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, T1, T2, T3, TResult> ptr
TTarget target
Returns
Type Description
Func<T1, T2, T3, TResult>
Type Parameters
Name Description
T1
T2
T3
TResult
TTarget
View Source

FromPointer<T1, T2, T3, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, TResult> FromPointer<T1, T2, T3, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, TResult> ptr, TTarget target) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, T1, T2, T3, TResult> ptr
TTarget target
Returns
Type Description
Func<T1, T2, T3, TResult>
Type Parameters
Name Description
T1
T2
T3
TResult
TTarget
View Source

FromPointer<T1, T2, T3, T4, T5, TResult>(delegate*<T1, T2, T3, T4, T5, TResult>)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, TResult> FromPointer<T1, T2, T3, T4, T5, TResult>(delegate*<T1, T2, T3, T4, T5, TResult> ptr) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
delegate*<T1, T2, T3, T4, T5, TResult> ptr
Returns
Type Description
Func<T1, T2, T3, T4, T5, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
T5
TResult
View Source

FromPointer<T1, T2, T3, T4, T5, TResult>(delegate*<T1, T2, T3, T4, T5, TResult>)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, TResult> FromPointer<T1, T2, T3, T4, T5, TResult>(delegate*<T1, T2, T3, T4, T5, TResult> ptr) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
delegate*<T1, T2, T3, T4, T5, TResult> ptr
Returns
Type Description
Func<T1, T2, T3, T4, T5, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
T5
TResult
View Source

FromPointer<T1, T2, T3, T4, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, TResult> FromPointer<T1, T2, T3, T4, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, TResult> ptr, TTarget target) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, T1, T2, T3, T4, TResult> ptr
TTarget target
Returns
Type Description
Func<T1, T2, T3, T4, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
TResult
TTarget
View Source

FromPointer<T1, T2, T3, T4, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, TResult> FromPointer<T1, T2, T3, T4, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, TResult> ptr, TTarget target) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, T1, T2, T3, T4, TResult> ptr
TTarget target
Returns
Type Description
Func<T1, T2, T3, T4, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
TResult
TTarget
View Source

FromPointer<T1, T2, T3, T4, T5, T6, TResult>(delegate*<T1, T2, T3, T4, T5, T6, TResult>)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, T6, TResult> FromPointer<T1, T2, T3, T4, T5, T6, TResult>(delegate*<T1, T2, T3, T4, T5, T6, TResult> ptr) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where T6 : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
delegate*<T1, T2, T3, T4, T5, T6, TResult> ptr
Returns
Type Description
Func<T1, T2, T3, T4, T5, T6, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
T5
T6
TResult
View Source

FromPointer<T1, T2, T3, T4, T5, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, T5, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, TResult> FromPointer<T1, T2, T3, T4, T5, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, T5, TResult> ptr, TTarget target) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, T1, T2, T3, T4, T5, TResult> ptr
TTarget target
Returns
Type Description
Func<T1, T2, T3, T4, T5, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
T5
TResult
TTarget
View Source

FromPointer<T1, T2, T3, T4, T5, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, T5, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, TResult> FromPointer<T1, T2, T3, T4, T5, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, T5, TResult> ptr, TTarget target) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, T1, T2, T3, T4, T5, TResult> ptr
TTarget target
Returns
Type Description
Func<T1, T2, T3, T4, T5, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
T5
TResult
TTarget
View Source

FromPointer<T1, T2, T3, T4, T5, T6, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, T5, T6, TResult>, TTarget)

Declaration
[CLSCompliant(false)]
public static Func<T1, T2, T3, T4, T5, T6, TResult> FromPointer<T1, T2, T3, T4, T5, T6, TResult, TTarget>(delegate*<TTarget, T1, T2, T3, T4, T5, T6, TResult> ptr, TTarget target) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where T6 : allows ref struct where TResult : allows ref struct where TTarget : class
Parameters
Type Name Description
delegate*<TTarget, T1, T2, T3, T4, T5, T6, TResult> ptr
TTarget target
Returns
Type Description
Func<T1, T2, T3, T4, T5, T6, TResult>
Type Parameters
Name Description
T1
T2
T3
T4
T5
T6
TResult
TTarget
View Source

HideReturnValue<TResult>(Func<TResult>)

Creates a delegate that hides the return value.

Declaration
public static Action HideReturnValue<TResult>(this Func<TResult> func) where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<TResult> func
Returns
Type Description
Action

The action that invokes the same method as the function.

Type Parameters
Name Description
TResult
Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

HideReturnValue<T, TResult>(Func<T, TResult>)

Creates a delegate that hides the return value.

Declaration
public static Action<T> HideReturnValue<T, TResult>(this Func<T, TResult> func) where T : allows ref struct where TResult : allows ref struct
Parameters
Type Name Description
Func<T, TResult> func
Returns
Type Description
Action<T>

The action that invokes the same method as the function.

Type Parameters
Name Description
T
TResult
Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

Identity<T>(T)

Returns the input argument.

Declaration
public static T Identity<T>(T arg) where T : allows ref struct
Parameters
Type Name Description
T arg

The argument to be returned.

Returns
Type Description
T

The same as arg.

Type Parameters
Name Description
T
View Source

IsNotNull<T>(T?)

Checks whether the specified object is null.

Declaration
public static bool IsNotNull<T>(T? value) where T : struct
Parameters
Type Name Description
T? value

The object to check.

Returns
Type Description
bool

true if value is null; otherwise, false.

Type Parameters
Name Description
T
View Source

IsNotNull<T>(T?)

Checks whether the specified object is not null.

Declaration
public static bool IsNotNull<T>(T? obj) where T : class?
Parameters
Type Name Description
T obj

The object to check.

Returns
Type Description
bool

false if obj is null; otherwise, true.

Type Parameters
Name Description
T
View Source

IsNull<T>(T?)

Checks whether the specified object is null.

Declaration
public static bool IsNull<T>(T? obj) where T : class?
Parameters
Type Name Description
T obj

The object to check.

Returns
Type Description
bool

true if obj is null; otherwise, false.

Type Parameters
Name Description
T
View Source

ToAsync(Action)

Converts action to async delegate.

Declaration
public static Func<CancellationToken, ValueTask> ToAsync(this Action action)
Parameters
Type Name Description
Action action
Returns
Type Description
Func<CancellationToken, ValueTask>

The asynchronous function that wraps the action.

Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

ToAsync<T>(Action<T>)

Converts action to async delegate.

Declaration
public static Func<T, CancellationToken, ValueTask> ToAsync<T>(this Action<T> action) where T : allows ref struct
Parameters
Type Name Description
Action<T> action
Returns
Type Description
Func<T, CancellationToken, ValueTask>

The asynchronous function that wraps the action.

Type Parameters
Name Description
T
Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

ToAsync<TResult>(Func<TResult>)

Converts function to async delegate.

Declaration
public static Func<CancellationToken, ValueTask<TResult>> ToAsync<TResult>(this Func<TResult> func)
Parameters
Type Name Description
Func<TResult> func
Returns
Type Description
Func<CancellationToken, ValueTask<TResult>>

The asynchronous function that wraps the function.

Type Parameters
Name Description
TResult
Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

ToAsync<T>(Predicate<T>)

Converts function to async delegate.

Declaration
public static Func<T, CancellationToken, ValueTask<bool>> ToAsync<T>(this Predicate<T> predicate) where T : allows ref struct
Parameters
Type Name Description
Predicate<T> predicate
Returns
Type Description
Func<T, CancellationToken, ValueTask<bool>>

The asynchronous function that wraps the predicate.

Type Parameters
Name Description
T
Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

ToAsync<T1, T2>(Action<T1, T2>)

Converts action to async delegate.

Declaration
public static Func<T1, T2, CancellationToken, ValueTask> ToAsync<T1, T2>(this Action<T1, T2> action) where T1 : allows ref struct where T2 : allows ref struct
Parameters
Type Name Description
Action<T1, T2> action
Returns
Type Description
Func<T1, T2, CancellationToken, ValueTask>

The asynchronous function that wraps the action.

Type Parameters
Name Description
T1
T2
Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

ToAsync<T, TResult>(Func<T, TResult>)

Converts function to async delegate.

Declaration
public static Func<T, CancellationToken, ValueTask<TResult>> ToAsync<T, TResult>(this Func<T, TResult> func) where T : allows ref struct
Parameters
Type Name Description
Func<T, TResult> func
Returns
Type Description
Func<T, CancellationToken, ValueTask<TResult>>

The asynchronous function that wraps the function.

Type Parameters
Name Description
T
TResult
Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

ToAsync<T1, T2, T3>(Action<T1, T2, T3>)

Converts action to async delegate.

Declaration
public static Func<T1, T2, T3, CancellationToken, ValueTask> ToAsync<T1, T2, T3>(this Action<T1, T2, T3> action) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3> action
Returns
Type Description
Func<T1, T2, T3, CancellationToken, ValueTask>

The asynchronous function that wraps the action.

Type Parameters
Name Description
T1
T2
T3
Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

ToAsync<T1, T2, TResult>(Func<T1, T2, TResult>)

Converts function to async delegate.

Declaration
public static Func<T1, T2, CancellationToken, ValueTask<TResult>> ToAsync<T1, T2, TResult>(this Func<T1, T2, TResult> func) where T1 : allows ref struct where T2 : allows ref struct
Parameters
Type Name Description
Func<T1, T2, TResult> func
Returns
Type Description
Func<T1, T2, CancellationToken, ValueTask<TResult>>

The asynchronous function that wraps the function.

Type Parameters
Name Description
T1
T2
TResult
Exceptions
Type Condition
ArgumentNullException

The receiver is null.

View Source

TryInvoke(Action)

Invokes the action without throwing the exception.

Declaration
public static Exception? TryInvoke(this Action action)
Parameters
Type Name Description
Action action
Returns
Type Description
Exception

The exception caused by the action; or null, if the delegate is called successfully.

View Source

TryInvoke<T>(Action<T>, T)

Invokes the action without throwing the exception.

Declaration
public static Exception? TryInvoke<T>(this Action<T> action, T arg) where T : allows ref struct
Parameters
Type Name Description
Action<T> action
T arg

The first action argument.

Returns
Type Description
Exception

The exception caused by the action; or null, if the delegate is called successfully.

Type Parameters
Name Description
T
View Source

TryInvoke<TResult>(Func<TResult>)

Invokes function without throwing the exception.

Declaration
public static Result<TResult> TryInvoke<TResult>(this Func<TResult> func)
Parameters
Type Name Description
Func<TResult> func
Returns
Type Description
Result<TResult>

The invocation result.

Type Parameters
Name Description
TResult
View Source

TryInvoke<T>(Predicate<T>, T)

Invokes predicate without throwing the exception.

Declaration
public static Result<bool> TryInvoke<T>(this Predicate<T> predicate, T obj) where T : allows ref struct
Parameters
Type Name Description
Predicate<T> predicate
T obj

The object to compare against the criteria defined within the method represented by this delegate.

Returns
Type Description
Result<bool>

true if obj meets the criteria defined within the method represented by this delegate; otherwise, false.

Type Parameters
Name Description
T
View Source

TryInvoke<T1, T2>(Action<T1, T2>, T1, T2)

Invokes the action without throwing the exception.

Declaration
public static Exception? TryInvoke<T1, T2>(this Action<T1, T2> action, T1 arg1, T2 arg2) where T1 : allows ref struct where T2 : allows ref struct
Parameters
Type Name Description
Action<T1, T2> action
T1 arg1

The first action argument.

T2 arg2

The second action argument.

Returns
Type Description
Exception

The exception caused by the action; or null, if the delegate is called successfully.

Type Parameters
Name Description
T1
T2
View Source

TryInvoke<TInput, TOutput>(Converter<TInput, TOutput>, TInput)

Converts the input value without throwing exception.

Declaration
public static Result<TOutput> TryInvoke<TInput, TOutput>(this Converter<TInput, TOutput> converter, TInput input) where TInput : allows ref struct
Parameters
Type Name Description
Converter<TInput, TOutput> converter
TInput input

The input value to be converted.

Returns
Type Description
Result<TOutput>

The conversion result.

Type Parameters
Name Description
TInput
TOutput
View Source

TryInvoke<T, TResult>(Func<T, TResult>, T)

Invokes function without throwing the exception.

Declaration
public static Result<TResult> TryInvoke<T, TResult>(this Func<T, TResult> func, T arg) where T : allows ref struct
Parameters
Type Name Description
Func<T, TResult> func
T arg

The first function argument.

Returns
Type Description
Result<TResult>

The invocation result.

Type Parameters
Name Description
T
TResult
View Source

TryInvoke<T1, T2, T3>(Action<T1, T2, T3>, T1, T2, T3)

Invokes the action without throwing the exception.

Declaration
public static Exception? TryInvoke<T1, T2, T3>(this Action<T1, T2, T3> action, T1 arg1, T2 arg2, T3 arg3) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3> action
T1 arg1

The first action argument.

T2 arg2

The second action argument.

T3 arg3

The third action argument.

Returns
Type Description
Exception

The exception caused by the action; or null, if the delegate is called successfully.

Type Parameters
Name Description
T1
T2
T3
View Source

TryInvoke<T1, T2, TResult>(Func<T1, T2, TResult>, T1, T2)

Invokes function without throwing the exception.

Declaration
public static Result<TResult> TryInvoke<T1, T2, TResult>(this Func<T1, T2, TResult> func, T1 arg1, T2 arg2) where T1 : allows ref struct where T2 : allows ref struct
Parameters
Type Name Description
Func<T1, T2, TResult> func
T1 arg1

The first function argument.

T2 arg2

The second function argument.

Returns
Type Description
Result<TResult>

The invocation result.

Type Parameters
Name Description
T1
T2
TResult
View Source

TryInvoke<T1, T2, T3, T4>(Action<T1, T2, T3, T4>, T1, T2, T3, T4)

Invokes the action without throwing the exception.

Declaration
public static Exception? TryInvoke<T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action, T1 arg1, T2 arg2, T3 arg3, T4 arg4) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3, T4> action
T1 arg1

The first action argument.

T2 arg2

The second action argument.

T3 arg3

The third action argument.

T4 arg4

The fourth action argument.

Returns
Type Description
Exception

The exception caused by the action; or null, if the delegate is called successfully.

Type Parameters
Name Description
T1
T2
T3
T4
View Source

TryInvoke<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>, T1, T2, T3)

Invokes function without throwing the exception.

Declaration
public static Result<TResult> TryInvoke<T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> func, T1 arg1, T2 arg2, T3 arg3) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct
Parameters
Type Name Description
Func<T1, T2, T3, TResult> func
T1 arg1

The first function argument.

T2 arg2

The second function argument.

T3 arg3

The third function argument.

Returns
Type Description
Result<TResult>

The invocation result.

Type Parameters
Name Description
T1
T2
T3
TResult
View Source

TryInvoke<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5)

Invokes the action without throwing the exception.

Declaration
public static Exception? TryInvoke<T1, T2, T3, T4, T5>(this Action<T1, T2, T3, T4, T5> action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3, T4, T5> action
T1 arg1

The first action argument.

T2 arg2

The second action argument.

T3 arg3

The third action argument.

T4 arg4

The fourth action argument.

T5 arg5

The fifth action argument.

Returns
Type Description
Exception

The exception caused by the action; or null, if the delegate is called successfully.

Type Parameters
Name Description
T1
T2
T3
T4
T5
View Source

TryInvoke<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>, T1, T2, T3, T4)

Invokes function without throwing the exception.

Declaration
public static Result<TResult> TryInvoke<T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> func, T1 arg1, T2 arg2, T3 arg3, T4 arg4) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct
Parameters
Type Name Description
Func<T1, T2, T3, T4, TResult> func
T1 arg1

The first function argument.

T2 arg2

The second function argument.

T3 arg3

The third function argument.

T4 arg4

The fourth function argument.

Returns
Type Description
Result<TResult>

The invocation result.

Type Parameters
Name Description
T1
T2
T3
T4
TResult
View Source

TryInvoke<T1, T2, T3, T4, T5, T6>(Action<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6)

Invokes the action without throwing the exception.

Declaration
public static Exception? TryInvoke<T1, T2, T3, T4, T5, T6>(this Action<T1, T2, T3, T4, T5, T6> action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where T6 : allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3, T4, T5, T6> action
T1 arg1

The first action argument.

T2 arg2

The second action argument.

T3 arg3

The third action argument.

T4 arg4

The fourth action argument.

T5 arg5

The fifth action argument.

T6 arg6

The sixth action argument.

Returns
Type Description
Exception

The exception caused by the action; or null, if the delegate is called successfully.

Type Parameters
Name Description
T1
T2
T3
T4
T5
T6
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.

Declaration
public static Result<TResult> TryInvoke<T1, T2, T3, T4, T5, TResult>(this Func<T1, T2, T3, T4, T5, TResult> func, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
Parameters
Type Name Description
Func<T1, T2, T3, T4, T5, TResult> func
T1 arg1

The first function argument.

T2 arg2

The second function argument.

T3 arg3

The third function argument.

T4 arg4

The fourth function argument.

T5 arg5

The fifth function argument.

Returns
Type Description
Result<TResult>

The invocation result.

Type Parameters
Name Description
T1
T2
T3
T4
T5
TResult
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.

Declaration
public static Result<TResult> TryInvoke<T1, T2, T3, T4, T5, T6, TResult>(this Func<T1, T2, T3, T4, T5, T6, TResult> func, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where T6 : allows ref struct
Parameters
Type Name Description
Func<T1, T2, T3, T4, T5, T6, TResult> func
T1 arg1

The first function argument.

T2 arg2

The second function argument.

T3 arg3

The third function argument.

T4 arg4

The fourth function argument.

T5 arg5

The fifth function argument.

T6 arg6

The sixth function argument.

Returns
Type Description
Result<TResult>

The invocation result.

Type Parameters
Name Description
T1
T2
T3
T4
T5
T6
TResult
View Source

Unbind<T>(Action)

Converts implicitly bound delegate into its unbound version.

Declaration
public 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
T

The expected type of Target.

Exceptions
Type Condition
InvalidOperationException

Target of action is not contravariant to type T.

View Source

Unbind<T>(Func<bool>)

Converts implicitly bound delegate into its unbound version.

Declaration
public 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
T

The expected type of Target.

Exceptions
Type Condition
InvalidOperationException

Target of func is not contravariant to type T.

View Source

Unbind<T, TArg>(Action<TArg>)

Converts implicitly bound delegate into its unbound version.

Declaration
public static Action<T, TArg> Unbind<T, TArg>(this Action<TArg> action) where T : class where TArg : allows ref struct
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
T

The expected type of Target.

TArg

The type of the first explicit parameter.

Exceptions
Type Condition
InvalidOperationException

Target of action is not contravariant to type T.

View Source

Unbind<T, TResult>(Func<TResult>)

Converts implicitly bound delegate into its unbound version.

Declaration
public static Func<T, TResult> Unbind<T, TResult>(this Func<TResult> func) where T : class where TResult : allows ref struct
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
T

The expected type of Target.

TResult

The type of the return value of the method that the delegate encapsulates.

Exceptions
Type Condition
InvalidOperationException

Target of func is not contravariant to type T.

View Source

Unbind<T, T1, T2>(Action<T1, T2>)

Converts implicitly bound delegate into its unbound version.

Declaration
public static Action<T, T1, T2> Unbind<T, T1, T2>(this Action<T1, T2> action) where T : class where T1 : allows ref struct where T2 : allows ref struct
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
T

The expected type of Target.

T1

The type of the first explicit parameter.

T2

The type of the second explicit parameter.

Exceptions
Type Condition
InvalidOperationException

Target of action is not contravariant to type T.

View Source

Unbind<T, TArg, TResult>(Func<TArg, TResult>)

Converts implicitly bound delegate into its unbound version.

Declaration
public static Func<T, TArg, TResult> Unbind<T, TArg, TResult>(this Func<TArg, TResult> func) where T : class where TArg : allows ref struct
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
T

The expected type of Target.

TArg

The type of the first explicit parameter.

TResult

The type of the return value of the method that the delegate encapsulates.

Exceptions
Type Condition
InvalidOperationException

Target of func is not contravariant to type T.

View Source

Unbind<T, T1, T2, T3>(Action<T1, T2, T3>)

Converts implicitly bound delegate into its unbound version.

Declaration
public static Action<T, T1, T2, T3> Unbind<T, T1, T2, T3>(this Action<T1, T2, T3> action) where T : class where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct
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
T

The expected type of Target.

T1

The type of the first explicit parameter.

T2

The type of the second explicit parameter.

T3

The type of the third explicit parameter.

Exceptions
Type Condition
InvalidOperationException

Target of action is not contravariant to type T.

View Source

Unbind<T, T1, T2, TResult>(Func<T1, T2, TResult>)

Converts implicitly bound delegate into its unbound version.

Declaration
public static Func<T, T1, T2, TResult> Unbind<T, T1, T2, TResult>(this Func<T1, T2, TResult> func) where T : class where T1 : allows ref struct where T2 : allows ref struct where TResult : allows ref struct
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
T

The expected type of Target.

T1

The type of the first explicit parameter.

T2

The type of the second explicit parameter.

TResult

The type of the return value of the method that the delegate encapsulates.

Exceptions
Type Condition
InvalidOperationException

Target of func is not contravariant to type T.

View Source

Unbind<T, T1, T2, T3, T4>(Action<T1, T2, T3, T4>)

Converts implicitly bound delegate into its unbound version.

Declaration
public static Action<T, T1, T2, T3, T4> Unbind<T, T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action) where T : class where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct
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
T

The expected type of Target.

T1

The type of the first explicit parameter.

T2

The type of the second explicit parameter.

T3

The type of the third explicit parameter.

T4

The type of the fourth explicit parameter.

Exceptions
Type Condition
InvalidOperationException

Target of action is not contravariant to type T.

View Source

Unbind<T, T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>)

Converts implicitly bound delegate into its unbound version.

Declaration
public static Func<T, T1, T2, T3, TResult> Unbind<T, T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> func) where T : class where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where TResult : allows ref struct
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
T

The expected type of Target.

T1

The type of the first explicit parameter.

T2

The type of the second explicit parameter.

T3

The type of the third explicit parameter.

TResult

The type of the return value of the method that the delegate encapsulates.

Exceptions
Type Condition
InvalidOperationException

Target of func is not contravariant to type T.

View Source

Unbind<T, T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>)

Converts implicitly bound delegate into its unbound version.

Declaration
public 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 where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct
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
T

The expected type of Target.

T1

The type of the first explicit parameter.

T2

The type of the second explicit parameter.

T3

The type of the third explicit parameter.

T4

The type of the fourth explicit parameter.

T5

The type of the fifth explicit parameter.

Exceptions
Type Condition
InvalidOperationException

Target of action is not contravariant to type T.

View Source

Unbind<T, T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>)

Converts implicitly bound delegate into its unbound version.

Declaration
public 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 where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where TResult : allows ref struct
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
T

The expected type of Target.

T1

The type of the first explicit parameter.

T2

The type of the second explicit parameter.

T3

The type of the third explicit parameter.

T4

The type of the fourth explicit parameter.

TResult

The type of the return value of the method that the delegate encapsulates.

Exceptions
Type Condition
InvalidOperationException

Target of func is not contravariant to type T.

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.

Declaration
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) where T : class where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where TResult : allows ref struct
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
T

The expected type of Target.

T1

The type of the first explicit parameter.

T2

The type of the second explicit parameter.

T3

The type of the third explicit parameter.

T4

The type of the fourth explicit parameter.

T5

The type of the fifth explicit parameter.

TResult

The type of the return value of the method that the delegate encapsulates.

Exceptions
Type Condition
InvalidOperationException

Target of func is not contravariant to type T.

View Source

get_Identity<T>(Action<T>)

Represents Action<T> as Func<T, TResult> which doesn't modify the input value.

Declaration
public static Func<T, T> get_Identity<T>(Action<T> action) where T : allows ref struct
Parameters
Type Name Description
Action<T> action
Returns
Type Description
Func<T, T>

Func<T, TResult> that wraps action.

Type Parameters
Name Description
T
View Source

get_NoOp()

Gets the action that does nothing.

Declaration
public static Action get_NoOp()
Returns
Type Description
Action
View Source

get_NoOp<T>()

Gets the action that does nothing.

Declaration
public static Action<T> get_NoOp<T>() where T : allows ref struct
Returns
Type Description
Action<T>
Type Parameters
Name Description
T
View Source

get_NoOp<T1, T2>()

Gets the action that does nothing.

Declaration
public static Action<T1, T2> get_NoOp<T1, T2>() where T1 : allows ref struct where T2 : allows ref struct
Returns
Type Description
Action<T1, T2>
Type Parameters
Name Description
T1
T2
View Source

get_NoOp<T1, T2, T3>()

Gets the action that does nothing.

Declaration
public static Action<T1, T2, T3> get_NoOp<T1, T2, T3>() where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct
Returns
Type Description
Action<T1, T2, T3>
Type Parameters
Name Description
T1
T2
T3
View Source

get_NoOp<T1, T2, T3, T4>()

Gets the action that does nothing.

Declaration
public static Action<T1, T2, T3, T4> get_NoOp<T1, T2, T3, T4>() where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct
Returns
Type Description
Action<T1, T2, T3, T4>
Type Parameters
Name Description
T1
T2
T3
T4
View Source

get_NoOp<T1, T2, T3, T4, T5>()

Gets the action that does nothing.

Declaration
public static Action<T1, T2, T3, T4, T5> get_NoOp<T1, T2, T3, T4, T5>() where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct
Returns
Type Description
Action<T1, T2, T3, T4, T5>
Type Parameters
Name Description
T1
T2
T3
T4
T5
View Source

get_NoOp<T1, T2, T3, T4, T5, T6>()

Gets the action that does nothing.

Declaration
public static Action<T1, T2, T3, T4, T5, T6> get_NoOp<T1, T2, T3, T4, T5, T6>() where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct where T6 : allows ref struct
Returns
Type Description
Action<T1, T2, T3, T4, T5, T6>
Type Parameters
Name Description
T1
T2
T3
T4
T5
T6
View Source

op_BitwiseAnd<T>(Func<T, bool>, Func<T, bool>)

Returns a predicate which computes logical AND between results of two other predicates.

Declaration
public static Predicate<T> op_BitwiseAnd<T>(Func<T, bool> x, Func<T, bool> y) where T : allows ref struct
Parameters
Type Name Description
Func<T, bool> x

The first predicate acting as logical AND operand.

Func<T, bool> y

The second predicate acting as logical AND operand.

Returns
Type Description
Predicate<T>

The predicate which computes logical AND between results of two other predicates.

Type Parameters
Name Description
T
View Source

op_BitwiseAnd<T>(Predicate<T>, Predicate<T>)

Returns a predicate which computes logical AND between results of two other predicates.

Declaration
public static Predicate<T> op_BitwiseAnd<T>(Predicate<T> x, Predicate<T> y) where T : allows ref struct
Parameters
Type Name Description
Predicate<T> x

The first predicate acting as logical AND operand.

Predicate<T> y

The second predicate acting as logical AND operand.

Returns
Type Description
Predicate<T>

The predicate which computes logical AND between results of two other predicates.

Type Parameters
Name Description
T
View Source

op_BitwiseOr<T>(Func<T, bool>, Func<T, bool>)

Returns a predicate which computes logical OR between results of two other predicates.

Declaration
public static Predicate<T> op_BitwiseOr<T>(Func<T, bool> x, Func<T, bool> y) where T : allows ref struct
Parameters
Type Name Description
Func<T, bool> x

The first predicate acting as logical OR operand.

Func<T, bool> y

The second predicate acting as logical OR operand.

Returns
Type Description
Predicate<T>

The predicate which computes logical OR between results of two other predicates.

Type Parameters
Name Description
T
View Source

op_BitwiseOr<T>(Predicate<T>, Predicate<T>)

Returns a predicate which computes logical OR between results of two other predicates.

Declaration
public static Predicate<T> op_BitwiseOr<T>(Predicate<T> x, Predicate<T> y) where T : allows ref struct
Parameters
Type Name Description
Predicate<T> x

The first predicate acting as logical OR operand.

Predicate<T> y

The second predicate acting as logical OR operand.

Returns
Type Description
Predicate<T>

The predicate which computes logical OR between results of two other predicates.

Type Parameters
Name Description
T
View Source

op_ExclusiveOr<T>(Func<T, bool>, Func<T, bool>)

Returns a predicate which computes logical XOR between results of two other predicates.

Declaration
public static Predicate<T> op_ExclusiveOr<T>(Func<T, bool> x, Func<T, bool> y) where T : allows ref struct
Parameters
Type Name Description
Func<T, bool> x

The first predicate acting as logical XOR operand.

Func<T, bool> y

The second predicate acting as logical XOR operand.

Returns
Type Description
Predicate<T>

The predicate which computes logical XOR between results of two other predicates.

Type Parameters
Name Description
T
View Source

op_ExclusiveOr<T>(Predicate<T>, Predicate<T>)

Returns a predicate which computes logical XOR between results of two other predicates.

Declaration
public static Predicate<T> op_ExclusiveOr<T>(Predicate<T> x, Predicate<T> y) where T : allows ref struct
Parameters
Type Name Description
Predicate<T> x

The first predicate acting as logical XOR operand.

Predicate<T> y

The second predicate acting as logical XOR operand.

Returns
Type Description
Predicate<T>

The predicate which computes logical XOR between results of two other predicates.

Type Parameters
Name Description
T
View Source

op_LeftShift<T>(Action<T>, T)

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

Declaration
public static Action op_LeftShift<T>(Action<T> action, T obj) where T : class
Parameters
Type Name Description
Action<T> action

The action to bind.

T obj

The object to be passed implicitly as the first argument into the method represented by this pointer. Cannot be null.

Returns
Type Description
Action

The delegate targeting the specified object.

Type Parameters
Name Description
T
View Source

op_LeftShift<T>(Predicate<T>, T)

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

Declaration
public static Func<bool> op_LeftShift<T>(Predicate<T> predicate, T obj) where T : class
Parameters
Type Name Description
Predicate<T> predicate

The predicate to bind.

T obj

The 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
T
View Source

op_LeftShift<T1, T2>(Action<T1, T2>, T1)

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

Declaration
public static Action<T2> op_LeftShift<T1, T2>(Action<T1, T2> action, T1 obj) where T1 : class where T2 : notnull, allows ref struct
Parameters
Type Name Description
Action<T1, T2> action

The action to bind.

T1 obj

The 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
T1
T2
View Source

op_LeftShift<T, TResult>(Func<T, TResult>, T)

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

Declaration
public static Func<TResult> op_LeftShift<T, TResult>(Func<T, TResult> func, T obj) where T : class where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T, TResult> func

The action to bind.

T obj

The 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
T
TResult
View Source

op_LeftShift<T1, T2, T3>(Action<T1, T2, T3>, T1)

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

Declaration
public static Action<T2, T3> op_LeftShift<T1, T2, T3>(Action<T1, T2, T3> action, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3> action

The action to bind.

T1 obj

The 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
T1
T2
T3
View Source

op_LeftShift<T1, T2, TResult>(Func<T1, T2, TResult>, T1)

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

Declaration
public static Func<T2, TResult> op_LeftShift<T1, T2, TResult>(Func<T1, T2, TResult> func, T1 obj) where T1 : class where T2 : notnull, allows ref struct where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T1, T2, TResult> func

The function to bind.

T1 obj

The 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
T1
T2
TResult
View Source

op_LeftShift<T1, T2, T3, T4>(Action<T1, T2, T3, T4>, T1)

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

Declaration
public static Action<T2, T3, T4> op_LeftShift<T1, T2, T3, T4>(Action<T1, T2, T3, T4> action, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where T4 : notnull, allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3, T4> action

The action to bind.

T1 obj

The 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
T1
T2
T3
T4
View Source

op_LeftShift<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>, T1)

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

Declaration
public static Func<T2, T3, TResult> op_LeftShift<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult> func, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T1, T2, T3, TResult> func

The function to bind.

T1 obj

The 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
T1
T2
T3
TResult
View Source

op_LeftShift<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.

Declaration
public static Action<T2, T3, T4, T5> op_LeftShift<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5> action, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where T4 : notnull, allows ref struct where T5 : notnull, allows ref struct
Parameters
Type Name Description
Action<T1, T2, T3, T4, T5> action

The action to bind.

T1 obj

The 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
T1
T2
T3
T4
T5
View Source

op_LeftShift<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.

Declaration
public static Func<T2, T3, T4, TResult> op_LeftShift<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult> func, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where T4 : notnull, allows ref struct where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T1, T2, T3, T4, TResult> func

The function to bind.

T1 obj

The 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
T1
T2
T3
T4
TResult
View Source

op_LeftShift<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.

Declaration
public static Func<T2, T3, T4, T5, TResult> op_LeftShift<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult> func, T1 obj) where T1 : class where T2 : notnull, allows ref struct where T3 : notnull, allows ref struct where T4 : notnull, allows ref struct where T5 : notnull, allows ref struct where TResult : notnull, allows ref struct
Parameters
Type Name Description
Func<T1, T2, T3, T4, T5, TResult> func

The function to bind.

T1 obj

The 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
T1
T2
T3
T4
T5
TResult
View Source

op_LogicalNot<T>(Func<T, bool>)

Returns a predicate which negates evaluation result of the original predicate.

Declaration
public static Predicate<T> op_LogicalNot<T>(Func<T, bool> other) where T : allows ref struct
Parameters
Type Name Description
Func<T, bool> other

The predicate to negate.

Returns
Type Description
Predicate<T>

The predicate which negates evaluation result of the original predicate.

Type Parameters
Name Description
T
View Source

op_LogicalNot<T>(Predicate<T>)

Returns a predicate which negates evaluation result of the original predicate.

Declaration
public static Predicate<T> op_LogicalNot<T>(Predicate<T> other) where T : allows ref struct
Parameters
Type Name Description
Predicate<T> other

The predicate to negate.

Returns
Type Description
Predicate<T>

The predicate which negates evaluation result of the original predicate.

Type Parameters
Name Description
T
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾