Releases: Nixill/CSharp.Nixill
Releases · Nixill/CSharp.Nixill
Major refactor
⚠ THIS IS A VERY BREAKING CHANGE. PLEASE SEE THE MIGRATION GUIDE FOR MORE DETAILS AND CHANGELOG.
v0.12.0 - Multiple extension methods and bugfixes
- Created
Nixill.Collections.Grid.CSV.CSVObjectCollection<T>
class - Made the class
Nixill.Collections.Grid.CSV.CSVParser
static - Fixed error with null value in
CSVParser.CSVEscape
(now returns empty string) - Fix
SemVer.CompareTo(SemVer)
- Added several
EnumerableUtils
extension methods:IEnumerable<Task>.NoWait()
- Executes all tasks. Returns nothing and cannot be awaited.IEnumerable<Task>.WaitAllNoReturn()
- Executes all tasks. Returns Task; can be awaited but returns no values.IEnumerable<Task>.WaitAllReturns()
- Executes all tasks and returns their values.IEnumerable<TInput>.Sum<TInput, TOutput>()
(whenTInput : IAdditionOperators<TInput, TOutput, TOutput>, IAdditiveIdentity<TInput, TOutput>
) - Returns the sum of all the elements. (Also a version whereTInput
andTOutput
are the same type.)IEnumerable<TInput>.Average<TInput, TOutput>()
(whenTInput : IAdditionOperators<TInput, TOutput, TOutput>, IAdditiveIdentity<TInput, TOutput>
andTOutput : IDivisionOperators<TOutput, int, TOutput>
) - Returns the average of all the elements, throwing an exception if the input sequence is empty. (Also a version whereTInput
andTOutput
are the same type.)IEnumerable<TInput>.Average<TInput, TOutput>(TOutput)
(whenTInput : IAdditionOperators<TInput, TOutput, TOutput>, IAdditiveIdentity<TInput, TOutput>
andTOutput : IDivisionOperators<TOutput, int, TOutput>
) - Returns the average of all the elements, or a default value if the input sequence is empty.
- Fix
FileUtils.FileCharEnumerator(string)
to close the stream reader when done.
v0.11.1 - Keep fixing Max/Min Many
- Fix
EnumerableUtils.MaxManyBy()
,EnumerableUtils.MaxMany()
, andEnumerableUtils.MinMany()
.
v0.11.0 - More utils!
Add the following constructors for DictionaryGenerator<K, V>
:
(IDictionary<K, V>, Generator<K, V>, bool)
(Generator<K, V>, bool)
()
(Func<K, V>, bool)
(IDictionary<K, V>, Func<K, V>, bool)
(V, bool)
(IDictionary<K, V>, V, bool)
Add the Wrap()
and Wrap(IDictionary<K, V>)
methods to Generator<K, V>
Fix EnumerableUtils.MinManyBy()
Note: The original release notes claimed that this release also fixed MaxManyBy()
. However, only MinManyBy()
is fixed.
Add the following methods to EnumerableUtils
:
ExceptDualBy<T>(this IEnumerable<T>, IEnumerable<T>, Func<T, K>)
ExceptDualBy<T>(this IEnumerable<T>, IEnumerable<T>, Func<T, K>, IEqualityComparer<K>)
IntersectDualBy<T>(this IEnumerable<T>, IEnumerable<T>, Func<T, K>)
IntersectDualBy<T>(this IEnumerable<T>, IEnumerable<T>, Func<T, K>, IEqualityComparer<K>)
SymmetricExcept<T>(this IEnumerable<T>, IEnumerable<T>)
SymmetricExcept<T>(this IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>)
ExceptInstances<T>(this IEnumerable<T>, IEnumerable<T>)
InteractInstances<T>(this IEnumerable<T>, IEnumerable<T>)
SJoin<T>(this IEnumerable<T>, string)
Pairs<T>(this IEnumerable<T>)
Add JsonUtils
with the following methods:
ReadPath(this JsonNode, params object)
WritePath(this JsonNode, JsonNode, params object)
Add JsonPathElementException
v0.10.3 - Minor updates
- Added field
DictionaryGenerator.StoreGeneratedValues
, which defaults totrue
. Whenfalse
, entries that are auto-generated for non-existent keys are not added to the Dictionary. (They can still be generated and added withAdd(K)
.) - Fixed
OffsetGrid.InsertRowShiftUp
andOffsetGrid.InsertColumnShiftLeft
.
0.10.2
v0.10.1 - ChunkWhile overloads
- Added parameters
appendFails
,prependFails
, andskipEmpty
toEnumerableUtils.ChunkWhile<TSource>
- Added overload to
ChunkWhile<TSource>
that takes aFunc<TSource, TSource, bool>
comparing each element to the one preceding it.
v0.10.0 - Major update
- Update to .NET 8.0
- Removes the Snowflake class and the NodaTime dependency
- Fixes
AVLTreeDictionary<K, V>.KeysAround
to actually have the proper equal and higher keys. - Adds
DictionaryGenerator<K, V>()
andDictionaryGenerator<K, V>(Generator<K, V>)
constructor overloads. - Adds
IDictionary<K, V>.WithGenerator(Generator<K, V>)
andIDictionary<K, V>.CopyWithGenerator(Generator<K, V>)
extension methods. - Adds
IList<T>.Pop()
,IEnumerable<T>.Permutations(int)
,IEnumerable<T>.PermutationsDistinct(int)
,IEnumerable<T>.Repeat(int)
,IEnumerable<T>.RepeatInfinite()
,IEnumerable<T>.AggregateFromFirst(Func<T, T, T>)
, andIEnumerable<T>.WithIndex()
extension methods. - Adds
NumberUtils.GCD(int, int)
,NumberUtils.GCD(long, long)
, andNumberUtils.LCM(long, long)
math methods.
Full Changelog: 0.9.4...0.10.0
v0.9.4 - EnumerableUtils.WhereOrdered
- Remove the
GridLine<T>
class because it was causing problems. - Add
EnumerableUtils.WhileOrdered()
to return only increasing elements through a sequence.
v0.9.3 - IGrid.Columns and EnumerableUtils.ChunkWhile
- Added IGrid.Columns, which is an IEnumerable that enumerates columns-first over the grid.
- Added EnumerableUtils.ChunkWhile, which returns varying-size chunks of the input sequence. Each individual chunk is consecutive elements that satisfy the given condition. Chunks do not include the element that breaks them. If multiple consecutive elements don't satisfy the condition, an empty chunk is returned between them.
- Added EnumerableUtils.FormString, which converts an IEnumerable into a string (it is simply
new string(input.ToArray())
).