Provides methods for invoking a delegate that takes individual parameters using a tuple.
More...
|
static void | Call< F, T1 > (this DelegateAction< F, T1 > action, F first, Smooth.Algebraics.Tuple< T1 > t) |
|
static R | Call< F, T1, R > (this DelegateFunc< F, T1, R > func, F first, Smooth.Algebraics.Tuple< T1 > t) |
|
static void | Call< F, T1, T2 > (this DelegateAction< F, T1, T2 > action, F first, Smooth.Algebraics.Tuple< T1, T2 > t) |
|
static R | Call< F, T1, T2, R > (this DelegateFunc< F, T1, T2, R > func, F first, Smooth.Algebraics.Tuple< T1, T2 > t) |
|
static void | Call< F, T1, T2, T3 > (this DelegateAction< F, T1, T2, T3 > action, F first, Smooth.Algebraics.Tuple< T1, T2, T3 > t) |
|
static R | Call< F, T1, T2, T3, R > (this DelegateFunc< F, T1, T2, T3, R > func, F first, Smooth.Algebraics.Tuple< T1, T2, T3 > t) |
|
static void | Call< F, T1, T2, T3, T4 > (this DelegateAction< F, T1, T2, T3, T4 > action, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4 > t) |
|
static R | Call< F, T1, T2, T3, T4, R > (this DelegateFunc< F, T1, T2, T3, T4, R > func, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4 > t) |
|
static void | Call< F, T1, T2, T3, T4, T5 > (this DelegateAction< F, T1, T2, T3, T4, T5 > action, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5 > t) |
|
static R | Call< F, T1, T2, T3, T4, T5, R > (this DelegateFunc< F, T1, T2, T3, T4, T5, R > func, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5 > t) |
|
static void | Call< F, T1, T2, T3, T4, T5, T6 > (this DelegateAction< F, T1, T2, T3, T4, T5, T6 > action, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6 > t) |
|
static R | Call< F, T1, T2, T3, T4, T5, T6, R > (this DelegateFunc< F, T1, T2, T3, T4, T5, T6, R > func, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6 > t) |
|
static void | Call< F, T1, T2, T3, T4, T5, T6, T7 > (this DelegateAction< F, T1, T2, T3, T4, T5, T6, T7 > action, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6, T7 > t) |
|
static R | Call< F, T1, T2, T3, T4, T5, T6, T7, R > (this DelegateFunc< F, T1, T2, T3, T4, T5, T6, T7, R > func, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6, T7 > t) |
|
static void | Call< F, T1, T2, T3, T4, T5, T6, T7, T8 > (this DelegateAction< F, T1, T2, T3, T4, T5, T6, T7, T8 > action, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6, T7, T8 > t) |
|
static R | Call< F, T1, T2, T3, T4, T5, T6, T7, T8, R > (this DelegateFunc< F, T1, T2, T3, T4, T5, T6, T7, T8, R > func, F first, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6, T7, T8 > t) |
|
static void | Call< T1 > (this DelegateAction< T1 > action, Smooth.Algebraics.Tuple< T1 > t) |
|
static R | Call< T1, R > (this DelegateFunc< T1, R > func, Smooth.Algebraics.Tuple< T1 > t) |
|
static void | Call< T1, T2 > (this DelegateAction< T1, T2 > action, Smooth.Algebraics.Tuple< T1, T2 > t) |
|
static R | Call< T1, T2, R > (this DelegateFunc< T1, T2, R > func, Smooth.Algebraics.Tuple< T1, T2 > t) |
|
static void | Call< T1, T2, T3 > (this DelegateAction< T1, T2, T3 > action, Smooth.Algebraics.Tuple< T1, T2, T3 > t) |
|
static R | Call< T1, T2, T3, R > (this DelegateFunc< T1, T2, T3, R > func, Smooth.Algebraics.Tuple< T1, T2, T3 > t) |
|
static void | Call< T1, T2, T3, T4 > (this DelegateAction< T1, T2, T3, T4 > action, Smooth.Algebraics.Tuple< T1, T2, T3, T4 > t) |
|
static R | Call< T1, T2, T3, T4, R > (this DelegateFunc< T1, T2, T3, T4, R > func, Smooth.Algebraics.Tuple< T1, T2, T3, T4 > t) |
|
static void | Call< T1, T2, T3, T4, T5 > (this DelegateAction< T1, T2, T3, T4, T5 > action, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5 > t) |
|
static R | Call< T1, T2, T3, T4, T5, R > (this DelegateFunc< T1, T2, T3, T4, T5, R > func, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5 > t) |
|
static void | Call< T1, T2, T3, T4, T5, T6 > (this DelegateAction< T1, T2, T3, T4, T5, T6 > action, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6 > t) |
|
static R | Call< T1, T2, T3, T4, T5, T6, R > (this DelegateFunc< T1, T2, T3, T4, T5, T6, R > func, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6 > t) |
|
static void | Call< T1, T2, T3, T4, T5, T6, T7 > (this DelegateAction< T1, T2, T3, T4, T5, T6, T7 > action, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6, T7 > t) |
|
static R | Call< T1, T2, T3, T4, T5, T6, T7, R > (this DelegateFunc< T1, T2, T3, T4, T5, T6, T7, R > func, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6, T7 > t) |
|
static void | Call< T1, T2, T3, T4, T5, T6, T7, T8 > (this DelegateAction< T1, T2, T3, T4, T5, T6, T7, T8 > action, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6, T7, T8 > t) |
|
static R | Call< T1, T2, T3, T4, T5, T6, T7, T8, R > (this DelegateFunc< T1, T2, T3, T4, T5, T6, T7, T8, R > func, Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5, T6, T7, T8 > t) |
|
static void | Call< T1, T2, T3, T4, T5, T6, T7, T8, T9 > (this DelegateAction< T1, T2, T3, T4, T5, T6, T7, T8, T9 > action, Tuple< T1, T2, T3, T4, T5, T6, T7, T8, T9 > t) |
|
static R | Call< T1, T2, T3, T4, T5, T6, T7, T8, T9, R > (this DelegateFunc< T1, T2, T3, T4, T5, T6, T7, T8, T9, R > func, Tuple< T1, T2, T3, T4, T5, T6, T7, T8, T9 > t) |
|
Provides methods for invoking a delegate that takes individual parameters using a tuple.
Many Smooth methods allow the use of an optional parameter that is passed to a delegate in order to capture state without allocating a closure. One use case of this class is to convert a tupled state parameter into individual parameters.
For instance:
option.Where((player, p) => player.team == p.Item1 && player.score > p.Item2, Tuple.Create(myTeam, myScore))
Could be written as:
option.Where((v, p) => Tupled.Call((player, team, score) => player.team == team && player.score > score, v, p), Tuple.Create(myTeam, myScore))
While this form is slightly longer and requires an extra method call, it can be useful as a "quick and dirty" way to use meaningful parameter names in complicated delegates.