Introduced the `BodyQueryBehavior<TRecAction>` class, which implements the `IPipelineBehavior` interface to handle actions of type `RecActionDto`. The behavior is currently unimplemented and throws a `NotImplementedException`. Updated the `DependencyInjection` class to register `BodyQueryBehavior<>` as an open generic pipeline behavior in MediatR. Added necessary `using` directives in both `DependencyInjection.cs` and `BodyQueryBehavior.cs` to support the new behavior.
16 lines
531 B
C#
16 lines
531 B
C#
using MediatR;
|
|
using ReC.Application.Common.Dto;
|
|
|
|
namespace ReC.Application.RecActions.Behaviors
|
|
{
|
|
public class BodyQueryBehavior<TRecAction> : IPipelineBehavior<TRecAction, Unit>
|
|
where TRecAction : RecActionDto
|
|
{
|
|
public Task<Unit> Handle(TRecAction action, RequestHandlerDelegate<Unit> next, CancellationToken cancel)
|
|
{
|
|
// Logic to process the body query can be added here
|
|
throw new NotImplementedException("BodyQueryBehavior is not implemented yet.");
|
|
}
|
|
}
|
|
}
|