Releases: modabas/ModResults
Releases · modabas/ModResults
Release list
1.3.2
What's Changed
- Add static factory method
FailureResult.From()to convert anyBaseResult<Failure>type (e.g.Result,Result<TValue>) into FailureResult. - Introduce
AsResult()conversion methods forResultandResult<TValue>. These methods wrap Failure/Statements properties of source result instead of creating new property objects and copying information, whichToResult()do. - Add wrapSourceProperties param to static Fail methods of
ResultandResult<TValue>, for control over wrapping vs copying. Wrapping is now default behavior. - Add tests for new features and behaviors.
- Update documentation.
Full Changelog: 1.3.1...1.3.2
1.3.1
What's Changed
- Introduce
BaseBusinessResult<TSelf>as an intermediary base to Result types to consolidate various methods that return result object itself into one place and remove duplication, - Introduce
FailureResultobject that represents a business result in failed state to ease creation of Result without specifying TValue implicitly, - Add extension methods, implicit operators and Orleans serialization surrogates to
FailureResultsimilar toResultandResult<TValue>, - Add
AsResult()extension methods to result types and make implicit conversions to use these methods instead ofToResult()methods, - Reorganize extension methods for various types,
- Update documentation,
- Add tests,
Full Changelog: 1.3.0...1.3.1
1.3.0
What's Changed
Introduces a refactor of the ModResults library, optimizing memory usage for empty results, unifying result types under new base abstractions, and modernizing extension methods using C# 14 features. It also enhances API consistency, improves Minimal API integration, and updates serialization logic.
- BaseResult.cs: Adds new abstract base result classes and centralizes statements/facts/warnings logic.
- Failure.cs, Statements.cs: Refactors to use nullable collections and adds
HasErrors(),HasFacts(), andHasWarnings()methods for efficient memory usage. - Static failed result factory methods now use
params IEnumerable<T>as input parameters instead ofparams T[]. - Extension and conversion files (e.g., ResultFactExtensions.cs, ResultWarningExtensions.cs, ResultConversionExtensions.cs): Refactored to use C# 14 extension syntax and new base types for more flexible and type-safe APIs.
- ModResults.MinimalApis: Introduces TypedResultsExtensions for improved Minimal API error handling and status code mapping.
- updates to Orleans surrogates for efficient serialization.
- removed IStatements interface.
Full Changelog: 1.2.1...1.3.0
1.3.0-preview1
What's Changed
Introduces a refactor of the ModResults library, optimizing memory usage for empty results, unifying result types under new base abstractions, and modernizing extension methods using C# 14 features. It also enhances API consistency, improves Minimal API integration, and updates serialization logic.
- BaseResult.cs: Adds new abstract base result classes and centralizes statements/facts/warnings logic.
- Failure.cs, Statements.cs: Refactors to use nullable collections and adds
HasErrors(),HasFacts(), andHasWarnings()methods for efficient memory usage. - Static failed result factory methods now use
params IEnumerable<T>as input parameters instead ofparams T[]. - Extension and conversion files (e.g., ResultFactExtensions.cs, ResultWarningExtensions.cs, ResultConversionExtensions.cs): Refactored to use C# 14 extension syntax and new base types for more flexible and type-safe APIs.
- ModResults.MinimalApis: Introduces TypedResultsExtensions for improved Minimal API error handling and status code mapping.
- updates to Orleans surrogates for efficient serialization.
- removed IStatements interface.
Full Changelog: 1.2.1...1.3.0-preview1