Add PreprocessingBehavior for InvokeRecActionViewCommand

Register PreprocessingBehavior in the MediatR pipeline specifically for InvokeRecActionViewCommand. Update using directives to reflect the shift from Procedures to Commands and from Common.Behaviors to Common.Behaviors.Action.
This commit is contained in:
2026-03-24 14:15:01 +01:00
parent 9410c5dc0d
commit 2883cf9be4

View File

@@ -2,11 +2,11 @@
using MediatR;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using ReC.Application.Common.Behaviors;
using ReC.Application.Common.Behaviors.Action;
using ReC.Application.Common.Constants;
using ReC.Application.Common.Options;
using ReC.Application.Common.Procedures;
using ReC.Application.RecActions.Commands;
using System.Reflection;
namespace ReC.Application;
@@ -35,6 +35,7 @@ public static class DependencyInjection
cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly());
cfg.AddOpenBehaviors([typeof(BodyQueryBehavior<,>), typeof(HeaderQueryBehavior<,>)]);
cfg.AddBehavior(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>));
cfg.AddBehavior(typeof(IPipelineBehavior<InvokeRecActionViewCommand, bool>), typeof(PreprocessingBehavior));
cfg.LicenseKey = configOpt.LuckyPennySoftwareLicenseKey;
});