Yana Flaryanovich
Yana Flaryanovich
HeaderValidated = args => { var cashedHeaderNames = args.Context.NamedIndexCache.Values.Select(x => x.Item1); var headerNames = args.Context.NamedIndexes.Keys; var areHeadersEqual = headerNames.SequenceEqual(cashedHeaderNames); };
```cs HeaderValidated = args => { var cashedHeaderNames = args.Context.NamedIndexCache.Values.Select(x => x.Item1); var headerNames = args.Context.NamedIndexes.Keys; var areHeadersEqual = headerNames.SequenceEqual(cashedHeaderNames); if (!areHeadersEqual) { throw new CsvManagerException("File header has wrong column...
@JoshClose If I am not mistaken, it just checks ordering in single file.  Let me check it properly.
@JoshClose I used this for validation for checking csv header column order during importing csv file to sure that nothing was missed or swapped. Do I have such abilities in...
@JoshClose It is any function allow us to get collection of headers in the specified order (as defined in model) and compare it with the used csv file or this...
@JoshClose I need not only validation of missed or incorrect header, but and the right specified order.
var csvConfig = new CsvConfig { ValidateHeaderColumnOrder = true }; // in CsvConfig public bool ValidateHeaderColumnOrder { get => _validateHeaderColumnOrder; set { _validateHeaderColumnOrder = value; if (value) { AddHeaderColumnOrderValidation(); }...
I have custom attributes which contains property for order. During class map creation I use this attribute using reflection. I use DefaultClassMap and specify MemberMap with ordering index.  If...