-
Notifications
You must be signed in to change notification settings - Fork 74
Changelog
Nils Lück edited this page Apr 17, 2016
·
22 revisions
- Added
[Serializable]
attribute to options. - Added unit tests (e.g. official support) for
default(Option<T>)
etc. (for use in optional parameters etc.)
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 ofSomeWhen
. - Added possibility of using exception value in
Or
andValueOr
forOption<T, TException>
.
-
Option<T>
andOption<T, TException>
now implementsIEquatable
for improved performance. -
==
and!=
operators have been added for convenience.
- 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 :)
- Added methods to check if an optional contains some value (
Contains
andExists
) - Added
Option<T, TException>
, representing an Either-type- As well as several methods for easy interop between
Option<T>
andOption<T, TException>
- As well as several methods for easy interop between
- Various minor improvement to the underlying code-base
- 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.
- Allows cleaner explicit type specification in
- Minor improvements in XML documentation.
- Added unsafe value retrieval.
- Resides in a dedicated
Optional.Unsafe
namespace.
- Resides in a dedicated
- Added equality testing, hashing and string conversion.
- Added method,
Or
, to specify an alternative value ahead of time.
- Initial version