Releases: PawelGerr/Thinktecture.Runtime.Extensions
Releases · PawelGerr/Thinktecture.Runtime.Extensions
7.0.0
- See Migration from v6 to v7
- [BREAKING] Use
SmartEnumAttribute<T>
instead ofIEnum<T>
/IValidatableEnum<T>
- [BREAKING] Smart Enums and Value Object are using (custom)
ValidationError
instead ofValidationResult
- Use
ValueObjectValidationErrorAttribute<TError>
to define the type of a custom validation error
- Use
- The names of the factory methods
Create
andTryCreate
can be changed. - Added support for keyless Smart Enums
- [BREAKING] Split
ValueObjectAttribute
in keyedValueObjectAttribute<T>
andComplexValueObject
- Key member is implemented by the source generator by default.
- Key member generation can be disabled via
SkipKeyMember
- Attribute property
KeyPropertyName
has been renamed toKeyMemberName
- 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
andValueObjectKeyMemberEqualityComparerAttribute
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
toAddValueObjectConverters
- [BREAKING] Renamed extension method
- [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
6.5.1
6.5.0
- Added
ValueObjectFactoryAttribute
to create another factory methodValueObjectFactoryAttribute
can alter the serialization- Added new interface
IValueObjectFactory
with methodValidate
having parameter of typeIFormatProvider
- Added new interface
IValueObjectConverter
with methodToValue
ValueObjectModelBinderProvider
looks for a string-basedIValueObjectFactory
before falling back to the type of the key-property- Added combination out of
AllowNull
andNotNull
to not-nullable reference parameters ofValidateFactoryArguments
to ensures that the value is validated/handled by the developer
6.4.1
7.0.0-beta04
- Added
ValueObjectFactoryAttribute
to create another factory method, which can alter the serialization as well - Moved method
Validate
to a new interfaceIValueObjectFactory
and added a new parameter of typeIFormatProvider
ValueObjectModelBinderProvider
looks for a string-basedIValueObjectFactory
before falling back to the type of the key-property- ValueObjectFactoryAttribute can alter the serialization
- Moved the method
GetKey
fromIKeyedValueObject
toIValueObjectConverter
and renamed it toToValue
7.0.0-beta03
- Smart Enums: Switched to FrozenDictionary when running in .NET 8
7.0.0-beta02
- EF Core 8 RC2
7.0.0-beta01
- BREAKING: Use
SmartEnumAttribute<T>
instead ofIEnum<T>
/IValidatableEnum<T>
- Added support for EF Core 8