Skip to content
This repository was archived by the owner on Oct 21, 2026. It is now read-only.

Ametrin.Optional - v0.2.5

Choose a tag to compare

@BarionLP BarionLP released this 29 Jul 16:49
· 90 commits to main since this release

What's Changed

  • added Or(Throw)Async (#24)
  • added OrThrow with custom message (#23)
  • added Option<T>.ToResultAsync
  • added Result<T(, E)>.To(Option|ErrorState)Async
  • added ErrorState(<E>).ToResult(Async)
  • added DisposeAsync extension methods
  • made Result<TValue> to Result<TValue, Exception> explicit to prevent accidential conversions
  • marked all custom exceptions as System.Serializable (#22)
  • deprecated ToOption and ToResult on arbitary objects (they are more annoying than helpful)
  • removed obsolete (Try)Map(Async) overloads that took an error map
    • replaced by MapError (#19)
  • introduced a generator for some async extension methods. please report any breaking changes you encounter with async!
  • updated TUnit to 0.25.21

0.2.4

  • added (Try)Map(Error) overloads with one argument (#21)
  • added RequireExists for Result<FileSystemInfo, Error>
  • added RequireExists overload with custom error for Result<FileSystemInfo>
  • added ZipArchive.TryGetEntry returning an option
  • updated TUnit to 0.24.0

Full Changelog: v0.2.3...v0.2.5