Skip to content

Releases: Nixill/CSharp.Nixill

Major refactor

25 Dec 19:25
Compare
Choose a tag to compare

⚠ THIS IS A VERY BREAKING CHANGE. PLEASE SEE THE MIGRATION GUIDE FOR MORE DETAILS AND CHANGELOG.

v0.12.0 - Multiple extension methods and bugfixes

11 Oct 03:46
Compare
Choose a tag to compare
  • 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>() (when TInput : IAdditionOperators<TInput, TOutput, TOutput>, IAdditiveIdentity<TInput, TOutput>) - Returns the sum of all the elements. (Also a version where TInput and TOutput are the same type.)
    • IEnumerable<TInput>.Average<TInput, TOutput>() (when TInput : IAdditionOperators<TInput, TOutput, TOutput>, IAdditiveIdentity<TInput, TOutput> and TOutput : IDivisionOperators<TOutput, int, TOutput>) - Returns the average of all the elements, throwing an exception if the input sequence is empty. (Also a version where TInput and TOutput are the same type.)
    • IEnumerable<TInput>.Average<TInput, TOutput>(TOutput) (when TInput : IAdditionOperators<TInput, TOutput, TOutput>, IAdditiveIdentity<TInput, TOutput> and TOutput : 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

29 Jun 05:27
Compare
Choose a tag to compare
  • Fix EnumerableUtils.MaxManyBy(), EnumerableUtils.MaxMany(), and EnumerableUtils.MinMany().

v0.11.0 - More utils!

28 Jun 20:44
Compare
Choose a tag to compare

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

18 Dec 23:39
Compare
Choose a tag to compare
  • Added field DictionaryGenerator.StoreGeneratedValues, which defaults to true. When false, entries that are auto-generated for non-existent keys are not added to the Dictionary. (They can still be generated and added with Add(K).)
  • Fixed OffsetGrid.InsertRowShiftUp and OffsetGrid.InsertColumnShiftLeft.

0.10.2

13 Dec 07:35
Compare
Choose a tag to compare

Added IEnumerable<T>.Combinations(int).

v0.10.1 - ChunkWhile overloads

12 Dec 23:08
Compare
Choose a tag to compare
  • Added parameters appendFails, prependFails, and skipEmpty to EnumerableUtils.ChunkWhile<TSource>
  • Added overload to ChunkWhile<TSource> that takes a Func<TSource, TSource, bool> comparing each element to the one preceding it.

v0.10.0 - Major update

12 Dec 00:18
Compare
Choose a tag to compare
  • 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>() and DictionaryGenerator<K, V>(Generator<K, V>) constructor overloads.
  • Adds IDictionary<K, V>.WithGenerator(Generator<K, V>) and IDictionary<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>), and IEnumerable<T>.WithIndex() extension methods.
  • Adds NumberUtils.GCD(int, int), NumberUtils.GCD(long, long), and NumberUtils.LCM(long, long) math methods.

Full Changelog: 0.9.4...0.10.0

v0.9.4 - EnumerableUtils.WhereOrdered

09 Dec 07:40
Compare
Choose a tag to compare
  • 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

07 Dec 18:07
Compare
Choose a tag to compare
  • 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())).