Provides extension methods on Action<T>, Func<T, TResult>, and related delegates.
Cadenza.ActionCoda provides methods methods for:
- Delegate currying and partial application (DelegateCoda.Curry)
- Delegate composition (DelegateCoda.Compose)
- Timing generation (DelegateCoda.Timings)
Currying via partial application is a way to easily transform functions which accept N arguments into functions which accept N-1 arguments, by "fixing" arguments with a value.
C# Example // partial application: Func<int,int,int,int> function = (int a, int b, int c) => a + b + c; Func<int,int,int> f_3 = function.Curry (3); Func<int> f_321 = function.Curry (3, 2, 1); Console.WriteLine (f_3 (2, 1)); // prints (3 + 2 + 1) == "6" Console.WriteLine (f_321 ()); // prints (3 + 2 + 1) == "6""Traditional" currying converts a delegate that accepts N arguments into a delegate which accepts only one argument, but when invoked may return a further delegate (etc.) until the final value is returned.
C# Example // traditional currying: Func<int, Func<int, Func<int, int>>> curry = function.Curry (); Func<int, Func<int, int>> fc_1 = curry (1); Func<int, int> fc_12 = fc_1 (2); Console.WriteLine (fc_12 (3)); // prints (3 + 2 + 1) == "6" Console.WriteLine (curry (3)(2)(1)); // prints (3 + 2 + 1) == "6"Composition is a way to easy chain (or pipe) together multiple delegates so that the return value of a "composer" delegate is used as the input parameter for the chained delegate:
C# Example Func<int,string> tostring = Lambda.F ((int n) => n.ToString ()); Func<int, int> doubler = Lambda.F ((int n) => n * 2); Func<int, string> double_then_tostring = tostring.Compose (doubler); Console.WriteLine (double_then_tostring (5)); // Prints "10";All possible argument and return delegate permutations are provided for the Action<T> and related types.
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
See Also: Inherited members from object.
⊟ Public Methods
⊟ Compose<T> Generic Method
Creates a Action delegate.
⊟ Type Parameters
⊟ Parameters
⊟ Returns
Returns a Action which, when invoked, will invoke composer and pass the return value of composer to self.⊟ Exceptions
Type Reason ArgumentNullException self is null.
-or-
composer is null.
⊟ Remarks
Composition is useful for chaining delegates together, so that the return value of composer is automatically used as the input parameter for self.
C# Example Func<int,string> tostring = Lambda.F ((int n) => n.ToString ()); Func<int, int> doubler = Lambda.F ((int n) => n * 2); Func<int, string> double_then_tostring = tostring.Compose (doubler); Console.WriteLine (double_then_tostring (5)); // Prints "10";⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Compose<T1,T2> Generic Method
Creates a Action<T1> delegate.
⊟ Type Parameters
- T1
- Documentation for this section has not yet been entered.
- T2
- The Func<T1, T2> return type, and Action<T2> argument type.
⊟ Parameters
- self
- The Action<T2> to compose.
- composer
- The Func<T1, T2> to compose with self.
⊟ Returns
Returns a Action<T1> which, when invoked, will invoke composer and pass the return value of composer to self.⊟ Exceptions
Type Reason ArgumentNullException self is null.
-or-
composer is null.
⊟ Remarks
Composition is useful for chaining delegates together, so that the return value of composer is automatically used as the input parameter for self.
C# Example Func<int,string> tostring = Lambda.F ((int n) => n.ToString ()); Func<int, int> doubler = Lambda.F ((int n) => n * 2); Func<int, string> double_then_tostring = tostring.Compose (doubler); Console.WriteLine (double_then_tostring (5)); // Prints "10";⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Compose<T1,T2,T3> Generic Method
Creates a Action<T1, T2> delegate.
⊟ Type Parameters
- T1
- A Func<T1, T2, T3> parameter type.
- T2
- Documentation for this section has not yet been entered.
- T3
- The Func<T1, T2, T3> return type, and Action<T3> argument type.
⊟ Parameters
- self
- The Action<T3> to compose.
- composer
- The Func<T1, T2, T3> to compose with self.
⊟ Returns
Returns a Action<T1, T2> which, when invoked, will invoke composer and pass the return value of composer to self.⊟ Exceptions
Type Reason ArgumentNullException self is null.
-or-
composer is null.
⊟ Remarks
Composition is useful for chaining delegates together, so that the return value of composer is automatically used as the input parameter for self.
C# Example Func<int,string> tostring = Lambda.F ((int n) => n.ToString ()); Func<int, int> doubler = Lambda.F ((int n) => n * 2); Func<int, string> double_then_tostring = tostring.Compose (doubler); Console.WriteLine (double_then_tostring (5)); // Prints "10";⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Compose<T1,T2,T3,T4> Generic Method
Creates a Action<T1, T2, T3> delegate.
public static Action<T1, T2, T3> Compose<T1, T2, T3, T4> (this Action<T4> self, Func<T1, T2, T3, T4> composer)⊟ Type Parameters
- T1
- A Func<T1, T2, T3, T4> parameter type.
- T2
- A Func<T1, T2, T3, T4> parameter type.
- T3
- Documentation for this section has not yet been entered.
- T4
- The Func<T1, T2, T3, T4> return type, and Action<T4> argument type.
⊟ Parameters
- self
- The Action<T4> to compose.
- composer
- The Func<T1, T2, T3, T4> to compose with self.
⊟ Returns
Returns a Action<T1, T2, T3> which, when invoked, will invoke composer and pass the return value of composer to self.⊟ Exceptions
Type Reason ArgumentNullException self is null.
-or-
composer is null.
⊟ Remarks
Composition is useful for chaining delegates together, so that the return value of composer is automatically used as the input parameter for self.
C# Example Func<int,string> tostring = Lambda.F ((int n) => n.ToString ()); Func<int, int> doubler = Lambda.F ((int n) => n * 2); Func<int, string> double_then_tostring = tostring.Compose (doubler); Console.WriteLine (double_then_tostring (5)); // Prints "10";⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Compose<T1,T2,T3,T4,T5> Generic Method
Creates a Action<T1, T2, T3, T4> delegate.
public static Action<T1, T2, T3, T4> Compose<T1, T2, T3, T4, T5> (this Action<T5> self, Func<T1, T2, T3, T4, T5> composer)⊟ Type Parameters
- T1
- A Func<T1, T2, T3, T4, T5> parameter type.
- T2
- A Func<T1, T2, T3, T4, T5> parameter type.
- T3
- A Func<T1, T2, T3, T4, T5> parameter type.
- T4
- Documentation for this section has not yet been entered.
- T5
- The Func<T1, T2, T3, T4, T5> return type, and Action<T5> argument type.
⊟ Parameters
- self
- The Action<T5> to compose.
- composer
- The Func<T1, T2, T3, T4, T5> to compose with self.
⊟ Returns
Returns a Action<T1, T2, T3, T4> which, when invoked, will invoke composer and pass the return value of composer to self.⊟ Exceptions
Type Reason ArgumentNullException self is null.
-or-
composer is null.
⊟ Remarks
Composition is useful for chaining delegates together, so that the return value of composer is automatically used as the input parameter for self.
C# Example Func<int,string> tostring = Lambda.F ((int n) => n.ToString ()); Func<int, int> doubler = Lambda.F ((int n) => n * 2); Func<int, string> double_then_tostring = tostring.Compose (doubler); Console.WriteLine (double_then_tostring (5)); // Prints "10";⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T> Generic Method
Creates a Action<T> for currying.
⊟ Type Parameters
- T
- The first value type.
⊟ Parameters
- self
- The Action<T> to curry.
⊟ Returns
A Action<T> which, when invoked, will invoke self.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
This is the more "traditional" view of currying, turning a method which takes (X * Y)->Z (i.e. separate arguments) into a X -> (Y -> Z) (that is a "chain" of nested Funcs such that you provide only one argument to each Func until you provide enough arguments to invoke the original method).
C# Example Func<int,int,int,int> function = (int a, int b, int c) => a + b + c; Func<int,Func<int,Func<int, int>>> curry = function.Curry (); Assert.AreEqual(6, curry (3)(2)(1));⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T> Generic Method
Creates a Action delegate.
⊟ Type Parameters
- T
- A Action<T> parameter type.
⊟ Parameters
- self
- The Action<T> to curry.
- values
- A value of type Cadenza.Tuple<T> which contains the values to fix.
⊟ Returns
Returns a Action which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T> Generic Method
Creates a Action delegate.
⊟ Type Parameters
- T
- A Action<T> parameter type.
⊟ Parameters
- self
- The Action<T> to curry.
- value
- A value of type T to fix.
⊟ Returns
Returns a Action which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2> Generic Method
Creates a Func<T1, Action<T2>> for currying.
public static Func<T1, Action<T2>> Curry<T1, T2> (this Action<T1, T2> self)⊟ Type Parameters
- T1
- The first value type.
- T2
- The second value type.
⊟ Parameters
- self
- The Action<T1, T2> to curry.
⊟ Returns
A Func<T1, Action<T2>> which, when invoked, will return a Action<T2> which, when invoked, will invoke self.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
This is the more "traditional" view of currying, turning a method which takes (X * Y)->Z (i.e. separate arguments) into a X -> (Y -> Z) (that is a "chain" of nested Funcs such that you provide only one argument to each Func until you provide enough arguments to invoke the original method).
C# Example Func<int,int,int,int> function = (int a, int b, int c) => a + b + c; Func<int,Func<int,Func<int, int>>> curry = function.Curry (); Assert.AreEqual(6, curry (3)(2)(1));⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2> Generic Method
Creates a Action delegate.
⊟ Type Parameters
- T1
- A Action<T1, T2> parameter type.
- T2
- A Action<T1, T2> parameter type.
⊟ Parameters
- self
- The Action<T1, T2> to curry.
- values
- A value of type Cadenza.Tuple<T1, T2> which contains the values to fix.
⊟ Returns
Returns a Action which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2> Generic Method
Creates a Action<T2> delegate.
⊟ Type Parameters
- T1
- A Action<T1, T2> parameter type.
- T2
- A Action<T1, T2> parameter type.
⊟ Parameters
- self
- The Action<T1, T2> to curry.
- values
- A value of type Cadenza.Tuple<T1> which contains the values to fix.
⊟ Returns
Returns a Action<T2> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2> Generic Method
Creates a Action<T2> delegate.
public static Action<T2> Curry<T1, T2> (this Action<T1, T2> self, T1 value1)⊟ Type Parameters
- T1
- A Action<T1, T2> parameter type.
- T2
- A Action<T1, T2> parameter type.
⊟ Parameters
- self
- The Action<T1, T2> to curry.
- value1
- A value of type T1 to fix.
⊟ Returns
Returns a Action<T2> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2> Generic Method
Creates a Action delegate.
public static Action Curry<T1, T2> (this Action<T1, T2> self, T1 value1, T2 value2)⊟ Type Parameters
- T1
- A Action<T1, T2> parameter type.
- T2
- A Action<T1, T2> parameter type.
⊟ Parameters
- self
- The Action<T1, T2> to curry.
- value1
- A value of type T1 to fix.
- value2
- A value of type T2 to fix.
⊟ Returns
Returns a Action which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3> Generic Method
Creates a Func<T1, Func<T2, Action<T3>>> for currying.
public static Func<T1, Func<T2, Action<T3>>> Curry<T1, T2, T3> (this Action<T1, T2, T3> self)⊟ Type Parameters
- T1
- The first value type.
- T2
- The second value type.
- T3
- The third value type.
⊟ Parameters
- self
- The Action<T1, T2, T3> to curry.
⊟ Returns
A Func<T1, Func<T2, Action<T3>>> which, when invoked, will return a Func<T2, Action<T3>> which, when invoked, will return a Action<T3> which, when invoked, will invoke self.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
This is the more "traditional" view of currying, turning a method which takes (X * Y)->Z (i.e. separate arguments) into a X -> (Y -> Z) (that is a "chain" of nested Funcs such that you provide only one argument to each Func until you provide enough arguments to invoke the original method).
C# Example Func<int,int,int,int> function = (int a, int b, int c) => a + b + c; Func<int,Func<int,Func<int, int>>> curry = function.Curry (); Assert.AreEqual(6, curry (3)(2)(1));⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3> Generic Method
Creates a Action delegate.
⊟ Type Parameters
- T1
- A Action<T1, T2, T3> parameter type.
- T2
- A Action<T1, T2, T3> parameter type.
- T3
- A Action<T1, T2, T3> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3> to curry.
- values
- A value of type Cadenza.Tuple<T1, T2, T3> which contains the values to fix.
⊟ Returns
Returns a Action which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3> Generic Method
Creates a Action<T3> delegate.
⊟ Type Parameters
- T1
- A Action<T1, T2, T3> parameter type.
- T2
- A Action<T1, T2, T3> parameter type.
- T3
- A Action<T1, T2, T3> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3> to curry.
- values
- A value of type Cadenza.Tuple<T1, T2> which contains the values to fix.
⊟ Returns
Returns a Action<T3> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3> Generic Method
Creates a Action<T2, T3> delegate.
⊟ Type Parameters
- T1
- A Action<T1, T2, T3> parameter type.
- T2
- A Action<T1, T2, T3> parameter type.
- T3
- A Action<T1, T2, T3> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3> to curry.
- values
- A value of type Cadenza.Tuple<T1> which contains the values to fix.
⊟ Returns
Returns a Action<T2, T3> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3> Generic Method
Creates a Action<T2, T3> delegate.
public static Action<T2, T3> Curry<T1, T2, T3> (this Action<T1, T2, T3> self, T1 value1)⊟ Type Parameters
- T1
- A Action<T1, T2, T3> parameter type.
- T2
- A Action<T1, T2, T3> parameter type.
- T3
- A Action<T1, T2, T3> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3> to curry.
- value1
- A value of type T1 to fix.
⊟ Returns
Returns a Action<T2, T3> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3> Generic Method
Creates a Action<T3> delegate.
public static Action<T3> Curry<T1, T2, T3> (this Action<T1, T2, T3> self, T1 value1, T2 value2)⊟ Type Parameters
- T1
- A Action<T1, T2, T3> parameter type.
- T2
- A Action<T1, T2, T3> parameter type.
- T3
- A Action<T1, T2, T3> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3> to curry.
- value1
- A value of type T1 to fix.
- value2
- A value of type T2 to fix.
⊟ Returns
Returns a Action<T3> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3> Generic Method
Creates a Action delegate.
public static Action Curry<T1, T2, T3> (this Action<T1, T2, T3> self, T1 value1, T2 value2, T3 value3)⊟ Type Parameters
- T1
- A Action<T1, T2, T3> parameter type.
- T2
- A Action<T1, T2, T3> parameter type.
- T3
- A Action<T1, T2, T3> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3> to curry.
- value1
- A value of type T1 to fix.
- value2
- A value of type T2 to fix.
- value3
- A value of type T3 to fix.
⊟ Returns
Returns a Action which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3,T4> Generic Method
Creates a Func<T1, Func<T2, Func<T3, Action<T4>>>> for currying.
public static Func<T1, Func<T2, Func<T3, Action<T4>>>> Curry<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self)⊟ Type Parameters
- T1
- The first value type.
- T2
- The second value type.
- T3
- The third value type.
- T4
- The fourth value type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to curry.
⊟ Returns
A Func<T1, Func<T2, Func<T3, Action<T4>>>> which, when invoked, will return a Func<T2, Func<T3, Action<T4>>> which, when invoked, will return a Func<T3, Action<T4>> which, when invoked, will return a Action<T4> which, when invoked, will invoke self.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
This is the more "traditional" view of currying, turning a method which takes (X * Y)->Z (i.e. separate arguments) into a X -> (Y -> Z) (that is a "chain" of nested Funcs such that you provide only one argument to each Func until you provide enough arguments to invoke the original method).
C# Example Func<int,int,int,int> function = (int a, int b, int c) => a + b + c; Func<int,Func<int,Func<int, int>>> curry = function.Curry (); Assert.AreEqual(6, curry (3)(2)(1));⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3,T4> Generic Method
Creates a Action delegate.
public static Action Curry<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, Tuple<T1, T2, T3, T4> values)⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to curry.
- values
- A value of type Cadenza.Tuple<T1, T2, T3, T4> which contains the values to fix.
⊟ Returns
Returns a Action which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3,T4> Generic Method
Creates a Action<T4> delegate.
public static Action<T4> Curry<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, Tuple<T1, T2, T3> values)⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to curry.
- values
- A value of type Cadenza.Tuple<T1, T2, T3> which contains the values to fix.
⊟ Returns
Returns a Action<T4> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3,T4> Generic Method
Creates a Action<T3, T4> delegate.
public static Action<T3, T4> Curry<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, Tuple<T1, T2> values)⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to curry.
- values
- A value of type Cadenza.Tuple<T1, T2> which contains the values to fix.
⊟ Returns
Returns a Action<T3, T4> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3,T4> Generic Method
Creates a Action<T2, T3, T4> delegate.
public static Action<T2, T3, T4> Curry<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, Tuple<T1> values)⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to curry.
- values
- A value of type Cadenza.Tuple<T1> which contains the values to fix.
⊟ Returns
Returns a Action<T2, T3, T4> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3,T4> Generic Method
Creates a Action<T2, T3, T4> delegate.
public static Action<T2, T3, T4> Curry<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, T1 value1)⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to curry.
- value1
- A value of type T1 to fix.
⊟ Returns
Returns a Action<T2, T3, T4> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3,T4> Generic Method
Creates a Action<T3, T4> delegate.
public static Action<T3, T4> Curry<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, T1 value1, T2 value2)⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to curry.
- value1
- A value of type T1 to fix.
- value2
- A value of type T2 to fix.
⊟ Returns
Returns a Action<T3, T4> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3,T4> Generic Method
Creates a Action<T4> delegate.
public static Action<T4> Curry<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, T1 value1, T2 value2, T3 value3)⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to curry.
- value1
- A value of type T1 to fix.
- value2
- A value of type T2 to fix.
- value3
- A value of type T3 to fix.
⊟ Returns
Returns a Action<T4> which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Curry<T1,T2,T3,T4> Generic Method
Creates a Action delegate.
public static Action Curry<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, T1 value1, T2 value2, T3 value3, T4 value4)⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to curry.
- value1
- A value of type T1 to fix.
- value2
- A value of type T2 to fix.
- value3
- A value of type T3 to fix.
- value4
- A value of type T4 to fix.
⊟ Returns
Returns a Action which, when invoked, will invoke self along with the provided fixed parameters.⊟ Exceptions
Type Reason ArgumentNullException if self is null. ⊟ Remarks
Documentation for this section has not yet been entered.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings Method
Get timing information for delegate invocations.
⊟ See Also
⊟ Parameters
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative. ArgumentNullException if self is null. ⊟ Remarks
This is equivalent to calling ActionCoda.Timings(Action, int, int) with a loopsPerRun value of 1, e.g. as if by calling self.Timing (runs, 1).⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings Method
Get timing information for delegate invocations.
⊟ Parameters
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative.
-or-
loopsPerRun is negative.
ArgumentNullException if self is null. ⊟ Remarks
Generates runsTimeSpan instances, in which each TimeSpan instance is the amount of time required to execute self for loopsPerRun times.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings<T> Generic Method
Get timing information for delegate invocations.
⊟ See Also
⊟ Type Parameters
- T
- A Action<T> parameter type.
⊟ Parameters
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative. ArgumentNullException if self is null. ⊟ Remarks
This is equivalent to calling ActionCoda.Timings``1(Action<``0>,``0,System.Int32,System.Int32) with a loopsPerRun value of 1, e.g. as if by calling self.Timing (value, runs, 1).⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings<T> Generic Method
Get timing information for delegate invocations.
public static IEnumerable<TimeSpan> Timings<T> (this Action<T> self, T value, int runs, int loopsPerRun)⊟ Type Parameters
- T
- A Action<T> parameter type.
⊟ Parameters
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative.
-or-
loopsPerRun is negative.
ArgumentNullException if self is null. ⊟ Remarks
Generates runsTimeSpan instances, in which each TimeSpan instance is the amount of time required to execute self for loopsPerRun times.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings<T1,T2> Generic Method
Get timing information for delegate invocations.
public static IEnumerable<TimeSpan> Timings<T1, T2> (this Action<T1, T2> self, T1 value1, T2 value2, int runs)⊟ See Also
⊟ Type Parameters
- T1
- A Action<T1, T2> parameter type.
- T2
- A Action<T1, T2> parameter type.
⊟ Parameters
- self
- The Action<T1, T2> to generate timings for.
- value1
- The *unknown* self parameter value.
- value2
- The *unknown* self parameter value.
- runs
- An int containing the number of TimeSpan values to return.
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative. ArgumentNullException if self is null. ⊟ Remarks
This is equivalent to calling ActionCoda.Timings``2(Action<``0, ``1>,``0,``1,System.Int32,System.Int32) with a loopsPerRun value of 1, e.g. as if by calling self.Timing (value1, value2, runs, 1).⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings<T1,T2> Generic Method
Get timing information for delegate invocations.
public static IEnumerable<TimeSpan> Timings<T1, T2> (this Action<T1, T2> self, T1 value1, T2 value2, int runs, int loopsPerRun)⊟ Type Parameters
- T1
- A Action<T1, T2> parameter type.
- T2
- A Action<T1, T2> parameter type.
⊟ Parameters
- self
- The Action<T1, T2> to generate timings for.
- value1
- The *unknown* self parameter value.
- value2
- The *unknown* self parameter value.
- runs
- An int containing the number of TimeSpan values to return.
- loopsPerRun
- An int containing the number of times to invoke self for each TimeSpan value returned.
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative.
-or-
loopsPerRun is negative.
ArgumentNullException if self is null. ⊟ Remarks
Generates runsTimeSpan instances, in which each TimeSpan instance is the amount of time required to execute self for loopsPerRun times.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings<T1,T2,T3> Generic Method
Get timing information for delegate invocations.
public static IEnumerable<TimeSpan> Timings<T1, T2, T3> (this Action<T1, T2, T3> self, T1 value1, T2 value2, T3 value3, int runs)⊟ See Also
⊟ Type Parameters
- T1
- A Action<T1, T2, T3> parameter type.
- T2
- A Action<T1, T2, T3> parameter type.
- T3
- A Action<T1, T2, T3> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3> to generate timings for.
- value1
- The *unknown* self parameter value.
- value2
- The *unknown* self parameter value.
- value3
- The *unknown* self parameter value.
- runs
- An int containing the number of TimeSpan values to return.
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative. ArgumentNullException if self is null. ⊟ Remarks
This is equivalent to calling ActionCoda.Timings``3(Action<``0, ``1, ``2>,``0,``1,``2,System.Int32,System.Int32) with a loopsPerRun value of 1, e.g. as if by calling self.Timing (value1, value2, value3, runs, 1).⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings<T1,T2,T3> Generic Method
Get timing information for delegate invocations.
public static IEnumerable<TimeSpan> Timings<T1, T2, T3> (this Action<T1, T2, T3> self, T1 value1, T2 value2, T3 value3, int runs, int loopsPerRun)⊟ Type Parameters
- T1
- A Action<T1, T2, T3> parameter type.
- T2
- A Action<T1, T2, T3> parameter type.
- T3
- A Action<T1, T2, T3> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3> to generate timings for.
- value1
- The *unknown* self parameter value.
- value2
- The *unknown* self parameter value.
- value3
- The *unknown* self parameter value.
- runs
- An int containing the number of TimeSpan values to return.
- loopsPerRun
- An int containing the number of times to invoke self for each TimeSpan value returned.
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative.
-or-
loopsPerRun is negative.
ArgumentNullException if self is null. ⊟ Remarks
Generates runsTimeSpan instances, in which each TimeSpan instance is the amount of time required to execute self for loopsPerRun times.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings<T1,T2,T3,T4> Generic Method
Get timing information for delegate invocations.
public static IEnumerable<TimeSpan> Timings<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, T1 value1, T2 value2, T3 value3, T4 value4, int runs)⊟ See Also
⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to generate timings for.
- value1
- The *unknown* self parameter value.
- value2
- The *unknown* self parameter value.
- value3
- The *unknown* self parameter value.
- value4
- The *unknown* self parameter value.
- runs
- An int containing the number of TimeSpan values to return.
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative. ArgumentNullException if self is null. ⊟ Remarks
This is equivalent to calling ActionCoda.Timings``4(Action<``0, ``1, ``2, ``3>,``0,``1,``2,``3,System.Int32,System.Int32) with a loopsPerRun value of 1, e.g. as if by calling self.Timing (value1, value2, value3, value4, runs, 1).⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
⊟ Timings<T1,T2,T3,T4> Generic Method
Get timing information for delegate invocations.
public static IEnumerable<TimeSpan> Timings<T1, T2, T3, T4> (this Action<T1, T2, T3, T4> self, T1 value1, T2 value2, T3 value3, T4 value4, int runs, int loopsPerRun)⊟ Type Parameters
- T1
- A Action<T1, T2, T3, T4> parameter type.
- T2
- A Action<T1, T2, T3, T4> parameter type.
- T3
- A Action<T1, T2, T3, T4> parameter type.
- T4
- A Action<T1, T2, T3, T4> parameter type.
⊟ Parameters
- self
- The Action<T1, T2, T3, T4> to generate timings for.
- value1
- The *unknown* self parameter value.
- value2
- The *unknown* self parameter value.
- value3
- The *unknown* self parameter value.
- value4
- The *unknown* self parameter value.
- runs
- An int containing the number of TimeSpan values to return.
- loopsPerRun
- An int containing the number of times to invoke self for each TimeSpan value returned.
⊟ Returns
An IEnumerable<TimeSpan> which will return the timing information for self.⊟ Exceptions
Type Reason ArgumentException runs is negative.
-or-
loopsPerRun is negative.
ArgumentNullException if self is null. ⊟ Remarks
Generates runsTimeSpan instances, in which each TimeSpan instance is the amount of time required to execute self for loopsPerRun times.⊟ Requirements
Namespace: Cadenza
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0