M&B: Bannerlord 1.2.7
The horns sound, the ravens gather.
|
Static Public Member Functions | |
static string | ToHexadecimalString (this uint number) |
Converts the numeric value of this instance to its equivalent hexadecimal string representation. | |
static string | Description (this Enum value) |
static float | NextFloat (this Random random) |
Returns a random number between 0.0f and 1.0f. | |
static TSource | MaxBy< TSource, TKey > (this IEnumerable< TSource > source, Func< TSource, TKey > selector) |
Returns the maximal element of the given sequence, based on the given projection. | |
static TSource | MaxBy< TSource, TKey > (this IEnumerable< TSource > source, Func< TSource, TKey > selector, out TKey maxKey) |
Returns the maximal element of the given sequence, based on the given projection. | |
static TSource | MaxBy< TSource, TKey > (this IEnumerable< TSource > source, Func< TSource, TKey > selector, IComparer< TKey > comparer, out TKey maxKey) |
Returns the maximal element of the given sequence, based on the given projection and the specified comparer for projected values. | |
static TSource | MinBy< TSource, TKey > (this IEnumerable< TSource > source, Func< TSource, TKey > selector) |
Returns the minimal element of the given sequence, based on the given projection. | |
static TSource | MinBy< TSource, TKey > (this IEnumerable< TSource > source, Func< TSource, TKey > selector, IComparer< TKey > comparer) |
Returns the minimal element of the given sequence, based on the given projection and the specified comparer for projected values. | |
static IEnumerable< TSource > | DistinctBy< TSource, TKey > (this IEnumerable< TSource > source, Func< TSource, TKey > keySelector) |
Returns all distinct elements of the given source, where "distinctness" is determined via a projection and the default equality comparer for the projected type. | |
static IEnumerable< TSource > | DistinctBy< TSource, TKey > (this IEnumerable< TSource > source, Func< TSource, TKey > keySelector, IEqualityComparer< TKey > comparer) |
Returns all distinct elements of the given source, where "distinctness" is determined via a projection and the specified comparer for the projected type. | |
static string | Add (this string str, string appendant, bool newLine=true) |
static IEnumerable< string > | Split (this string str, int maxChunkSize) |
static BattleSideEnum | GetOppositeSide (this BattleSideEnum side) |
static IEnumerable< IEnumerable< T > > | Split< T > (this IEnumerable< T > source, int splitItemCount) |
static bool | IsEmpty< T > (this IEnumerable< T > source) |
If the sequence is empty or has an element. | |
static void | Shuffle< T > (this IList< T > list) |
Randomizes the list. | |
static T | GetRandomElement< T > (this IReadOnlyList< T > e) |
static T | GetRandomElement< T > (this MBReadOnlyList< T > e) |
static T | GetRandomElement< T > (this MBList< T > e) |
static T | GetRandomElement< T > (this T[] e) |
static T | GetRandomElementInefficiently< T > (this IEnumerable< T > e) |
static T | GetRandomElementWithPredicate< T > (this T[] e, Func< T, bool > predicate) |
static T | GetRandomElementWithPredicate< T > (this MBReadOnlyList< T > e, Func< T, bool > predicate) |
static T | GetRandomElementWithPredicate< T > (this MBList< T > e, Func< T, bool > predicate) |
static T | GetRandomElementWithPredicate< T > (this IReadOnlyList< T > e, Func< T, bool > predicate) |
static List< Tuple< T1, T2 > > | CombineWith< T1, T2 > (this IEnumerable< T1 > list1, IEnumerable< T2 > list2) |
Generates the combinations of the two lists. | |
|
static |
number |
|
static |
|
static |
random |
|
static |
If more than one element has the maximal projected value, the first one encountered will be returned. This overload uses the default comparer for the projected type. This operator uses immediate execution, but only buffers a single result (the current maximal element).
TSource | Type of the source sequence |
TKey | Type of the projected element |
source | Source sequence |
selector | Selector to use to pick the results to compare |
ArgumentNullException | source or selector is null |
InvalidOperationException | source is empty |
|
static |
If more than one element has the maximal projected value, the first one encountered will be returned. This overload uses the default comparer for the projected type. This operator uses immediate execution, but only buffers a single result (the current maximal element).
TSource | Type of the source sequence |
TKey | Type of the projected element |
source | Source sequence |
selector | Selector to use to pick the results to compare |
ArgumentNullException | source or selector is null |
InvalidOperationException | source is empty |
|
static |
If more than one element has the maximal projected value, the first one encountered will be returned. This overload uses the default comparer for the projected type. This operator uses immediate execution, but only buffers a single result (the current maximal element).
TSource | Type of the source sequence |
TKey | Type of the projected element |
source | Source sequence |
selector | Selector to use to pick the results to compare |
comparer | Comparer to use to compare projected values |
ArgumentNullException | source , selector or comparer is null |
InvalidOperationException | source is empty |
|
static |
If more than one element has the minimal projected value, the first one encountered will be returned. This overload uses the default comparer for the projected type. This operator uses immediate execution, but only buffers a single result (the current minimal element).
TSource | Type of the source sequence |
TKey | Type of the projected element |
source | Source sequence |
selector | Selector to use to pick the results to compare |
ArgumentNullException | source or selector is null |
InvalidOperationException | source is empty |
|
static |
If more than one element has the minimal projected value, the first one encountered will be returned. This overload uses the default comparer for the projected type. This operator uses immediate execution, but only buffers a single result (the current minimal element).
TSource | Type of the source sequence |
TKey | Type of the projected element |
source | Source sequence |
selector | Selector to use to pick the results to compare |
comparer | Comparer to use to compare projected values |
ArgumentNullException | source , selector or comparer is null |
InvalidOperationException | source is empty |
|
static |
This operator uses deferred execution and streams the results, although a set of already-seen keys is retained. If a key is seen multiple times, only the first element with that key is returned.
TSource | Type of the source sequence |
TKey | Type of the projected element |
source | Source sequence |
keySelector | Projection for determining "distinctness" |
|
static |
This operator uses deferred execution and streams the results, although a set of already-seen keys is retained. If a key is seen multiple times, only the first element with that key is returned.
TSource | Type of the source sequence |
TKey | Type of the projected element |
source | Source sequence |
keySelector | Projection for determining "distinctness" |
comparer | The equality comparer to use to determine whether or not keys are equal. If null, the default equality comparer for TSource is used. |
|
static |
|
static |
|
static |
|
static |
|
static |
T |
source |
|
static |
T |
list |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
T1 | |
T2 |
list1 | |
list2 |