Class TupleExtensions
Helper extensions for tuples
Inherited Members
Namespace: Lokad
Assembly: Algenta.Colectica.Model.dll
Syntax
public static class TupleExtensions
Methods
Add<T1, T2>(ICollection<Pair<T1, T2>>, T1, T2)
Shortcut to create and add tuple to the collection
Declaration
public static void Add<T1, T2>(this ICollection<Pair<T1, T2>> collection, T1 first, T2 second)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Pair<T1, T2>> | collection | The collection to add to. |
T1 | first | The first item. |
T2 | second | The second item. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first item. |
T2 | The type of the second item. |
Add<T1, T2>(ICollection<Tuple<T1, T2>>, T1, T2)
Shortcut to create and add tuple to the collection
Declaration
public static void Add<T1, T2>(this ICollection<Tuple<T1, T2>> collection, T1 first, T2 second)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Tuple<T1, T2>> | collection | The collection to add to. |
T1 | first | The first item. |
T2 | second | The second item. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first item. |
T2 | The type of the second item. |
Add<T1, T2, T3>(ICollection<Tuple<T1, T2, T3>>, T1, T2, T3)
Shortcut to create and add tuple to the collection
Declaration
public static void Add<T1, T2, T3>(this ICollection<Tuple<T1, T2, T3>> collection, T1 first, T2 second, T3 third)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Tuple<T1, T2, T3>> | collection | The collection to add to. |
T1 | first | The first item. |
T2 | second | The second item. |
T3 | third | The third item. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first item. |
T2 | The type of the second item. |
T3 | The type of the third item. |
Add<T1, T2, T3, T4>(ICollection<Tuple<T1, T2, T3, T4>>, T1, T2, T3, T4)
Shortcut to create and add tuple to the collection
Declaration
public static void Add<T1, T2, T3, T4>(this ICollection<Tuple<T1, T2, T3, T4>> collection, T1 first, T2 second, T3 third, T4 fourth)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Tuple<T1, T2, T3, T4>> | collection | The collection to add to. |
T1 | first | The first item. |
T2 | second | The second item. |
T3 | third | The third item. |
T4 | fourth | The fourth item. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first item. |
T2 | The type of the second item. |
T3 | The type of the third item. |
T4 | The type of the fourth item. |
Add<T1, T2, T3, T4, T5>(ICollection<Tuple<T1, T2, T3, T4, T5>>, T1, T2, T3, T4, T5)
Shortcut to create and add tuple to the collection
Declaration
public static void Add<T1, T2, T3, T4, T5>(this ICollection<Tuple<T1, T2, T3, T4, T5>> collection, T1 first, T2 second, T3 third, T4 fourth, T5 fifth)
Parameters
Type | Name | Description |
---|---|---|
ICollection<Tuple<T1, T2, T3, T4, T5>> | collection | The collection to add to. |
T1 | first | The first item. |
T2 | second | The second item. |
T3 | third | The third item. |
T4 | fourth | The fourth item. |
T5 | fifth | The fifth item. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first item. |
T2 | The type of the second item. |
T3 | The type of the third item. |
T4 | The type of the fourth item. |
T5 | The type of the fifth item. |
Append<T1, T2, T3>(Tuple<T1, T2>, T3)
Appends the specified item
to the tuple
.
Declaration
public static Triple<T1, T2, T3> Append<T1, T2, T3>(this Tuple<T1, T2> tuple, T3 item)
Parameters
Type | Name | Description |
---|---|---|
Tuple<T1, T2> | tuple | The tuple to append to. |
T3 | item | The item to append. |
Returns
Type | Description |
---|---|
Triple<T1, T2, T3> | New tuple instance |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first item. |
T2 | The type of the second item. |
T3 | The type of the third item. |
Append<T1, T2, T3, T4>(Tuple<T1, T2, T3>, T4)
Appends the specified item
to the tuple
.
Declaration
public static Quad<T1, T2, T3, T4> Append<T1, T2, T3, T4>(this Tuple<T1, T2, T3> tuple, T4 item)
Parameters
Type | Name | Description |
---|---|---|
Tuple<T1, T2, T3> | tuple | The tuple to append to. |
T4 | item | The item to append. |
Returns
Type | Description |
---|---|
Quad<T1, T2, T3, T4> | New tuple instance |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first item. |
T2 | The type of the second item. |
T3 | The type of the third item. |
T4 | The type of the fourth item. |
Append<T1, T2, T3, T4, T5>(Tuple<T1, T2, T3, T4>, T5)
Appends the specified item
to the tuple
.
Declaration
public static Tuple<T1, T2, T3, T4, T5> Append<T1, T2, T3, T4, T5>(this Tuple<T1, T2, T3, T4> tuple, T5 item)
Parameters
Type | Name | Description |
---|---|---|
Tuple<T1, T2, T3, T4> | tuple | The tuple to append to. |
T5 | item | The item to append. |
Returns
Type | Description |
---|---|
Tuple<T1, T2, T3, T4, T5> | New tuple instance |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first item. |
T2 | The type of the second item. |
T3 | The type of the third item. |
T4 | The type of the fourth item. |
T5 | The type of the fifth item. |