Class FinDtaParser
Inherited Members
Namespace: Subsembly.FinTS
Assembly: Subsembly.FinTS.Core.dll
Syntax
public class FinDtaParser : FinDtaBase
Constructors
FinDtaParser(FinByteBuffer, Int32)
Declaration
public FinDtaParser(FinByteBuffer aDtausBuffer, int nHandbookVersion = 0)
Parameters
Type | Name | Description |
---|---|---|
FinByteBuffer | aDtausBuffer | Provides the raw binary DTAUS data to be processed by this FinDtaParser instance.
This parameter must not be |
System.Int32 | nHandbookVersion | Obsolete and ignored. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aDtausBuffer was |
System.ArgumentOutOfRangeException | The parameter nHandbookVersion is less than zero. |
System.ArgumentException | The length of the provided data buffer was not a muplitiple of the block size of 128 bytes. |
Properties
BuildDate
The build date from field A7 from the most recent record A.
Declaration
public DateTime BuildDate { get; }
Property Value
Type | Description |
---|---|
System.DateTime | If no record A was read so far, then this property has the value DateTime.MinValue. |
OrderingCustAcct
The ordering customer account information from record A.
Declaration
public FinAcct OrderingCustAcct { get; }
Property Value
Type | Description |
---|---|
FinAcct |
Remarks
When a record A is read by ReadRecordA(), then a new FinAcct instance is created and stored in this property. The new FinAcct is initialised as follows: The AcctNo is extracted from field A9. The BankCode is extracted from field A4. The CountryCode is set to "280". The HolderName is extracted from field A6. The Currency is set to "EUR".
RecordSize
Indicates the logical record size of the next record to be read.
Declaration
public int RecordSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 | If the input is exhausted, then this will be zero. |
RecordType
Indicates the type of the next record to be read.
Declaration
public char RecordType { get; }
Property Value
Type | Description |
---|---|
System.Char | This is a NUL character if the input is exhausted. |
ReferenceNo
The reference number from field A10 from the most recent record A.
Declaration
public string ReferenceNo { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
If no record A has been read so far, then this property has the value null
.
ScheduleDate
The schedule date from field A11b from the most recent record A.
Declaration
public DateTime ScheduleDate { get; }
Property Value
Type | Description |
---|---|
System.DateTime | If no schedule date was set in the DTAUS file, or no record A was read so far, then this property has the value DateTime.MinValue. |
Type
This is the type of the currently parsed DTAUS file as extracted from field A3.
Declaration
public FinDtaBase.DtausType Type { get; }
Property Value
Type | Description |
---|---|
FinDtaBase.DtausType |
Remarks
If no record A has been read so far, then this property has the value Null.
Methods
ReadDTAUS(FinByteBuffer)
Reads a complete DTAUS file from a data buffer.
Declaration
public static FinRemitt[] ReadDTAUS(FinByteBuffer aDtaBuffer)
Parameters
Type | Name | Description |
---|---|---|
FinByteBuffer | aDtaBuffer | Binary buffer that contains the DTAUS data to be parsed. |
Returns
Type | Description |
---|---|
FinRemitt[] | All C records that are read from the DTAUS data buffer are converted into
FinRemitt instances. After the complete buffer has been parsed, an
array of FinRemitt instances is returned. The returned array may be empty if the
file did not contain any C records or even was completely empty. The return value
is never |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aDtaBuffer was |
ReadDTAUS(String)
Reads a complete DTAUS file.
Declaration
public static FinRemitt[] ReadDTAUS(string sFileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | sFileName | File name of DTAUS file to be read. This file may even consist of multiple logical files. |
Returns
Type | Description |
---|---|
FinRemitt[] | All C records that are read from the DTAUS file are converted into
FinRemitt instances. After the complete file has been read an array
of FinRemitt instances is returned. The returned array may be empty if the file
did not contain any C records or even was completely empty. The return value is
never |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sFileName was |
System.ArgumentException | The parameter sFileName was an empty string. |
ReadDTAZV(FinByteBuffer)
Reads a complete DTAZV file from a data buffer.
Declaration
public static FinIntRemitt[] ReadDTAZV(FinByteBuffer aDtaBuffer)
Parameters
Type | Name | Description |
---|---|---|
FinByteBuffer | aDtaBuffer | Binary buffer that contains the DTAZV data to be parsed. |
Returns
Type | Description |
---|---|
FinIntRemitt[] | All T records that are read from the DTAZV data buffer are converted into
FinIntRemitt instances. After the complete buffer has been parsed, an
array of FinIntRemitt instances is returned. The returned array may be empty if the
file did not contain any T records or even was completely empty. The return value
is never |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aDtaBuffer was |
ReadDTAZV(String)
Reads a complete DTAZV file.
Declaration
public static FinIntRemitt[] ReadDTAZV(string sFileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | sFileName | File name of DTAZV file to be read. This file may even consist of multiple logical files. |
Returns
Type | Description |
---|---|
FinIntRemitt[] | All T records that are read from the DTAZV file are converted into
FinIntRemitt instances. After the complete file has been read an array
of FinIntRemitt instances is returned. The returned array may be empty if the file
did not contain any T records or even was completely empty. The return value is
never |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sFileName was |
System.ArgumentException | The parameter sFileName was an empty string. |
ReadRecordA()
Reads a DTAUS record A from the input data.
Declaration
public bool ReadRecordA()
Returns
Type | Description |
---|---|
System.Boolean | If the input data is already exhausted when this method is called, then
|
ReadRecordC(out String)
Reads a DTAUS record C from the input data.
Declaration
public FinRemitt ReadRecordC(out string sCustNumber)
Parameters
Type | Name | Description |
---|---|---|
System.String | sCustNumber | Through this out parameter the complete content of field C6 (all 13 digits) are returned. |
Returns
Type | Description |
---|---|
FinRemitt | The data from the C record is collected in a new FinRemitt instance
which is returned by this method. If an immediate end of data was encountered, then
|
ReadRecordE()
Declaration
public bool ReadRecordE()
Returns
Type | Description |
---|---|
System.Boolean |
ReadRecordQ()
Declaration
public bool ReadRecordQ()
Returns
Type | Description |
---|---|
System.Boolean | If the input data is already exhausted when this method is called, then
|
Exceptions
Type | Condition |
---|---|
FinDtaException | The input data doesn't start with a DTAZV record Q header. |
ReadRecordT(out Int64)
Reads a DTAZV record T from the input data.
Declaration
public FinIntRemitt ReadRecordT(out long nRecordCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | nRecordCount | If the return value differs from |
Returns
Type | Description |
---|---|
FinIntRemitt | The data from the T record is collected in a new FinIntRemitt instance
which is returned by this method. If an immediate end of data was encountered, then
|
Exceptions
Type | Condition |
---|---|
FinDtaException | The input data doesn't start with a DTAZV record T header. |
ReadRecordV()
Just reads (and skips) a complete DTAZV record V.
Declaration
public bool ReadRecordV()
Returns
Type | Description |
---|---|
System.Boolean | If the input data is already exhausted when this method is called, then
|
Exceptions
Type | Condition |
---|---|
FinDtaException | The input data doesn't start with a DTAZV record V header. |
ReadRecordW()
Just reads (and skips) a complete DTAZV record W.
Declaration
public bool ReadRecordW()
Returns
Type | Description |
---|---|
System.Boolean | If the input data is already exhausted when this method is called, then
|
Exceptions
Type | Condition |
---|---|
FinDtaException | The input data doesn't start with a DTAZV record W header. |
ReadRecordZ()
Reads a complete Z record and validates total amount/total count.
Declaration
public bool ReadRecordZ()
Returns
Type | Description |
---|---|
System.Boolean | If the input data is already exhausted when this method is called, then
|
Exceptions
Type | Condition |
---|---|
FinDtaException | The input data doesn't start with a DTAZV record Z header. The calculated total amount (over all T records) differs from the total amount from the Z record (checksum error). The number of read T records differs from the total count field in this Z record (checksum error). |
Reset()
Resets the properties and the check sums, but not the input offset.
Declaration
public void Reset()