Class FinPersist
Abstract base class that provides common methods for all persistent objects in the
FinTS Subsembly.
Inheritance
System.Object
FinPersist
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Subsembly.FinTS.Core.dll
Syntax
public abstract class FinPersist
Constructors
FinPersist()
Declaration
FinPersist(String)
Declaration
protected FinPersist(string sXmlRootTag)
Parameters
Type |
Name |
Description |
System.String |
sXmlRootTag |
The default root tag that is used when persisting this object in XML format.
|
Properties
RootTag
The XML root tag of this object that was given to the contructor.
Declaration
public string RootTag { get; }
Property Value
Type |
Description |
System.String |
|
Methods
Load(String)
Loads object state from given file.
Declaration
public void Load(string sFilename)
Parameters
Type |
Name |
Description |
System.String |
sFilename |
Complete filename including path. Must not be null or an empty string.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The given parameter sFilename was null .
|
System.ArgumentOutOfRangeException |
The given parameter sFilename was an empty string.
|
LoadXml(String)
Loads object state from given XML string.
Declaration
public void LoadXml(string sXml)
Parameters
Type |
Name |
Description |
System.String |
sXml |
XML string that contains the object state to be loaded.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The given parameter sXml was null .
|
Read(Stream)
Reads object state from the given stream.
Declaration
public void Read(Stream aStream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
aStream |
Stream to read object state from. Must not be null and must be
readable.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The given parameter aStream was null .
|
System.NotSupportedException |
The given stream does not support reading.
|
ReadXml(XmlReader)
Callback that is ultimately invoked in order to read the XML representation of
this object.
Declaration
public abstract void ReadXml(XmlReader aXmlReader)
Parameters
Type |
Name |
Description |
System.Xml.XmlReader |
aXmlReader |
|
ReadXmlDocument(XmlReader)
Declaration
public string ReadXmlDocument(XmlReader aXmlReader)
Parameters
Type |
Name |
Description |
System.Xml.XmlReader |
aXmlReader |
|
Returns
Type |
Description |
System.String |
|
ReadXmlElement(XmlReader, String)
Declaration
protected string ReadXmlElement(XmlReader aXmlReader, string sTag)
Parameters
Type |
Name |
Description |
System.Xml.XmlReader |
aXmlReader |
|
System.String |
sTag |
|
Returns
Type |
Description |
System.String |
|
ReadXmlElementAcct(XmlReader, String)
Declaration
protected FinAcct ReadXmlElementAcct(XmlReader aXmlReader, string sTag)
Parameters
Type |
Name |
Description |
System.Xml.XmlReader |
aXmlReader |
|
System.String |
sTag |
|
Returns
ReadXmlElementBool(XmlReader, String)
Declaration
protected bool ReadXmlElementBool(XmlReader aXmlReader, string sTag)
Parameters
Type |
Name |
Description |
System.Xml.XmlReader |
aXmlReader |
|
System.String |
sTag |
|
Returns
Type |
Description |
System.Boolean |
|
ReadXmlElementDate(XmlReader, String)
Declaration
protected SwiftDate ReadXmlElementDate(XmlReader aXmlReader, string sTag)
Parameters
Type |
Name |
Description |
System.Xml.XmlReader |
aXmlReader |
|
System.String |
sTag |
|
Returns
ReadXmlElementInt(XmlReader, String)
Reads the element and tries to parse it as an integer value. If the element
does not exist, then zero is returned.
Declaration
protected int ReadXmlElementInt(XmlReader aXmlReader, string sTag)
Parameters
Type |
Name |
Description |
System.Xml.XmlReader |
aXmlReader |
|
System.String |
sTag |
|
Returns
Type |
Description |
System.Int32 |
|
ReadXmlElementSegment(XmlReader, String)
Declaration
protected FinSegment ReadXmlElementSegment(XmlReader aXmlReader, string sTag)
Parameters
Type |
Name |
Description |
System.Xml.XmlReader |
aXmlReader |
|
System.String |
sTag |
|
Returns
SaveAs(String)
Saves object state to the given file.
Declaration
public void SaveAs(string sFilename)
Parameters
Type |
Name |
Description |
System.String |
sFilename |
Complete filename including path. Must not be null or an empty string.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The given parameter sFilename was null .
|
System.ArgumentOutOfRangeException |
The given parameter sFilename was an empty string.
|
SaveXml()
Creates a XML string with the current object state.
Declaration
Returns
Type |
Description |
System.String |
XML string with the object state.
|
SaveXml(String)
Creates a XML string with the current object state.
Declaration
public string SaveXml(string sRootTag)
Parameters
Type |
Name |
Description |
System.String |
sRootTag |
Root tag to be used in the resulting XML string.
|
Returns
Type |
Description |
System.String |
XML string with the object state.
|
ToXml(String)
Converts this object into an XML document.
Declaration
public XmlDocument ToXml(string sRootTag)
Parameters
Type |
Name |
Description |
System.String |
sRootTag |
Root tag to be used in the resulting XML document.
|
Returns
Type |
Description |
System.Xml.XmlDocument |
New instance of XmlDocument.
|
Write(Stream)
Writes object state to the given stream.
Declaration
public void Write(Stream aStream)
Parameters
Type |
Name |
Description |
System.IO.Stream |
aStream |
Stream to write the object state to. Must not be null and must be
writable. This method does not close the stream after the object state was written
to it. It is up to the caller to ultimately close the stream.
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
The given parameter aStream was null .
|
System.NotSupportedException |
The given stream does not support writing.
|
WriteXml(XmlWriter)
Callback that is ultimately invoked in order to write the XML representation of
this object.
Declaration
public abstract void WriteXml(XmlWriter aXmlWriter)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
aXmlWriter |
|
WriteXmlDocument(XmlWriter)
Declaration
public void WriteXmlDocument(XmlWriter aXmlWriter)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
aXmlWriter |
|
WriteXmlDocument(XmlWriter, String)
Declaration
public void WriteXmlDocument(XmlWriter aXmlWriter, string sRootTag)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
aXmlWriter |
|
System.String |
sRootTag |
|
WriteXmlElement(XmlWriter, String, String)
Declaration
protected void WriteXmlElement(XmlWriter aXmlWriter, string sTag, string sValue)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
aXmlWriter |
|
System.String |
sTag |
|
System.String |
sValue |
|
WriteXmlElementAcct(XmlWriter, String, FinAcct)
Declaration
protected void WriteXmlElementAcct(XmlWriter aXmlWriter, string sTag, FinAcct aAcct)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
aXmlWriter |
|
System.String |
sTag |
|
FinAcct |
aAcct |
|
WriteXmlElementBool(XmlWriter, String, Boolean)
Declaration
protected void WriteXmlElementBool(XmlWriter aXmlWriter, string sTag, bool fValue)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
aXmlWriter |
|
System.String |
sTag |
|
System.Boolean |
fValue |
|
WriteXmlElementDate(XmlWriter, String, SwiftDate)
Declaration
protected void WriteXmlElementDate(XmlWriter aXmlWriter, string sTag, SwiftDate tDate)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
aXmlWriter |
|
System.String |
sTag |
|
SwiftDate |
tDate |
|
WriteXmlElementInt(XmlWriter, String, Int32)
Writes the given integer value, if it is non-zero.
Declaration
protected void WriteXmlElementInt(XmlWriter aXmlWriter, string sTag, int nValue)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
aXmlWriter |
|
System.String |
sTag |
|
System.Int32 |
nValue |
|
WriteXmlElementSegment(XmlWriter, String, FinSegment)
Writes the segment as a base 64 encoded string.
Declaration
protected void WriteXmlElementSegment(XmlWriter aXmlWriter, string sTag, FinSegment aSegment)
Parameters
Type |
Name |
Description |
System.Xml.XmlWriter |
aXmlWriter |
|
System.String |
sTag |
|
FinSegment |
aSegment |
|