StructureDataXmlBridge Class

Bridge for reading and writing structure data to xml file

Definition

Namespace: DHI.Mike1D.StructureModule
Assembly: DHI.Mike1D.StructureModule (in DHI.Mike1D.StructureModule.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class StructureDataXmlBridge : GenericXmlBridge<StructureCollection>
Inheritance
Object    GenericXmlBridgeStructureCollection    StructureDataXmlBridge

Constructors

Properties

Data DataAccess component being written to/from
(Inherited from GenericXmlBridgeTDataAccess)
DataVersion Version of data being read. Only applicable when reading data.
(Inherited from GenericXmlBridgeTDataAccess)
FilePath FilePath specifying the name of the persistance storage
(Overrides GenericXmlBridgeTDataAccessFilePath)
KnownTypes List of known types used for reading/writing
(Inherited from GenericXmlBridgeTDataAccess)
StartElementMaxDepth The maximum depth in the xml hierarchy to look for StartElementTag. 0 means "only search top level". Increasing values causes to search deeper into the hierarcy.
(Inherited from GenericXmlBridgeTDataAccess)
StartElementTag Start element tag: the first content element.
(Inherited from GenericXmlBridgeTDataAccess)
Surrogate Data contract surrogate to handle if certain types are to be serialized in special ways and when deserialized object needs to be connected in a way that the serializer can not do automatically. Per default this is set to a SerializerSurrogate object.
(Inherited from GenericXmlBridgeTDataAccess)
VersionConst Major version change: Not backwards compatible, not forwards compatible Minor version change: Mostly backwards compatible, not forwards compatible Build version change: Fully backwards compatible and forwards compatible
(Inherited from GenericXmlBridgeTDataAccess)
VersionStrConst
Intended to automatically get the version as a string from VersionConst. Descendants of GenericXmlBridgeTDataAccess should only override _get if a format of the version string, which is different from {Major}.{Minor}.{Build} is wanted.
Override of _set is only maintained for backward compatibility, and should not be used by new descendants.
(Inherited from GenericXmlBridgeTDataAccess)
XmlWriterSettings Get/Set XmlWriterSettings in case xml output needs custom formatting This does not affect xml content, only formatting of the xml.
(Inherited from GenericXmlBridgeTDataAccess)

Methods

CheckDataVersionCheckDataVersion(XmlReader, IDiagnostics) must be called after GetDataVersion(XmlReader, IDiagnostics). This calling order is automatically invoked when opening the the xml by Open(XmlReader, IDiagnostics).
(Inherited from GenericXmlBridgeTDataAccess)
CreateSerializer Create serializer
(Inherited from GenericXmlBridgeTDataAccess)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetDataVersion Try to parse the version from the Version attribute on the xml's StartElementTag. Default is Version(1, 0, 0). The version is assigned to DataVersion.
GetDataVersion(XmlReader, IDiagnostics) must be called when the reader is positioned at the StartElementTag.
(Inherited from GenericXmlBridgeTDataAccess)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Open(IDiagnostics) Opens the file in FilePath and Read data from xml file into the DataAccess component.

The xml must inlude data access versioning info. Input read using this method must be written using one of the Save methods.

The FilePath must have been set to a valid xml file.


(Inherited from GenericXmlBridgeTDataAccess)
Open(Stream, IDiagnostics) Open data stored in stream

The xml must inlude data access versioning info. Input read using this method must be written using one of the Save methods.

The FilePath must still have been set to a valid folder, to get relative paths in the setup right.


(Inherited from GenericXmlBridgeTDataAccess)
Open(XmlReader, IDiagnostics) Position the reader at the StartElementTag. If the tag is not found, issue an error
(Inherited from GenericXmlBridgeTDataAccess)
OpenAndRead
(Inherited from GenericXmlBridgeTDataAccess)
Read Read the DataAccess component from the XmlReader stream.

Input read using this method must be written using the Write method.


(Inherited from GenericXmlBridgeTDataAccess)
Save Saves the DataAccess component to file, using its connection property.

The output inludes data access versioning info. Output stored using this method can be read again using the Open method.


(Inherited from GenericXmlBridgeTDataAccess)
Save(Stream) Saves the DataAccess component to file, using its connection property.

The output inludes data access versioning info. Output stored using this method can be read again using the Open method.


(Inherited from GenericXmlBridgeTDataAccess)
Save(XmlWriter) Writes the DataAccess component to XmlWriter.

The output inludes data access versioning info. Output stored using this method can be read again using the Open method.


(Inherited from GenericXmlBridgeTDataAccess)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Fields

_filePath FilePath specifying the name of the persistance storage
(Inherited from GenericXmlBridgeTDataAccess)
_xmlWriterSettings XmlWriterSettings in case xml output needs custom formatting This does not affect xml content, only formatting of the xml.
(Inherited from GenericXmlBridgeTDataAccess)

See Also