Skip to content

Releases: PawelGerr/Thinktecture.Runtime.Extensions

7.0.0

10 Dec 12:27
6c704ee
Compare
Choose a tag to compare
  • See Migration from v6 to v7
  • [BREAKING] Use SmartEnumAttribute<T> instead of IEnum<T>/IValidatableEnum<T>
  • [BREAKING] Smart Enums and Value Object are using (custom) ValidationError instead of ValidationResult
    • Use ValueObjectValidationErrorAttribute<TError> to define the type of a custom validation error
  • The names of the factory methods Create and TryCreate can be changed.
  • Added support for keyless Smart Enums
  • [BREAKING] Split ValueObjectAttribute in keyed ValueObjectAttribute<T> and ComplexValueObject
    • Key member is implemented by the source generator by default.
    • Key member generation can be disabled via SkipKeyMember
    • Attribute property KeyPropertyName has been renamed to KeyMemberName
    • Key member can be renamed via attribute-property KeyMemberName
    • Access modifier of the key member can be configured via KeyMemberAccessModifier
    • Key member kind can be configured via KeyMemberKind
    • Key member comparers can be configured via ValueObjectKeyMemberComparerAttribute and ValueObjectKeyMemberEqualityComparerAttribute
    • IEnum<TKey>.KeyEqualityComparer has been replaced by ValueObjectKeyMemberEqualityComparerAttribute
    • default (equality) comparer of string-based keyed value object is OrdinalIgnoreCase (as with Smart Enums)
  • Added support for EF Core 8
    • [BREAKING] Renamed extension method AddEnumAndValueObjectConverters to AddValueObjectConverters
  • [C# 12] Analyzer prevents the usage of primary constructors with Smart Enums and Value Objects.
  • Json converter for complex value object uses converters instead of reader/writer, this is approach is better because it supports custom converters.
  • Several performance optimizations

6.5.2

17 Nov 16:59
e5ca209
Compare
Choose a tag to compare
  • [SourceGen] Generate Map/Switch if the number of items is less than 1000

6.5.1

13 Nov 07:24
7ecd860
Compare
Choose a tag to compare
  • Bugfix: [Source Gen] Use ComputeHashCode for collections

6.5.0

13 Nov 07:23
fd838b2
Compare
Choose a tag to compare
  • Added ValueObjectFactoryAttribute to create another factory method
    • ValueObjectFactoryAttribute can alter the serialization
    • Added new interface IValueObjectFactory with method Validate having parameter of type IFormatProvider
    • Added new interface IValueObjectConverter with method ToValue
  • ValueObjectModelBinderProvider looks for a string-based IValueObjectFactory before falling back to the type of the key-property
  • Added combination out of AllowNull and NotNull to not-nullable reference parameters of ValidateFactoryArguments to ensures that the value is validated/handled by the developer

6.4.1

09 Nov 12:20
70a32fa
Compare
Choose a tag to compare
  • Bugfix: Source gen should regenerate the code if SkipToString, SkipSwitchMethods or SkipMapMethods change their values.

7.0.0-beta04

07 Nov 22:48
fa7ce89
Compare
Choose a tag to compare
7.0.0-beta04 Pre-release
Pre-release
  • Added ValueObjectFactoryAttribute to create another factory method, which can alter the serialization as well
  • Moved method Validate to a new interface IValueObjectFactory and added a new parameter of type IFormatProvider
  • ValueObjectModelBinderProvider looks for a string-based IValueObjectFactory before falling back to the type of the key-property
  • ValueObjectFactoryAttribute can alter the serialization
  • Moved the method GetKey from IKeyedValueObject to IValueObjectConverter and renamed it to ToValue

7.0.0-beta03

19 Oct 17:41
cc10b75
Compare
Choose a tag to compare
7.0.0-beta03 Pre-release
Pre-release
  • Smart Enums: Switched to FrozenDictionary when running in .NET 8

7.0.0-beta02

19 Oct 17:39
d5a1ebe
Compare
Choose a tag to compare
7.0.0-beta02 Pre-release
Pre-release
  • EF Core 8 RC2

7.0.0-beta01

08 Oct 12:49
69477c1
Compare
Choose a tag to compare
7.0.0-beta01 Pre-release
Pre-release
  • BREAKING: Use SmartEnumAttribute<T> instead of IEnum<T>/IValidatableEnum<T>
  • Added support for EF Core 8

6.4.0

03 Sep 15:48
1c9a687
Compare
Choose a tag to compare
  • Implemented new method Map on smart enums that returns the provided instances for a specific item.