Yana Flaryanovich

Results 8 comments of 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. ![image](https://user-images.githubusercontent.com/81416643/130597620-6d28711c-8f9f-4e33-b602-aace03c3cb64.png) 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. ![image](https://user-images.githubusercontent.com/81416643/130974550-83b390a9-9f73-4957-b122-5ba5e2edfbf6.png) If...