Class SwiftStatementReader
The SwiftStatementReader reads one or more MT-940 or MT-942 SWIFT messages from a SwiftReader source.
public class SwiftStatementReader
- Inheritance
-
SwiftStatementReader
- Inherited Members
Constructors
SwiftStatementReader(SwiftReader, int)
Creates a SwiftStatementReader that will read SWIFT fields from the given SwiftReader.
public SwiftStatementReader(SwiftReader aSwiftReader, int nMT)
Parameters
aSwiftReaderSwiftReaderSwiftReader that provides the input data as a stream of SWIFT fields. This input will be processed as a MT-940 or MT-942 SWIFT message.
nMTintThis parameter selects whether the input will be processed as a MT-940 or MT-942 SWIFT message. The value 940 selects MT-940 processing, the value 942 selects MT-942 processing. The special value zero can be used for a most flexible processing of any kind of SWIFT statement. The value 999 can be used to process either MT-940 or MT-942. Other values are not allowed.
Exceptions
- ArgumentNullException
The parameter aSwiftReader was
null.- ArgumentOutOfRangeException
The given message type parameter nMT was neither of 940, 942, 999, or 0.
Properties
Field
The most recently read SWIFT field.
public SwiftField Field { get; }
Property Value
MT
The SWIFT message type.
public int MT { get; }
Property Value
Remarks
Initially this is the value passed to the ctor. If the value 999 was passed to the ctor, then this will change to 940 or 942 during reading of the data, as soon as the appropriate type was determined. If the value 0 was passed to the ctor, then this will always be 0, too.
RunningBalance
The running balance.
public SwiftBalance RunningBalance { get; }
Property Value
State
The current state of this SwiftStatementReader.
public SwiftStatementReaderState State { get; }
Property Value
StatementLine
The complete parsed statement line from the most recently read SWIFT fields 61 and 86.
public SwiftStatementLine StatementLine { get; }
Property Value
SwiftReader
The SwiftReader that was passed to the constructor.
public SwiftReader SwiftReader { get; }
Property Value
Methods
ReadField()
Reads and processes the next SWIFT field according to the current State.
public SwiftStatementReaderState ReadField()
Returns
- SwiftStatementReaderState
Returns the new State that resulted from processing the SWIFT field.
Remarks
If a Statement Line field (field 61) is encountered, then the optional subsequent Information to Account Owner field (field 86) is also read by this method. Both fields are then processed as if it were a single field, providing the combined parsed result through the StatementLine property.