Class FinTransmogrifier
The FinTransmogrifier transmogrifies FinTS segments to and from an arbitrary XML representation.
Inheritance
Inherited Members
Namespace: Subsembly.FinTS
Assembly: Subsembly.FinTS.Core.dll
Syntax
public class FinTransmogrifier
Remarks
The FinTransmogrifier implementation is multi-thread safe. That means, that a single FinTransmogrifier instance can transmogrify any number of segments simuiltaneously on multiple threads.
See the FinTS Subsembly Technical Documentation for a detailed explanation of the mode of operation of the FinTransmogrifier class.
Constructors
FinTransmogrifier(String)
Creates a FinTransmogrifier instance for a specific type of segments.
Declaration
public FinTransmogrifier(string sSyntax)
Parameters
Type | Name | Description |
---|---|---|
System.String | sSyntax | Syntax description that defines the XML format and its corresponding segment. Must not be null. Refer to the FinTS Subsembly Technical Documentation for a detailed description of the expected syntax description XML. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The sSyntax parameter was |
FinTransmogrifierException | The provided syntax description XML was not according to the requirements. The exception code will be BadSyntax. |
FinTransmogrifier(XmlElement)
Creates a FinTransmogrifier instance for a specific type of segments.
Declaration
public FinTransmogrifier(XmlElement xmlSyntax)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | xmlSyntax | Syntax description that defines the XML format and its corresponding segment. Must not be null. Refer to the FinTS Subsembly Technical Documentation for a detailed description of the expected syntax description XML. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The xmlSyntax parameter was |
FinTransmogrifierException | The provided syntax description XML was not according to the requirements. The exception code will be BadSyntax. |
Properties
ChallengeClass
The Smart-TAN challenge class for the order type handled by this FinTransmogrifier instance.
Declaration
public int ChallengeClass { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The default for this value is 90. It can be set through the attribute "c" on the root element of the segment syntax description.
ChallengeParameter
The Smart-TAN challenge parameter that was extracted by the last Transmogrify(XmlElement) operation.
Declaration
public string ChallengeParameter { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
The default for this value is null
. The challenge parameter can be selected
in the syntax through the attribute "p=1" on the de-element.
SegmentTag
The XML tag of the segment type handled by this FinTransmogrifier instance.
Declaration
public string SegmentTag { get; }
Property Value
Type | Description |
---|---|
System.String |
SegmentType
The segment type handled by this FinTransmogrifier instance.
Declaration
public string SegmentType { get; }
Property Value
Type | Description |
---|---|
System.String |
SegmentVersion
The segment version handled by this FinTransmogrifier instance.
Declaration
public int SegmentVersion { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Syntax
The syntax description that was passed to the constructor.
Declaration
public XmlElement Syntax { get; }
Property Value
Type | Description |
---|---|
System.Xml.XmlElement |
VisualizationClass
The visualization class required by HKTAN version 5.
Declaration
public int VisualizationClass { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The default for this value is 0. It can be set through the attribute "z" on the root element of the segment syntax description.
Methods
Transmogrify(FinSegment)
Transmogrify a FinSegment instance into XML data.
Declaration
public XmlDocument Transmogrify(FinSegment aSegment)
Parameters
Type | Name | Description |
---|---|---|
FinSegment | aSegment | A segment according to the syntax defined for this FinTransmogrifier instance. |
Returns
Type | Description |
---|---|
System.Xml.XmlDocument | The transmogrified XML data is returned as a new XmlDocument instance. |
Remarks
See the FinTS Subsembly Technical Documentation for a detailed explanation of the mode of operation of this method.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aSegment was null. |
FinTransmogrifierException | Transmogrifier failed. |
Transmogrify(FinSegment, XmlNode)
Transmogrify a FinSegment instance into XML data below a given parent node.
Declaration
public void Transmogrify(FinSegment aSegment, XmlNode xmlParentNode)
Parameters
Type | Name | Description |
---|---|---|
FinSegment | aSegment | A segment according to the syntax defined for this FinTransmogrifier instance. |
System.Xml.XmlNode | xmlParentNode | Parent node that shall receive the transmogrified segment data nodes. |
Remarks
See the FinTS Subsembly Technical Documentation for a detailed explanation of the mode of operation of this method.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aSegment or xmlParentNode was null. |
FinTransmogrifierException | Transmogrifier failed. |
Transmogrify(XmlElement)
Transmogrify XML data into a new FinSegment instance according to the syntax defined for this FinTransmogrifier instance.
Declaration
public FinSegment Transmogrify(XmlElement xmlOrder)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | xmlOrder | An XML element that is structured according to the segment syntax of this FinTransmogrifier instance. |
Returns
Type | Description |
---|---|
FinSegment | A new FinSegment instance completely filled with the data from the given XML element. The segment header contains no segment number so far. |
Remarks
See the FinTS Subsembly Technical Documentation for a detailed explanation of the mode of operation of this method.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter xmlOrder was null. |
FinTransmogrifierException | Transmogrifier failed. |