Class SwiftFieldSequence
A ISO 15022 conforming sequence of SWIFT fields is itself a SwiftField.
Implements
Inherited Members
Namespace: Subsembly.Swift
Assembly: Subsembly.Sepa.dll
Syntax
public class SwiftFieldSequence : SwiftField, IEnumerable
Remarks
When parsing ISO 15022 conforming SWIFT messages with the SwiftGenericISO15022 class. All field sequences beginning with a :16R: StartOfBlock field up to the matching :16S: EndOfBlock are collected into a SwiftFieldSequence instance. The SwiftFieldSequence instance is itself a SwiftField with the pseudo-type Sequence.
TODO: Currently only the BlockName is supported. The optional Number of Occurence and Total Number of Occurences is ignored.
Constructors
SwiftFieldSequence()
The default constructor must only be used for a root sequence.
Declaration
public SwiftFieldSequence()
SwiftFieldSequence(SwiftField)
Declaration
public SwiftFieldSequence(SwiftField aField)
Parameters
Type | Name | Description |
---|---|---|
SwiftField | aField | A SwiftField of type StartOfBlock. A copy of this field will be made when constructing this SwiftFieldSequence. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aField was |
System.ArgumentException | The given SwiftField did not have the field type StartOfBlock. |
SwiftFieldSequence(String)
Declaration
public SwiftFieldSequence(string sBlockName)
Parameters
Type | Name | Description |
---|---|---|
System.String | sBlockName | The Block Name of the sequence as found in the :16R: Start of Block subfield. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sBlockName was |
Properties
BlockName
Declaration
public string BlockName { get; }
Property Value
Type | Description |
---|---|
System.String |
Count
The number of SwiftFields in this sequence.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
Direct access to the SwiftFields by index.
Declaration
public SwiftField this[int nIndex] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nIndex | The position of the SwiftField to return. |
Property Value
Type | Description |
---|---|
SwiftField | The SwiftField at the requested position. If the given index was beyond the end
of the sequence, then |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The parameter nIndex was negative. |
Methods
Add(SwiftField)
Add another field at the end of this sequence.
Declaration
public void Add(SwiftField aField)
Parameters
Type | Name | Description |
---|---|---|
SwiftField | aField |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aField was |
Clear()
Remove all elements from this sequence.
Declaration
public void Clear()
GetEnumerator()
Declaration
public IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Read(SwiftReader)
Declaration
public bool Read(SwiftReader aSwiftReader)
Parameters
Type | Name | Description |
---|---|---|
SwiftReader | aSwiftReader |
Returns
Type | Description |
---|---|
System.Boolean |
Write(SwiftWriter)
Declaration
public void Write(SwiftWriter aSwiftWriter)
Parameters
Type | Name | Description |
---|---|---|
SwiftWriter | aSwiftWriter |