Skip to content
Nils Lück edited this page Oct 15, 2017 · 22 revisions

Changelog

Version 4.0.0

  • Options now implement IComparable<T> and overload related comparison operators
  • Added ValueOrDefault() method in Unsafe namespace
  • Added ToNullable() method in Unsafe namespace
  • Most of Optional.Collections has been merged into Optional itself
  • Added methods to flatten enumerables of options (options.Values() and options.Exceptions())
  • Specific .NET Standard 2.0 target (wherein options are Serializable unlike .NET Standard 1.0)

Version 3.2.0

  • .NET Core (.NET Standard 1.0+) support
  • Library is now CLS compliant
  • Added MatchSome(), MatchNone(), for executing side-effects on Some or None individually
  • Added Flatten() to flatten two nested optionals into one
  • Added NotNull() as an alias for Filter(value => value != null)
  • Minor code cleanup, including argument null checks for Funcs and Actions

Version 3.1.0

  • Added [Serializable] attribute to options.
  • Added unit tests (e.g. official support) for default(Option<T>) etc. (for use in optional parameters etc.)

Version 3.0.0

Note: Although this is a major version increment, there are no breaking changes.

  • Added support for iterating over options in foreach loops.
  • Added ToEnumerable() method, for easily converting options to enumerables.
  • Added an Else method, for easy fallback to another option in case of none.
  • Added NoneWhen() method, as an opposite of SomeWhen.
  • Added possibility of using exception value in Or and ValueOr for Option<T, TException>.

Version 2.2.0

  • Option<T> and Option<T, TException> now implements IEquatable for improved performance.
  • == and != operators have been added for convenience.

Version 2.1.0

  • Switched to semantic versioning scheme
    • And: I decided to rip away the leading zero, as it was basically used incorrectly
  • Added lazily evaluated overloads for key functions, such as ValueOr
    • In this way, the alternative is only evaluated when in a None-state
  • Added a SomeWhen function, to easily create and filter an optional at the same time
  • Remembered XML comments in the nuget package :)

Version 0.2.0.0

  • Added methods to check if an optional contains some value (Contains and Exists)
  • Added Option<T, TException>, representing an Either-type
    • As well as several methods for easy interop between Option<T> and Option<T, TException>
  • Various minor improvement to the underlying code-base

Version 0.1.7.0

  • Moved essential option functionality into the actual struct:
    • Allows cleaner explicit type specification in Match.
    • Allows access to central functionality without manually having to import namespace.
  • Minor improvements in XML documentation.

Version 0.1.6.0

  • Added unsafe value retrieval.
    • Resides in a dedicated Optional.Unsafe namespace.

Version 0.1.5.0

  • Added equality testing, hashing and string conversion.
  • Added method, Or, to specify an alternative value ahead of time.

Version 0.1.0.0

  • Initial version