using GB5Shared.DTO.Ice; using GB5Shared.DTO.Framework.Login; using IceImportDAL.DTO.IceImportPipeline; namespace IceImportBLL.Validators; // DI-scanned as IEnumerable. HeaderFieldExistenceValidator/RequiredFieldValidator // always run; opt-in validators (e.g. IfscBankBranchValidator) only run when their Key is returned // by IIceMapValidationRuleDAL.GetEnabledValidatorKeysAsync for the IceMap being executed. // // Interface note: ParsedImportDataSetDTO is threaded in alongside the resolved row so // HeaderFieldExistenceValidator can check raw column presence (the resolved row's Fields are // already coerced/keyed by DestinationMemberMemberName, not raw source headers, so it has no other // way to see the original file's columns) — a deliberate, minimal refinement of the interface // shape the plan sketched, documented here rather than silently deviating. public interface IRowValidator { string Key { get; } Task> ValidateAsync( MappedEntityRowDTO row, IceMapDTO mapDefinition, ParsedImportDataSetDTO parsedData, LoginDTO login, CancellationToken ct); }