Refactor namespaces for SignCommand and behaviors
Updated namespaces from `Signature` to `Signatures` for consistency and clarity across the application. Simplified pipeline behavior registrations in `DependencyInjection.cs` by using shorter references. Added `Microsoft.Extensions.Configuration` to `DependencyInjection.cs` to support configuration functionality. Ensured all references to `SignCommand` and related behaviors align with the new namespace structure.
This commit is contained in:
@@ -8,6 +8,8 @@ using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using QRCoder;
|
||||
using System.Reflection;
|
||||
using MediatR;
|
||||
using EnvelopeGenerator.Application.Signatures.Commands;
|
||||
using EnvelopeGenerator.Application.Signatures.Behaviors;
|
||||
|
||||
namespace EnvelopeGenerator.Application;
|
||||
|
||||
@@ -60,16 +62,16 @@ public static class DependencyInjection
|
||||
|
||||
// Register SignCommand pipeline behaviors in execution order
|
||||
// 1. AnnotationBehavior - Saves annotations (executes first)
|
||||
cfg.AddBehavior<IPipelineBehavior<Signature.Commands.SignCommand, Unit>, Signature.Behaviors.AnnotationBehavior>();
|
||||
cfg.AddBehavior<IPipelineBehavior<SignCommand, Unit>, AnnotationBehavior>();
|
||||
|
||||
// 2. DocStatusBehavior - Creates document status (executes second)
|
||||
cfg.AddBehavior<IPipelineBehavior<Signature.Commands.SignCommand, Unit>, Signature.Behaviors.DocStatusBehavior>();
|
||||
|
||||
cfg.AddBehavior<IPipelineBehavior<SignCommand, Unit>, DocStatusBehavior>();
|
||||
|
||||
// 3. HistoryBehavior - Records history (executes third)
|
||||
cfg.AddBehavior<IPipelineBehavior<Signature.Commands.SignCommand, Unit>, Signature.Behaviors.HistoryBehavior>();
|
||||
cfg.AddBehavior<IPipelineBehavior<SignCommand, Unit>, HistoryBehavior>();
|
||||
|
||||
// 4. SendSignedMailBehavior - Sends notification email (executes LAST, only if all previous succeed)
|
||||
cfg.AddBehavior<IPipelineBehavior<Signature.Commands.SignCommand, Unit>, Signature.Behaviors.SendSignedMailBehavior>();
|
||||
cfg.AddBehavior<IPipelineBehavior<SignCommand, Unit>, SendSignedMailBehavior>();
|
||||
});
|
||||
|
||||
return services;
|
||||
|
||||
Reference in New Issue
Block a user