Class SwiftBlockSequence

Namespace
Subsembly.Swift
Assembly
Subsembly.Sepa.dll

A sequence of SwiftBlock instances.

public class SwiftBlockSequence : IEnumerable
Inheritance
SwiftBlockSequence
Implements
Inherited Members

Properties

this[string]

Returns the first SwiftBlock for a given Tag.

public SwiftBlock this[string sTag] { get; }

Parameters

sTag string

The SWIFT Message Block tag to search.

Property Value

SwiftBlock

If a SwiftBlock with the requested Tag is found, then it is returned. If none is found, then null is returned.

Exceptions

ArgumentNullException

The parameter sTag was null.

Methods

Add(SwiftBlock)

Add another SwiftBlock at the end of this sequence.

public int Add(SwiftBlock aBlock)

Parameters

aBlock SwiftBlock

The SwiftBlock to add.

Returns

int

The index where the block was added to the sequence.

Exceptions

ArgumentNullException

The parameter aBlock was null.

Clear()

Remove all SWIFT Message Blocks from this sequence.

public void Clear()

GetEnumerator()

public IEnumerator GetEnumerator()

Returns

IEnumerator

Read(Stream, int)

Reads a sequence of SWIFT Message Blocks from a Stream.

public int Read(Stream aInputStream, int nMaxBytes)

Parameters

aInputStream Stream

The Stream to read the data from.

nMaxBytes int

The maximum number of bytes to read from the stream. Use Int32.MaxValue if you do not want to impose any limit. If this is zero, then this method will actually do nothing.

Returns

int

Returns the actual number of bytes that have been consumed from the input stream. If the input stream was already at the EOF position when this method was called, then zero is returned. If the parameter nMaxBytes was zero, then this method immediately returns zero, too.

Exceptions

ArgumentNullException

The parameter aInputStream was null.

ArgumentOutOfRangeException

The parameter nMaxBytes was negative.