* Fix `CancellationToken` usage in `BackgroundCommandSenderHostedService` Corrected the `CancellationToken` parameter to use `commandContext.CancellationToken` instead of the method's cancellation token, ensuring proper propagation and handling within the command sender. Fixes #6449 * Refactor notifications system to use `NotificationContext` across channels and middleware * Update src/common/Elsa.Mediator/Extensions/HandlerExtensions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Simplify `InvokeAsync` method call by replacing braces with brackets in argument array. * Refactor `NotificationContext` usage in mediator strategies and handler extensions Replaced direct references to `Notification` and `CancellationToken` with `NotificationContext` across mediator strategies to align with updated context structure. Simplified handler invocations by passing `CommandContext` and `NotificationContext` where applicable. * Refactor notification extraction in publishing strategies Standardize notification retrieval by introducing `notificationContext.Notification` in `SequentialProcessingStrategy` and `ParallelProcessingStrategy` for improved clarity and consistency. * Refactor hosted services to improve worker channel management and cancellation handling Implemented better round-robin distribution and added linked cancellation token sources in `BackgroundCommandSender`, `JobRunner`, and `BackgroundEventPublisher` hosted services. Enhanced logging and comments for clarity. * Update src/common/Elsa.Mediator/HostedServices/BackgroundCommandSenderHostedService.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| Components | ||
| Contracts | ||
| MiddlewareExtensions.cs | ||
| NotificationContext.cs | ||
| NotificationMiddlewareDelegate.cs | ||
| NotificationPipeline.cs | ||
| NotificationPipelineBuilder.cs | ||
| NotificationPipelineBuilderExtensions.cs | ||