Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
Smooth.Delegates.Tupled Class Reference

Provides methods for invoking a delegate that takes individual parameters using a tuple. More...

Static Public Member Functions

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)
 

Detailed Description

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.

Member Function Documentation

static void Smooth.Delegates.Tupled.Call< F, T1 > ( this DelegateAction< F, T1 >  action,
F  first,
Smooth.Algebraics.Tuple< T1 >  t 
)
inlinestatic
static R Smooth.Delegates.Tupled.Call< F, T1, R > ( this DelegateFunc< F, T1, R func,
F  first,
Smooth.Algebraics.Tuple< T1 >  t 
)
inlinestatic
static void Smooth.Delegates.Tupled.Call< F, T1, T2 > ( this DelegateAction< F, T1, T2 >  action,
F  first,
Smooth.Algebraics.Tuple< T1, T2 >  t 
)
inlinestatic
static R Smooth.Delegates.Tupled.Call< F, T1, T2, R > ( this DelegateFunc< F, T1, T2, R func,
F  first,
Smooth.Algebraics.Tuple< T1, T2 >  t 
)
inlinestatic
static void Smooth.Delegates.Tupled.Call< F, T1, T2, T3 > ( this DelegateAction< F, T1, T2, T3 >  action,
F  first,
Smooth.Algebraics.Tuple< T1, T2, T3 >  t 
)
inlinestatic
static R Smooth.Delegates.Tupled.Call< F, T1, T2, T3, R > ( this DelegateFunc< F, T1, T2, T3, R func,
F  first,
Smooth.Algebraics.Tuple< T1, T2, T3 >  t 
)
inlinestatic
static void Smooth.Delegates.Tupled.Call< F, T1, T2, T3, T4 > ( this DelegateAction< F, T1, T2, T3, T4 >  action,
F  first,
Smooth.Algebraics.Tuple< T1, T2, T3, T4 >  t 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic
static void Smooth.Delegates.Tupled.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 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic
static void Smooth.Delegates.Tupled.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 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic
static void Smooth.Delegates.Tupled.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 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic
static void Smooth.Delegates.Tupled.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 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic
static void Smooth.Delegates.Tupled.Call< T1 > ( this DelegateAction< T1 >  action,
Smooth.Algebraics.Tuple< T1 >  t 
)
inlinestatic
static R Smooth.Delegates.Tupled.Call< T1, R > ( this DelegateFunc< T1, R func,
Smooth.Algebraics.Tuple< T1 >  t 
)
inlinestatic
static void Smooth.Delegates.Tupled.Call< T1, T2 > ( this DelegateAction< T1, T2 >  action,
Smooth.Algebraics.Tuple< T1, T2 >  t 
)
inlinestatic
static R Smooth.Delegates.Tupled.Call< T1, T2, R > ( this DelegateFunc< T1, T2, R func,
Smooth.Algebraics.Tuple< T1, T2 >  t 
)
inlinestatic
static void Smooth.Delegates.Tupled.Call< T1, T2, T3 > ( this DelegateAction< T1, T2, T3 >  action,
Smooth.Algebraics.Tuple< T1, T2, T3 >  t 
)
inlinestatic
static R Smooth.Delegates.Tupled.Call< T1, T2, T3, R > ( this DelegateFunc< T1, T2, T3, R func,
Smooth.Algebraics.Tuple< T1, T2, T3 >  t 
)
inlinestatic
static void Smooth.Delegates.Tupled.Call< T1, T2, T3, T4 > ( this DelegateAction< T1, T2, T3, T4 >  action,
Smooth.Algebraics.Tuple< T1, T2, T3, T4 >  t 
)
inlinestatic
static R Smooth.Delegates.Tupled.Call< T1, T2, T3, T4, R > ( this DelegateFunc< T1, T2, T3, T4, R func,
Smooth.Algebraics.Tuple< T1, T2, T3, T4 >  t 
)
inlinestatic
static void Smooth.Delegates.Tupled.Call< T1, T2, T3, T4, T5 > ( this DelegateAction< T1, T2, T3, T4, T5 >  action,
Smooth.Algebraics.Tuple< T1, T2, T3, T4, T5 >  t 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic
static void Smooth.Delegates.Tupled.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 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic
static void Smooth.Delegates.Tupled.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 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic
static void Smooth.Delegates.Tupled.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 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic
static void Smooth.Delegates.Tupled.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 
)
inlinestatic
static R Smooth.Delegates.Tupled.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 
)
inlinestatic

The documentation for this class was generated from the following file: