Class SwiftBlockSequence
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
sTagstringThe 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
nullis 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
aBlockSwiftBlockThe 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
Read(Stream, int)
Reads a sequence of SWIFT Message Blocks from a Stream.
public int Read(Stream aInputStream, int nMaxBytes)
Parameters
aInputStreamStreamThe Stream to read the data from.
nMaxBytesintThe 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.