Add HeaderQueryBehavior and update DI configuration
Added `HeaderQueryBehavior<TRecAction>` to handle header query processing in the MediatR pipeline. Updated the `DependencyInjection` class to register `HeaderQueryBehavior<>` alongside `BodyQueryBehavior<>` in the MediatR configuration. The new behavior currently throws a `NotImplementedException` as its logic is pending implementation.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using MediatR;
|
||||
using ReC.Application.Common.Dto;
|
||||
|
||||
namespace ReC.Application.RecActions.Behaviors
|
||||
{
|
||||
public class HeaderQueryBehavior<TRecAction> : IPipelineBehavior<TRecAction, Unit>
|
||||
where TRecAction : RecActionDto
|
||||
{
|
||||
public Task<Unit> Handle(TRecAction action, RequestHandlerDelegate<Unit> next, CancellationToken cancel)
|
||||
{
|
||||
// Logic to process the header query can be added here
|
||||
throw new NotImplementedException("HeaderQueryBehavior is not implemented yet.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user