Class SwiftBlockSequence
A sequence of SwiftBlock instances.
Inheritance
Implements
Inherited Members
Namespace: Subsembly.Swift
Assembly: Subsembly.Sepa.dll
Syntax
public class SwiftBlockSequence : IEnumerable
Properties
Item[String]
Returns the first SwiftBlock for a given Tag.
Declaration
public SwiftBlock this[string sTag] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | sTag | The SWIFT Message Block tag to search. |
Property Value
Type | Description |
---|---|
SwiftBlock | If a SwiftBlock with the requested Tag is found, then it is returned.
If none is found, then |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sTag was |
Methods
Add(SwiftBlock)
Add another SwiftBlock at the end of this sequence.
Declaration
public int Add(SwiftBlock aBlock)
Parameters
Type | Name | Description |
---|---|---|
SwiftBlock | aBlock | The SwiftBlock to add. |
Returns
Type | Description |
---|---|
System.Int32 | The index where the block was added to the sequence. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aBlock was |
Clear()
Remove all SWIFT Message Blocks from this sequence.
Declaration
public void Clear()
GetEnumerator()
Declaration
public IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Read(Stream, Int32)
Reads a sequence of SWIFT Message Blocks from a Stream.
Declaration
public int Read(Stream aInputStream, int nMaxBytes)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | aInputStream | The Stream to read the data from. |
System.Int32 | nMaxBytes | 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
Type | Description |
---|---|
System.Int32 | 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
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aInputStream was |
System.ArgumentOutOfRangeException | The parameter nMaxBytes was negative. |