MAUI Event collector will iterate the page modal stack
Enhancement
ASPNET extension now offers a ValidationJsonExceptionHandler which takes a middleware exception and translates it back to the client
Enhancement
Sentry extension will no longer attempt to do transactions if Sentry is not active in dependency injection (due to debug mode or code flags of some sort)
ICommandExecuter, IEventExecutor, IStreamRequestExecutor, and IRequestExecutor all added behind mediator to allow more plug points for things like Sentry to watch scope
BREAKINGEnhancement
IMediator.Request now returns a tuple with context and result instead of having a separate extension
BREAKINGEnhancement
RequestContext, EventContext, CommandContext, and EventAggregatedContext are now all MediatorContext. (I)MediatorContext has ChildContexts to replace EventAggregatedContext
BREAKINGEnhancement
BypassMiddleware & BypassExceptionHandling is now built directly into the mediator context
BREAKINGEnhancement
You no longer pass headers to mediator calls, there is a callback that provides an IMediatorContext where you can setup all the necessary headers directly
Enhancement
MediatorContext now has an activity source for providing telemetry through handlers and middleware
Enhancement
MAUI connectivity broadcaster now watches for pages (and their binding context) appearing to see if it should receive connectivity event as well as sending last event value immediately
Fix
Stream Requests now have their service scope properly disposed even if an error occurs during enumeration
BREAKINGChore
MediatorContext Values is now called Headers
BREAKINGChore
ShinyConfigurator is now called ShinyMediatorBuilder
ConnectivityBroadcaster allows your services to take IEventHandler<ConnectivityChanged> to have your services listen to one central location of connectivity change events
New Dapper Extension that allows you to easily (and smartly) use Dapper with InterpolatedSql in a smart way that allows you to take advantage of all the mediator middleware. This further allows you to make the middleware act as a SQL interceptor as well.
BREAKINGFeature
Commands replace Requests and also have their own pipeline
Feature
Command Scheduling with basic in-memory scheduler
Feature
Ability to send headers to a mediator command/request/stream that is added to the context
Enhancement
ReplayStreamMiddleware now sets values on the context as it passes each layer
BREAKINGEnhancement
AddShinyMediator now has a flag to allow you to remove all of the default middleware (defaults to true)
Enhancement
Timeout support for HTTP handler
Enhancement
Full logging in HTTP handler to debug your requests
Enhancement
Replay middleware will not try to return handler result when timeout detection (removes downstream crash)
Enhancement
Caching setup is now in the base Shiny.Mediator allowing for easier caching extension
Enhancement
Shiny.Mediator.AppSupport has a ‘Persistent Cache’ that survives app restarts - Works great for offline scenarios too
Enhancement
Replay will now optional grab cache if available first and ONLY then will it fall back to online
Enhancement
ASP.NET extensions now include MapMediatorPost extension methods of the IEndpointRouteBuilder to work well with minimal APIs
BREAKINGEnhancement
EventContext is passed to event handlers as well as middleware
BREAKINGEnhancement
Command and Request contexts are now available at the handlers
BREAKINGEnhancement
Stream request handlers now bring in request contexts
Fix
Offline middleware returns offline result when TimeoutException is thrown by internal middleware or handler
Chore
Shiny.Mediator.Caching is deprecated and replaced by Shiny.Mediator.Caching.MicrosoftMemoryCache
BREAKINGChore
ExecutionContext has been renamed to RequestContext
Most middleware and internal handlers now support configuration via Microsoft.Extensions.Configuration vs using attributes - HTTP, Timer Refresh, Offline, Stream Replay, Performance Logging, Caching, User Notifications
Feature
Blazor now supports offline, stream replay, and user notification middleware
Feature
ExecutionContext allows you to add metadata from middleware that can be consumed by the caller (IMediator.RequestWithContext return ExecutionResult, Send now returns ExecutionContext)
Feature
EventAggregatedExecutionContext(List of EventExecutionContext) allows you to add metadata from middleware that can be consumed by the caller - IMediator.Publish now returns this by default
Enhancement
OpenApiGenerator now allows DateOnly, TimeOnly, and Stream results
Enhancement
OpenApiGenerator offers better support for inline enums and subtypes (node based APIs)
Enhancement
Improved logging, so you can see your pipeline execution pipeline front to back
Enhancement
Request Handlers that return a result that is marked with IEvent will now publish it automatically
Enhancement
Stream Replay will now also wait for internet connectivity before pumping a new data request
Fix
OpenApiGenerator now tacks on global namespace to all object types
Fix
Registration source generator did not default the library namespace
Shiny.Mediator.AspNet - that allows you to map your request handlers directly to HTTP endpoints
BREAKINGEnhancement
Source Generator attributes have been renamed from RegisterHandler & RegisterMiddleware to SingletonHandler/ScopedHandler & SingletonMiddleware/ScopedMiddleware
Request Keys can be controlled by implementing IRequestKey on your request object allowing you to return a cache/offline/replay key based on your arg values
Enhancement
MainThread middleware can now be used on request handlers as well
Enhancement
UserExceptionRequestMiddleware is now configurable and can be appled with attribute [UserExceptionRequestMiddleware] on each request handler method
Feature
Mediator middleware that has some form of store (cache/replay/offline) now responds to a global event called Shiny.Mediator.Middleware.FlushAllStoresEvent in Shiny.Mediator that calls all stores to be flushed
Feature
Resiliency middleware (Shiny.Mediator.Resilience} based on Microsoft.Extensions.Resilience
Feature
Offline Availability Middleware separated from caching and allows you to store across app sessions as needed (part of Shiny.Mediator.Maui)
BREAKINGFeature
Caching middleware is now Shiny.Mediator.Caching and uses IMemoryCache under the hood