Interface ISecuritiesSequence
- Namespace
- Subsembly.Swift.SecuritiesMarkets
- Assembly
- Subsembly.Sepa.dll
An interface for generic writing and reading of sequences of SWIFT fields and blocks.
public interface ISecuritiesSequence
Remarks
This interface is implemented by the base classes SecuritiesBlock, SecuritiesBlocks<TSecuritiesBlock>, and SecuritiesMessage.
Properties
BlockName
If this sequence represents a block, or a repetitive block, then this must provide
the name of the block. If this sequence is a message or another kind of sequence
that is not a block, then this must be null
.
string BlockName { get; }
Property Value
IsEmpty
Indicates whether all content of this field or sequence is currenty empty.
bool IsEmpty { get; }
Property Value
Remarks
This is called in order to determine whether an optional field or sequence shall be written.
IsValid
Indicates whether the current content of this field or sequence is correctly initialized and the field or sequence can be written.
bool IsValid { get; }
Property Value
Remarks
To be valid, all mandatory content must be valid, and all optional content must be either empty, or valid.
Methods
Clear()
Invoked in order to clear all content data from this field or sequence.
void Clear()
Remarks
This is called before the field or sequence is used to parse new content.
FinishBlock()
Invoked during parsing, whenever a matching EndOfBlock field is encountered.
void FinishBlock()
ProcessField(SwiftField)
Invoked during parsing in order to process a SWIFT field for this block.
void ProcessField(SwiftField aField)
Parameters
aField
SwiftFieldThe field to process. The field type is either GenericField, or NonGenericField. All other field types are already processed internally by the SecuritiesMessage class.
StartBlock(string)
Invoked during parsing of this block, whenever a nested StartOfBlock field is encountered.
ISecuritiesSequence StartBlock(string sBlockName)
Parameters
sBlockName
stringThe name of the nested block from the field 16R content. This is never
null
, or an empty string.
Returns
- ISecuritiesSequence
The ISecuritiesSequence instance that shall process the fields of the newly starting block.
Remarks
Usually overridden in order to create a new block handler for the starting block.
However, it is also common to just return this
, if the same handler
processes the nested blocks.
WriteSequence(SwiftWriter)
void WriteSequence(SwiftWriter aWriter)
Parameters
aWriter
SwiftWriter