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
ListExtension Class Reference

Static Public Member Functions

static T AddUnique< T > (this IList< T > list, T item)
 Adds an element to the collection only if it isn't contained in it already. More...
 
static void AddUniqueRange< T > (this IList< T > list, IEnumerable< T > items)
 Adds an element to the collection only if it isn't contained in it already. More...
 
static void AddUniqueRange< T > (this IList< T > list, IList< T > items)
 Adds an element to the collection only if it isn't contained in it already. More...
 
static bool ContainsId (this List< Part > list, Part p)
 Search a Part List for matching Part.PersistentId. More...
 
static bool ContainsId (this List< Part > list, uint id)
 Search a Part List for matching Part.PersistentId. More...
 
static bool ContainsId (this HashSet< Part > list, Part p)
 Search a Part HashSet for matching Part.PersistentId. More...
 
static T MaxAt< T, TKey > (this IList< T > list, System.Func< T, TKey > sortBy)
 Returns the element of a collection with the highest TKey value More...
 
static T MinAt< T, TKey > (this IList< T > list, System.Func< T, TKey > sortBy)
 Returns the element of a collection with the lowest TKey value More...
 
static List< T > OrderByAlphaNumeric< T > (this List< T > source, System.Func< T, string > selector)
 
static T[] OrderByAlphanumeric< T > (this T[] source, System.Func< T, string > selector)
 
static void SetRange< T > (this List< T > list, T[] range, int startIndex)
 
static void SetRange< T > (this List< T > list, List< T > range, int startIndex)
 
static void SetRange< T > (this T[] list, List< T > range, int startIndex)
 
static void SetRange< T > (this T[] list, T[] range, int startIndex)
 
static void Shuffle< T > (this IList< T > list)
 Shuffles list order More...
 

Member Function Documentation

static T ListExtension.AddUnique< T > ( this IList< T >  list,
item 
)
inlinestatic

Adds an element to the collection only if it isn't contained in it already.

static void ListExtension.AddUniqueRange< T > ( this IList< T >  list,
IEnumerable< T >  items 
)
inlinestatic

Adds an element to the collection only if it isn't contained in it already.

static void ListExtension.AddUniqueRange< T > ( this IList< T >  list,
IList< T >  items 
)
inlinestatic

Adds an element to the collection only if it isn't contained in it already.

static bool ListExtension.ContainsId ( this List< Part list,
Part  p 
)
inlinestatic

Search a Part List for matching Part.PersistentId.

Parameters
list
pThe Part to look for (looks for matching persistentId from this referenced Part
Returns
static bool ListExtension.ContainsId ( this List< Part list,
uint  id 
)
inlinestatic

Search a Part List for matching Part.PersistentId.

Parameters
list
idThe Part to look for (looks for matching persistentId from this referenced Part
Returns
static bool ListExtension.ContainsId ( this HashSet< Part list,
Part  p 
)
inlinestatic

Search a Part HashSet for matching Part.PersistentId.

Parameters
list
pThe Part to look for (looks for matching persistentId from this referenced Part
Returns
static T ListExtension.MaxAt< T, TKey > ( this IList< T >  list,
System.Func< T, TKey >  sortBy 
)
inlinestatic

Returns the element of a collection with the highest TKey value

static T ListExtension.MinAt< T, TKey > ( this IList< T >  list,
System.Func< T, TKey >  sortBy 
)
inlinestatic

Returns the element of a collection with the lowest TKey value

static List<T> ListExtension.OrderByAlphaNumeric< T > ( this List< T >  source,
System.Func< T, string >  selector 
)
inlinestatic
static T [] ListExtension.OrderByAlphanumeric< T > ( this T[]  source,
System.Func< T, string >  selector 
)
inlinestatic
static void ListExtension.SetRange< T > ( this List< T >  list,
T[]  range,
int  startIndex 
)
inlinestatic
static void ListExtension.SetRange< T > ( this List< T >  list,
List< T >  range,
int  startIndex 
)
inlinestatic
static void ListExtension.SetRange< T > ( this T[]  list,
List< T >  range,
int  startIndex 
)
inlinestatic
static void ListExtension.SetRange< T > ( this T[]  list,
T[]  range,
int  startIndex 
)
inlinestatic
static void ListExtension.Shuffle< T > ( this IList< T >  list)
inlinestatic

Shuffles list order


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