Class SecuritiesGenericField
- Namespace
- Subsembly.Swift.SecuritiesMarkets
- Assembly
- Subsembly.Sepa.dll
Base class for all generic SWIFT field implementations.
public abstract class SecuritiesGenericField : SecuritiesField, ISecuritiesSequence
- Inheritance
-
SecuritiesGenericField
- Implements
- Derived
- Inherited Members
Properties
DataSourceScheme
public string DataSourceScheme { get; set; }
Property Value
IsEmpty
Must be overridden to indicate whether the field has not been initialized. An empty field would not be generated when generating the SWIFT message.
public override abstract bool IsEmpty { get; }
Property Value
IsValid
public override sealed bool IsValid { get; }
Property Value
Qualifier
public string Qualifier { get; set; }
Property Value
QualifierProvision
public string QualifierProvision { get; }
Property Value
Tag
public string Tag { get; set; }
Property Value
TagProvision
public string TagProvision { get; }
Property Value
Methods
Clear()
public override void Clear()
GenerateField()
Generate a SwiftField based on the content of this instance.
public override SwiftField GenerateField()
Returns
Remarks
If the value of this Tag property is null
, and there is no
TagProvision without wildcard, then the derived class must provide
a field tag through OnChooseFieldTag().
Exceptions
MatchField(SwiftField)
Checks whether a SwiftField matches the provisions of this SecuritiesGenericField.
public override bool MatchField(SwiftField aField)
Parameters
aField
SwiftFieldThe field to match. Must not be
null
.
Returns
- bool
If the given field matches TagProvision and QualifierProvision, then
true
is returned. If not, thenfalse
is returned.
OnChooseFieldTag()
May be overridden to provide a field tag based on the current field data.
protected virtual string OnChooseFieldTag()
Returns
Remarks
The default implementation always returns null
.
OnClear()
Must be overridden to clear out all field content data.
protected abstract void OnClear()
OnGenerateFieldContent(string, string)
Must be overridden to create the field content based on the given parameters and the current field data.
protected abstract string OnGenerateFieldContent(string sTag, string sQualifier)
Parameters
sTag
stringThe tag of the field that shall be generated. This is never
null
.sQualifier
stringThe qualifier of the field that shall be generated. This is never
null
.
Returns
- string
The content for SwiftField.Content.
OnParseFieldContent(SwiftField)
protected abstract void OnParseFieldContent(SwiftField aField)
Parameters
aField
SwiftField
OnValidate()
Must be overridden to validae the current field and return information about problems indicate whether the field is correctly initialized an the field content can be generated.
protected abstract string OnValidate()
Returns
- string
If the field is valid, then
null
shall be returned. Otherwise a human readable error description shall be returned.
ProcessField(SwiftField)
public override void ProcessField(SwiftField aField)
Parameters
aField
SwiftField
ToString()
public override string ToString()