Skip to content

Releases: martinothamar/Mediator

v3.1.0-preview.14

16 Nov 13:21
13f108e

Choose a tag to compare

v3.1.0-preview.14 Pre-release
Pre-release

🚀 Features, improvements

  • [#233] Add stream message processing support by @Duan112358
  • [#238] CachingMode configuration for improving cold start performance (relevant for serverless and simiilar scenarios)
  • [#240] .NET 10, update packages

New Contributors

Packages

README has been updated with docs.
Please test and provide feedback!

v3.0

05 Aug 21:40

Choose a tag to compare

🚀 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 INotificationPublisher and MediatorOptions.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 IRequest etc - 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

v2.1 - Bugfixes, new abstractions for pre/post-processors and exception hadlers

01 Mar 19:18

Choose a tag to compare

Bugfixes:

  • Fix thread safety issue in ISourceGenerator/IIncrementalGenerator implementations (#56) (also backported to 2.0.x)
  • Make sure transient handlers are disposed (#73) (also backported to 2.0.x)
  • Fix build performance regression after #77 (#84)
  • Disable CS8321 warning for generated code, "unused local function" #85
  • Harden AddMediator configuration - explicit type parameter (#82)

Feature:

  • Pre, post processors and exception handlers (#67)
  • Fix for the source generator to process projects that do not directly use any of the types from Mediator.Abstractions (#77) (thanks @anadale!)
    • Supports codegen for projects that transitively depend on Mediator.Abstractions

Other:

  • Cleanup and modernization of ASP.NET Core clean architecture sample #12f2102

v2.0 - new configuration options, better error handling, bugfixes and perf improvements

04 Dec 18:49

Choose a tag to compare

Finally publishing the v2.0 release.

  • Configure Mediator through AddMediator call (assembly attribute still works) (#21, #24)
  • Throw ArgumentNullException for null messages (#22)
  • Pass Publish<INotification> calls to Publish(object) (#22)
  • Optimize notifications (52ns -> 11ns for the most common case) (#23)
  • Cleanup and optimization in source generator (#25, thanks @Timmoth!)
  • Modernize source generator to support both 3.8 and 4.0 Roslyn versions (also prepare for incremental codegen) (#26)
  • Updated benchmarks to account for changes (#27)
  • Smoketests, unittests, memory allocation tests (#28, #29)
  • Cleanup analysis-part of source generator, use 6.0.0 of .NET references (#30)
  • Use csharpier for consistent formatting (#31)
  • Benchmark for source generation process (#32)
  • Bugfix for using arrays as response types (#33, #34)
  • Multiple bugfixes for stream requests and structs (see linked PRs #36, thanks @Tornhoof!)
  • Improve error handling in source generation process (#33 (comment), #40)
  • Support Notification Handler Identification via Reflection (#39, #42, thanks @Tornhoof!)
  • Fix defensive copy for non-readonly structs (#43, #44, thanks @Tornhoof!)
  • Add missing debugger attributes (#46)
  • Bugfixes and benchmark for larger projects (#41)
  • Fix thread safety issue in ISourceGenerator/IIncrementalGenerator implementations (#56, thanks for reporting @AlexDelepine!)
  • Typo fix in README (#61, thanks @sjmdsky!)

v1.0 - streaming async iterators support and .NET Standard 2.1

10 Feb 21:22

Choose a tag to compare

This release includes

  • Support for streaming async iterators (IAsyncEnumerable) and bumped the target framework to .NET Standard 2.1. (#9 #13)
  • Project is now built using .NET 6
  • Updated docs, benchmarks (new versions of MediatR etc)