Add BodyQueryBehavior and register in MediatR pipeline
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.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using ReC.Application.Common.Options;
|
||||
using ReC.Application.RecActions.Behaviors;
|
||||
using System.Reflection;
|
||||
|
||||
namespace ReC.Application;
|
||||
@@ -25,6 +26,7 @@ public static class DependencyInjection
|
||||
services.AddMediatR(cfg =>
|
||||
{
|
||||
cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly());
|
||||
cfg.AddOpenBehaviors([typeof(BodyQueryBehavior<>)]);
|
||||
cfg.LicenseKey = configOpt.LuckyPennySoftwareLicenseKey;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user