Skip to content

8.0.0

Compare
Choose a tag to compare
@PawelGerr PawelGerr released this 11 Dec 20:47
· 6 commits to master since this release
4e4070d
  • [Breaking] Replaced (equality-based) Switch/Map with index-based ones.
  • Adding sealed/readonly on class/struct is not necessary anymore, source gen takes this over
  • Added discriminated unions (regular and ad hoc)
    • A union can be a struct or a ref struct.
    • Args of switch/map must be named.
    • Access modifier of union ctors are configurable + implicit conversions can be omitted.
  • Smart enums, value object and unions can be nested
  • [.NET 9] String-based smart enums are ISpanParsable
  • [.NET 9] State and result of methods Switch/Map can be a ref struct
  • Unions and value objects structs disallow default(T) and parameterless ctors by default. Value objects are configurable via AllowDefaultStructs.
    • Union structs throw InvalidOperationException if they are not initialized or initialized with default value
    • DefaultInstanceProperty is generated if AllowDefaultStructs is set to true
  • Non-hardcoded method args are escaped by default
  • EF value converter shouldn't do unnecessary round-trip conversion
  • Renamed generic type parameter from TContext to TState
  • Bugfix in analyzer regadring arrays