Class CsvDocument
Contains a CSV document content (without data mappings, all the content will be a string).
Inheritance
System.Object
CsvDocument
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoCheck.Core.Connectors
Assembly: AutoCheck.dll
Syntax
public class CsvDocument
Constructors
| Improve this Doc View SourceCsvDocument(String, Char, Char)
Creates a new CSV Document instance, parsing an existing CSV file.
Declaration
public CsvDocument(string file, char fieldDelimiter = ',', char textDelimiter = '"')
Parameters
Type | Name | Description |
---|---|---|
System.String | file | CSV file path. |
System.Char | fieldDelimiter | Field delimiter char. |
System.Char | textDelimiter | Text delimiter char. |
Properties
| Improve this Doc View SourceContent
All the content, grouped by columns.
Declaration
public Dictionary<string, List<string>> Content { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<System.String>> |
Count
Return the amount of lines
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Headers
Returns the header names
Declaration
public string[] Headers { get; }
Property Value
Type | Description |
---|---|
System.String[] |
Methods
| Improve this Doc View SourceGetLine(Int32)
Returns a line
Declaration
public Dictionary<string, string> GetLine(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of the line that must be retrieved (from 1 to N). |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> |
Validate()
Checks the amount of columns on each row, which must be equivalent between each other.
Declaration
public void Validate()