440c0eea 63cc 5a0c a617 79518ebebf66 - akesseler/Plexdata.CsvParser GitHub Wiki

CsvImporter(TInstance).ValidateHeader Method

This method tries to validate given headers by applying exact validation rules.

Namespace: Plexdata.CsvParser.Processors
Assembly: Plexdata.CsvParser.NET (in Plexdata.CsvParser.NET.dll) Version: 1.1.3+d5bef99aa35461ce4bafadf0bf2c2aeca18044ea

Syntax

C#

private static void ValidateHeader(
	List<string> headers,
	List<ItemDescriptor> descriptors
)

Parameters

 

headers
Type: System.Collections.Generic.List(String)
The list of header names to be validated.
descriptors
Type: System.Collections.Generic.List(ItemDescriptor)
The list of descriptors representing a single line.

Exceptions

 

Exception Condition
FormatException This exception is thrown as soon as one of the header validation rules has been violated.
ArgumentOutOfRangeException This exception might be thrown if accessing the lists fails.

Remarks

Exact validation rules means in detail that each string in given headers must exactly match its corresponding header name. Furthermore, exactly match means that each header name is compared by applying a case-sensitive name check. It also means that each header position must be the same position which is defined within given descriptors.

See Also

Reference

CsvImporter(TInstance) Class
Plexdata.CsvParser.Processors Namespace

⚠️ **GitHub.com Fallback** ⚠️