Class SwiftBlock
Represents a single SWIFT Message Block that is part of a SwiftMessage.
public class SwiftBlock
- Inheritance
-
SwiftBlock
- Inherited Members
Constructors
SwiftBlock()
public SwiftBlock()
SwiftBlock(string, string)
public SwiftBlock(string sTag, string sValue)
Parameters
Exceptions
- ArgumentException
The parameter sTag was not
null
and also not a pure alpha numeric string.
Properties
Tag
The tag of this SWIFT Message Block.
public string Tag { get; set; }
Property Value
- string
This should be one numeric character. However, any string consisting of digits and upper case alphanumeric characters can be used as a Tag.
Exceptions
- ArgumentException
An attempt was made to set a value that is not
null
and also not a pure alpha numeric string.
Value
The value of this SWIFT Message Block.
public string Value { get; set; }
Property Value
Methods
Read(Stream, int)
Reads a single SWIFT Message Block from an input stream.
public int Read(Stream aInputStream, int nMaxBytes)
Parameters
aInputStream
StreamThe Stream to read the data from.
nMaxBytes
intThe 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 simply clear this instance.
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.
- SwiftException
The input data was not a valid SWIFT Block structure.
ToString()
public override string ToString()