Class ScraperCsvConverter
Inheritance
System.Object
ScraperCsvConverter
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()
Assembly: Subsembly.Scraper.dll
Syntax
public abstract class ScraperCsvConverter : IScraperCsvConverter
Constructors
ScraperCsvConverter(String, String, Encoding)
Declaration
protected ScraperCsvConverter(string sName, string sFileNameSuffix, Encoding aEncoding = null)
Parameters
Type |
Name |
Description |
System.String |
sName |
|
System.String |
sFileNameSuffix |
|
System.Text.Encoding |
aEncoding |
|
Properties
FileNameSuffix
Declaration
public string FileNameSuffix { get; }
Property Value
Type |
Description |
System.String |
|
Name
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
Methods
Convert(out SepaStatement, Byte[], Int32, Int32)
Converts a raw, binary CSV data blob that contains account statement data to a CAMT
statement for further processing.
Declaration
public ScraperResult Convert(out SepaStatement aStmt, byte[] vbCsvData, int nOffset, int nLength)
Parameters
Type |
Name |
Description |
SepaStatement |
aStmt |
|
System.Byte[] |
vbCsvData |
|
System.Int32 |
nOffset |
|
System.Int32 |
nLength |
|
Returns
CreateCsv()
Creates a Subsembly.Csv.CsvFile instance, suitable for parsing the CSV format.
Declaration
protected virtual CsvFile CreateCsv()
Returns
Type |
Description |
Subsembly.Csv.CsvFile |
|
DetectEncoding(Byte[], Int32, Int32)
Tries to detect the correct encoding from the given binary CSV data.
Declaration
protected virtual Encoding DetectEncoding(byte[] vbCsvData, int nOffset, int nLength)
Parameters
Type |
Name |
Description |
System.Byte[] |
vbCsvData |
|
System.Int32 |
nOffset |
|
System.Int32 |
nLength |
|
Returns
Type |
Description |
System.Text.Encoding |
|
GetEncoding(Byte[])
Declaration
public Encoding GetEncoding(byte[] vbCsvData)
Parameters
Type |
Name |
Description |
System.Byte[] |
vbCsvData |
|
Returns
Type |
Description |
System.Text.Encoding |
|
GetEncoding(Byte[], Int32, Int32)
Declaration
public Encoding GetEncoding(byte[] vbCsvData, int nOffset, int nLength)
Parameters
Type |
Name |
Description |
System.Byte[] |
vbCsvData |
|
System.Int32 |
nOffset |
|
System.Int32 |
nLength |
|
Returns
Type |
Description |
System.Text.Encoding |
|
ReadCsvFinish(SepaStatement)
Finalize reading of the CSV file.
Declaration
protected virtual ScraperResult ReadCsvFinish(SepaStatement aStmt)
Parameters
Returns
Read the header part of the CSV file.
Declaration
protected virtual ScraperResult ReadCsvHeader(SepaStatement aStmt, CsvFile aCsvFile)
Parameters
Type |
Name |
Description |
SepaStatement |
aStmt |
At this time an basically empty SepaStatement. Any useful information
that can be obtained from the CSV header, such as account information or balance
values, can be stored into this.
|
Subsembly.Csv.CsvFile |
aCsvFile |
|
Returns
ReadCsvValues(SepaStatement, CsvValues)
Declaration
protected abstract ScraperResult ReadCsvValues(SepaStatement aStmt, CsvValues aCsv)
Parameters
Type |
Name |
Description |
SepaStatement |
aStmt |
|
Subsembly.Csv.CsvValues |
aCsv |
|
Returns
ResetCsv()
Override this in order to reset any instance data used for the CSV import.
Declaration
protected virtual void ResetCsv()
Implements