Refactor action behaviors to use Unit instead of bool
Refactored PreprocessingBehavior and PostprocessingBehavior for InvokeRecActionViewCommand to use MediatR's Unit as the response type instead of bool. Updated method signatures, return values, and DI registration accordingly to align with MediatR conventions for commands without return values.
This commit is contained in:
@@ -35,8 +35,8 @@ 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(PostprocessingBehavior));
|
||||
cfg.AddBehavior(typeof(IPipelineBehavior<InvokeRecActionViewCommand, bool>), typeof(PreprocessingBehavior));
|
||||
cfg.AddBehavior(typeof(IPipelineBehavior<InvokeRecActionViewCommand, Unit>), typeof(PostprocessingBehavior));
|
||||
cfg.AddBehavior(typeof(IPipelineBehavior<InvokeRecActionViewCommand, Unit>), typeof(PreprocessingBehavior));
|
||||
cfg.LicenseKey = configOpt.LuckyPennySoftwareLicenseKey;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user