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

Static Public Member Functions

static List< Type > GetTypesSafe (this Assembly assembly, Func< Type, bool > func=null)
 
static object[] GetCustomAttributesSafe (this Type type, Type attributeType, bool inherit)
 
static object[] GetCustomAttributesSafe (this Type type, bool inherit)
 
static IEnumerable< Attribute > GetCustomAttributesSafe (this Type type, Type attributeType)
 
static object[] GetCustomAttributesSafe (this PropertyInfo property, Type attributeType, bool inherit)
 
static object[] GetCustomAttributesSafe (this PropertyInfo property, bool inherit)
 
static IEnumerable< Attribute > GetCustomAttributesSafe (this PropertyInfo property, Type attributeType)
 
static object[] GetCustomAttributesSafe (this FieldInfo field, Type attributeType, bool inherit)
 
static object[] GetCustomAttributesSafe (this FieldInfo field, bool inherit)
 
static IEnumerable< Attribute > GetCustomAttributesSafe (this FieldInfo field, Type attributeType)
 
static object[] GetCustomAttributesSafe (this MethodInfo method, Type attributeType, bool inherit)
 
static object[] GetCustomAttributesSafe (this MethodInfo method, bool inherit)
 
static IEnumerable< Attribute > GetCustomAttributesSafe (this MethodInfo method, Type attributeType)
 
static object[] GetCustomAttributesSafe (this Assembly assembly, Type attributeType, bool inherit)
 
static object[] GetCustomAttributesSafe (this Assembly assembly, bool inherit)
 
static IEnumerable< Attribute > GetCustomAttributesSafe (this Assembly assembly, Type attributeType)
 
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

◆ GetTypesSafe()

static List< Type > TaleWorlds.Library.Extensions.GetTypesSafe ( this Assembly assembly,
Func< Type, bool > func = null )
static

◆ GetCustomAttributesSafe() [1/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this Type type,
Type attributeType,
bool inherit )
static

◆ GetCustomAttributesSafe() [2/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this Type type,
bool inherit )
static

◆ GetCustomAttributesSafe() [3/15]

static IEnumerable< Attribute > TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this Type type,
Type attributeType )
static

◆ GetCustomAttributesSafe() [4/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this PropertyInfo property,
Type attributeType,
bool inherit )
static

◆ GetCustomAttributesSafe() [5/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this PropertyInfo property,
bool inherit )
static

◆ GetCustomAttributesSafe() [6/15]

static IEnumerable< Attribute > TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this PropertyInfo property,
Type attributeType )
static

◆ GetCustomAttributesSafe() [7/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this FieldInfo field,
Type attributeType,
bool inherit )
static

◆ GetCustomAttributesSafe() [8/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this FieldInfo field,
bool inherit )
static

◆ GetCustomAttributesSafe() [9/15]

static IEnumerable< Attribute > TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this FieldInfo field,
Type attributeType )
static

◆ GetCustomAttributesSafe() [10/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this MethodInfo method,
Type attributeType,
bool inherit )
static

◆ GetCustomAttributesSafe() [11/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this MethodInfo method,
bool inherit )
static

◆ GetCustomAttributesSafe() [12/15]

static IEnumerable< Attribute > TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this MethodInfo method,
Type attributeType )
static

◆ GetCustomAttributesSafe() [13/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this Assembly assembly,
Type attributeType,
bool inherit )
static

◆ GetCustomAttributesSafe() [14/15]

static object[] TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this Assembly assembly,
bool inherit )
static

◆ GetCustomAttributesSafe() [15/15]

static IEnumerable< Attribute > TaleWorlds.Library.Extensions.GetCustomAttributesSafe ( this Assembly assembly,
Type attributeType )
static

◆ 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,
T p2 )
static
Type Constraints
T :struct 

◆ HasAllFlags< T >()

static bool TaleWorlds.Library.Extensions.HasAllFlags< T > ( this T p1,
T 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