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:
parent
0c4d145e20
commit
4f364e3eb2
14
src/ReC.Application/Common/Behaviors/BodyQueryBehavior.cs
Normal file
14
src/ReC.Application/Common/Behaviors/BodyQueryBehavior.cs
Normal 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.");
|
||||
}
|
||||
}
|
||||
14
src/ReC.Application/Common/Behaviors/HeaderQueryBehavior.cs
Normal file
14
src/ReC.Application/Common/Behaviors/HeaderQueryBehavior.cs
Normal 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.");
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
|
||||
@ -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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user