Releases: PawelGerr/Thinktecture.Runtime.Extensions
Releases · PawelGerr/Thinktecture.Runtime.Extensions
7.4.0
7.3.0
- Handling of
Nullable<T>
should be done bySystem.Text.Json
- Non-generic
ValueObjectJsonConverterFactory
prioritizesJsonConverterAttribute
over its own converter (by default) ValueObjectMessageFormatterResolver
prioritizesMessagePackFormatterAttribute
over its own formatter (by default)
7.2.1
7.2.0
7.1.0
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