Refactor behaviors to Common namespace

Moved `BodyQueryBehavior` and `HeaderQueryBehavior` from
`ReC.Application.RecActions.Behaviors` to
`ReC.Application.Common.Behaviors` to reflect their broader
applicability. Updated `DependencyInjection.cs` to use the new
namespace. This reorganization improves code structure and
maintainability.
This commit is contained in:
tekh 2025-11-27 15:54:24 +01:00
parent 0c4d145e20
commit 4f364e3eb2
5 changed files with 29 additions and 31 deletions

View File

@ -0,0 +1,14 @@
using MediatR;
using ReC.Application.Common.Dto;
namespace ReC.Application.Common.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.");
}
}

View File

@ -0,0 +1,14 @@
using MediatR;
using ReC.Application.Common.Dto;
namespace ReC.Application.Common.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.");
}
}

View File

@ -1,7 +1,7 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using ReC.Application.Common.Behaviors;
using ReC.Application.Common.Options;
using ReC.Application.RecActions.Behaviors;
using System.Reflection;
namespace ReC.Application;

View File

@ -1,15 +0,0 @@
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.");
}
}
}

View File

@ -1,15 +0,0 @@
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.");
}
}
}