M&B: Bannerlord 1.1.0
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.Library.Extensions Class Reference

Static Public Member Functions

static MBList< T > ToMBList< T > (this T[] source)
 
static MBList< T > ToMBList< T > (this List< T > source)
 
static MBList< T > ToMBList< T > (this IEnumerable< T > source)
 
static void AppendList< T > (this List< T > list1, List< T > list2)
 
static MBReadOnlyDictionary< TKey, TValue > GetReadOnlyDictionary< TKey, TValue > (this Dictionary< TKey, TValue > dictionary)
 
static bool HasAnyFlag< T > (this T p1, T p2)
 Returns true only if any of the bits in param:flags is set in param:e. 1001.HasAnyFlag(1000) returns true. 1001.HasAnyFlag(1111) returns true.
 
static bool HasAllFlags< T > (this T p1, T p2)
 Behaves exactly like HasFlag. But faster (in release) because there is less check.
 
static int GetDeterministicHashCode (this string text)
 
static int IndexOfMin< TSource > (this IReadOnlyList< TSource > self, Func< TSource, int > func)
 
static int IndexOfMin< TSource > (this MBReadOnlyList< TSource > self, Func< TSource, int > func)
 
static int IndexOfMax< TSource > (this IReadOnlyList< TSource > self, Func< TSource, int > func)
 
static int IndexOfMax< TSource > (this MBReadOnlyList< TSource > self, Func< TSource, int > func)
 
static int IndexOf< TValue > (this TValue[] source, TValue item)
 
static int FindIndex< TValue > (this IReadOnlyList< TValue > source, Func< TValue, bool > predicate)
 
static int FindIndex< TValue > (this MBReadOnlyList< TValue > source, Func< TValue, bool > predicate)
 
static int FindLastIndex< TValue > (this IReadOnlyList< TValue > source, Func< TValue, bool > predicate)
 
static int FindLastIndex< TValue > (this MBReadOnlyList< TValue > source, Func< TValue, bool > predicate)
 
static void Randomize< T > (this IList< T > array)
 

Member Function Documentation

◆ ToMBList< T >() [1/3]

static MBList< T > TaleWorlds.Library.Extensions.ToMBList< T > ( this T[]  source)
static

◆ ToMBList< T >() [2/3]

static MBList< T > TaleWorlds.Library.Extensions.ToMBList< T > ( this List< T >  source)
static

◆ ToMBList< T >() [3/3]

static MBList< T > TaleWorlds.Library.Extensions.ToMBList< T > ( this IEnumerable< T >  source)
static

◆ AppendList< T >()

static void TaleWorlds.Library.Extensions.AppendList< T > ( this List< T >  list1,
List< T >  list2 
)
static

◆ GetReadOnlyDictionary< TKey, TValue >()

static MBReadOnlyDictionary< TKey, TValue > TaleWorlds.Library.Extensions.GetReadOnlyDictionary< TKey, TValue > ( this Dictionary< TKey, TValue >  dictionary)
static

◆ HasAnyFlag< T >()

static bool TaleWorlds.Library.Extensions.HasAnyFlag< T > ( this T  p1,
p2 
)
static
Type Constraints
T :struct 

◆ HasAllFlags< T >()

static bool TaleWorlds.Library.Extensions.HasAllFlags< T > ( this T  p1,
p2 
)
static

Returns true only if all the bits in param:flags is set in param:e. 1001.HasAllFlags(1000) returns false. 1001.HasAllFlags(1111) returns true.

Type Constraints
T :struct 

◆ GetDeterministicHashCode()

static int TaleWorlds.Library.Extensions.GetDeterministicHashCode ( this string  text)
static

◆ IndexOfMin< TSource >() [1/2]

static int TaleWorlds.Library.Extensions.IndexOfMin< TSource > ( this IReadOnlyList< TSource >  self,
Func< TSource, int >  func 
)
static

◆ IndexOfMin< TSource >() [2/2]

static int TaleWorlds.Library.Extensions.IndexOfMin< TSource > ( this MBReadOnlyList< TSource >  self,
Func< TSource, int >  func 
)
static

◆ IndexOfMax< TSource >() [1/2]

static int TaleWorlds.Library.Extensions.IndexOfMax< TSource > ( this IReadOnlyList< TSource >  self,
Func< TSource, int >  func 
)
static

◆ IndexOfMax< TSource >() [2/2]

static int TaleWorlds.Library.Extensions.IndexOfMax< TSource > ( this MBReadOnlyList< TSource >  self,
Func< TSource, int >  func 
)
static

◆ IndexOf< TValue >()

static int TaleWorlds.Library.Extensions.IndexOf< TValue > ( this TValue[]  source,
TValue  item 
)
static

◆ FindIndex< TValue >() [1/2]

static int TaleWorlds.Library.Extensions.FindIndex< TValue > ( this IReadOnlyList< TValue >  source,
Func< TValue, bool >  predicate 
)
static

◆ FindIndex< TValue >() [2/2]

static int TaleWorlds.Library.Extensions.FindIndex< TValue > ( this MBReadOnlyList< TValue >  source,
Func< TValue, bool >  predicate 
)
static

◆ FindLastIndex< TValue >() [1/2]

static int TaleWorlds.Library.Extensions.FindLastIndex< TValue > ( this IReadOnlyList< TValue >  source,
Func< TValue, bool >  predicate 
)
static

◆ FindLastIndex< TValue >() [2/2]

static int TaleWorlds.Library.Extensions.FindLastIndex< TValue > ( this MBReadOnlyList< TValue >  source,
Func< TValue, bool >  predicate 
)
static

◆ Randomize< T >()

static void TaleWorlds.Library.Extensions.Randomize< T > ( this IList< T >  array)
static