🚀 Features, improvements & breaking changes
- [#176] Refactor source generation template, improve performance and update benchmarks - fixed "large project" performance, i.e. many messages
- [#203] Add configuration to make generated types internal (
MediatorOptions.GenerateTypesAsInternal) - allows control over visibility of generated types - [#202] Support for explicit assemblies configuration (where to find messages and handlers,
MediatorOptions.Assemblies) - improves control over source generation scope - [#145] Parallel notifications, correct ordering for switch statement cases - introduction of
INotificationPublisherandMediatorOptions.NotificationPublisherType - [#140] Upgrade to .NET 8, upgrade csharpier, fix tests and remove Roslyn 3.8, 4.0 support - Roslyn 4.1+ supported
- Proper NativeAOT support (see linked issues):
- [#199] Get rid of open generics registrations for generic notification handlers - cleaner DI registration
- [#188] Generate DI registrations for pipelines using constructed types when provided in 'MediatorOptions' configuration (
MediatorOptions.PipelineBehaviors/MediatorOptions.StreamPipelineBehaviors)
- [#179] Put internal components in '.Internals' namespace in generated source
- [#66] Improved error handling (consistent exceptions) and XML docs
- [#181] Improve code formatting in generated code
- [#180] Cleanup and improve initialization of models used during source generation
- [#113] Add incremental caching - performance improvement for source generation
- [#99] Generate code with NRT enabled - nullable reference types support
- [#86] Remove unnecessary System.Threading.Tasks.Extensions dependency
🐛 Bug Fixes
- [#207] Fix issue where diagnostics were reported with location from different assemblies
- [#206] Fix support for multiple notification handlers on 1 class
- [#147] Fix buggy code for ordering switch statement cases for messages
- [#191] Fix HasManyCommands typo in the template
- [#190] Fix ManyQueries template
- [#52] CancellationToken parameters must come last - parameter ordering fix
- [#131] Use correct accessibility modifier based on message implementing
IRequestetc - to support internal messages - [#219] Remove ServiceDescriptor alias in Mediator.g.cs - alias collision. Potential breaking change for users relying on this alias
📚 Documentation & Samples
- [#201] Add MassTransit sample - new integration example
- [#173] .NET Framework 4.6.2 sample, improve netstandard support
- 3c6326e Add notifications sample
- 466dbd7 Add simple Autofac sample
Contributors:
Thank you all!
This is a big release, some changes are not listed above.
See full changelog at release/v2.1...release/v3.0