Class SwiftFieldSequence

Namespace
Subsembly.Swift
Assembly
Subsembly.Sepa.dll

A ISO 15022 conforming sequence of SWIFT fields is itself a SwiftField.

public class SwiftFieldSequence : SwiftField, IEnumerable
Inheritance
SwiftFieldSequence
Implements
Inherited Members

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.

public SwiftFieldSequence()

SwiftFieldSequence(SwiftField)

public SwiftFieldSequence(SwiftField aField)

Parameters

aField SwiftField

A SwiftField of type StartOfBlock. A copy of this field will be made when constructing this SwiftFieldSequence.

Exceptions

ArgumentNullException

The parameter aField was null.

ArgumentException

The given SwiftField did not have the field type StartOfBlock.

SwiftFieldSequence(string)

public SwiftFieldSequence(string sBlockName)

Parameters

sBlockName string

The Block Name of the sequence as found in the :16R: Start of Block subfield.

Exceptions

ArgumentNullException

The parameter sBlockName was null.

Properties

BlockName

public string BlockName { get; }

Property Value

string

Count

The number of SwiftFields in this sequence.

public int Count { get; }

Property Value

int

this[int]

Direct access to the SwiftFields by index.

public SwiftField this[int nIndex] { get; }

Parameters

nIndex int

The position of the SwiftField to return.

Property Value

SwiftField

The SwiftField at the requested position. If the given index was beyond the end of the sequence, then null is returned.

Exceptions

ArgumentOutOfRangeException

The parameter nIndex was negative.

Methods

Add(SwiftField)

Add another field at the end of this sequence.

public void Add(SwiftField aField)

Parameters

aField SwiftField

Exceptions

ArgumentNullException

The parameter aField was null.

Clear()

Remove all elements from this sequence.

public void Clear()

GetEnumerator()

public IEnumerator GetEnumerator()

Returns

IEnumerator

Read(SwiftReader)

public bool Read(SwiftReader aSwiftReader)

Parameters

aSwiftReader SwiftReader

Returns

bool

Write(SwiftWriter)

public void Write(SwiftWriter aSwiftWriter)

Parameters

aSwiftWriter SwiftWriter