Skip to content

Simple optional types for .NET with basic helpers

License

Notifications You must be signed in to change notification settings

andryushchenko/AInq.Optional

Repository files navigation

AInq.Optional

GitHub release (latest by date) GitHub

AInq

What is it?

Simple optional types with basic helpers and converters

  • Maybe<T> value or nothing
  • Try<T> value or error
  • Either<TLeft, TRight> value either value

New in 3.0

For version 3.0 this lib was completely rewriten with some breaking changes

  • All types are now class instead of struct
  • Remove some logically obscure methods
    • IComparable implementation (problems with comparing null and empty item)
    • Type cast operators (unused)
    • Try.SelectOrDefault and Try.ValueOrDefault (implicitly hides error, can be replased with Try.AsMaybe)
  • Async extensions completely rewriten using ValueTask and moved to separate package

Packages description

Nuget AInq.Optional

Types and basic helpers

Nuget AInq.Optional.Async

Async helpers

Contribution

If you find a bug, have a question or something else - you are friendly welcome to open an issue.

License

Copyright © 2021 Anton Andryushchenko. AInq.Optional is licensed under Apache License 2.0