// ------------------------------------------------------------------------------
//
// Generated by Xsd2Code. Version 3.4.0.32989
// bsmd.dbh.responseListCSharpFalseFalseFalseFalseFalseFalseFalseTrueFalseFalseFalseFalseNet40SerializeDeserializeSaveToFileLoadFromFileFalseFalseFalseFalseFalseFalseDefaultUTF8FalseTrue
//
// ------------------------------------------------------------------------------
namespace bsmd.dbh.response
{
using System;
using System.Diagnostics;
using System.Xml.Serialization;
using System.Collections;
using System.Xml.Schema;
using System.ComponentModel;
using System.IO;
using System.Text;
using System.Collections.Generic;
public partial class Root
{
private string versionField;
private string messageIdField;
private string visitIdField;
private string transitIdField;
private System.DateTime timestampField;
private string senderField;
private string senderReferenceField;
private RootType typeField;
private RootReportingClassesFull reportingClassesFullField;
private RootReportingClassesPartial reportingClassesPartialField;
private RootReportingClassesError reportingClassesErrorField;
private RootReportingClassesResetted reportingClassesResettedField;
private List messagesField;
private static System.Xml.Serialization.XmlSerializer serializer;
public Root()
{
this.messagesField = new List();
this.reportingClassesResettedField = new RootReportingClassesResetted();
this.reportingClassesErrorField = new RootReportingClassesError();
this.reportingClassesPartialField = new RootReportingClassesPartial();
this.reportingClassesFullField = new RootReportingClassesFull();
}
public string Version
{
get
{
return this.versionField;
}
set
{
this.versionField = value;
}
}
public string MessageId
{
get
{
return this.messageIdField;
}
set
{
this.messageIdField = value;
}
}
public string VisitId
{
get
{
return this.visitIdField;
}
set
{
this.visitIdField = value;
}
}
public string TransitId
{
get
{
return this.transitIdField;
}
set
{
this.transitIdField = value;
}
}
public System.DateTime Timestamp
{
get
{
return this.timestampField;
}
set
{
this.timestampField = value;
}
}
public string Sender
{
get
{
return this.senderField;
}
set
{
this.senderField = value;
}
}
public string SenderReference
{
get
{
return this.senderReferenceField;
}
set
{
this.senderReferenceField = value;
}
}
public RootType Type
{
get
{
return this.typeField;
}
set
{
this.typeField = value;
}
}
public RootReportingClassesFull ReportingClassesFull
{
get
{
return this.reportingClassesFullField;
}
set
{
this.reportingClassesFullField = value;
}
}
public RootReportingClassesPartial ReportingClassesPartial
{
get
{
return this.reportingClassesPartialField;
}
set
{
this.reportingClassesPartialField = value;
}
}
public RootReportingClassesError ReportingClassesError
{
get
{
return this.reportingClassesErrorField;
}
set
{
this.reportingClassesErrorField = value;
}
}
public RootReportingClassesResetted ReportingClassesResetted
{
get
{
return this.reportingClassesResettedField;
}
set
{
this.reportingClassesResettedField = value;
}
}
[System.Xml.Serialization.XmlArrayItemAttribute("Message", IsNullable = false)]
public List Messages
{
get
{
return this.messagesField;
}
set
{
this.messagesField = value;
}
}
private static System.Xml.Serialization.XmlSerializer Serializer
{
get
{
if ((serializer == null))
{
serializer = new System.Xml.Serialization.XmlSerializer(typeof(Root));
}
return serializer;
}
}
#region Serialize/Deserialize
///
/// Serializes current Root object into an XML document
///
/// string XML value
public virtual string Serialize()
{
System.IO.StreamReader streamReader = null;
System.IO.MemoryStream memoryStream = null;
try
{
memoryStream = new System.IO.MemoryStream();
Serializer.Serialize(memoryStream, this);
memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
streamReader = new System.IO.StreamReader(memoryStream);
return streamReader.ReadToEnd();
}
finally
{
if ((streamReader != null))
{
streamReader.Dispose();
}
if ((memoryStream != null))
{
memoryStream.Dispose();
}
}
}
///
/// Deserializes workflow markup into an Root object
///
/// string workflow markup to deserialize
/// Output Root object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out Root obj, out System.Exception exception)
{
exception = null;
obj = default(Root);
try
{
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out Root obj)
{
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static Root Deserialize(string xml)
{
System.IO.StringReader stringReader = null;
try
{
stringReader = new System.IO.StringReader(xml);
return ((Root)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally
{
if ((stringReader != null))
{
stringReader.Dispose();
}
}
}
///
/// Serializes current Root object into file
///
/// full path of outupt xml file
/// output Exception value if failed
/// true if can serialize and save into file; otherwise, false
public virtual bool SaveToFile(string fileName, out System.Exception exception)
{
exception = null;
try
{
SaveToFile(fileName);
return true;
}
catch (System.Exception e)
{
exception = e;
return false;
}
}
public virtual void SaveToFile(string fileName)
{
System.IO.StreamWriter streamWriter = null;
try
{
string xmlString = Serialize();
System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
streamWriter = xmlFile.CreateText();
streamWriter.WriteLine(xmlString);
streamWriter.Close();
}
finally
{
if ((streamWriter != null))
{
streamWriter.Dispose();
}
}
}
///
/// Deserializes xml markup from file into an Root object
///
/// string xml file to load and deserialize
/// Output Root object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out Root obj, out System.Exception exception)
{
exception = null;
obj = default(Root);
try
{
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out Root obj)
{
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static Root LoadFromFile(string fileName)
{
System.IO.FileStream file = null;
System.IO.StreamReader sr = null;
try
{
file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
sr = new System.IO.StreamReader(file);
string xmlString = sr.ReadToEnd();
sr.Close();
file.Close();
return Deserialize(xmlString);
}
finally
{
if ((file != null))
{
file.Dispose();
}
if ((sr != null))
{
sr.Dispose();
}
}
}
#endregion
}
public enum RootType
{
///
VISIT,
///
TRANSIT,
///
DATA,
///
RESET,
///
CANCEL,
}
public partial class RootReportingClassesFull
{
private List reportingClassField;
private static System.Xml.Serialization.XmlSerializer serializer;
public RootReportingClassesFull()
{
this.reportingClassField = new List();
}
public List ReportingClass
{
get
{
return this.reportingClassField;
}
set
{
this.reportingClassField = value;
}
}
private static System.Xml.Serialization.XmlSerializer Serializer
{
get
{
if ((serializer == null))
{
serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootReportingClassesFull));
}
return serializer;
}
}
#region Serialize/Deserialize
///
/// Serializes current RootReportingClassesFull object into an XML document
///
/// string XML value
public virtual string Serialize()
{
System.IO.StreamReader streamReader = null;
System.IO.MemoryStream memoryStream = null;
try
{
memoryStream = new System.IO.MemoryStream();
Serializer.Serialize(memoryStream, this);
memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
streamReader = new System.IO.StreamReader(memoryStream);
return streamReader.ReadToEnd();
}
finally
{
if ((streamReader != null))
{
streamReader.Dispose();
}
if ((memoryStream != null))
{
memoryStream.Dispose();
}
}
}
///
/// Deserializes workflow markup into an RootReportingClassesFull object
///
/// string workflow markup to deserialize
/// Output RootReportingClassesFull object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out RootReportingClassesFull obj, out System.Exception exception)
{
exception = null;
obj = default(RootReportingClassesFull);
try
{
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out RootReportingClassesFull obj)
{
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static RootReportingClassesFull Deserialize(string xml)
{
System.IO.StringReader stringReader = null;
try
{
stringReader = new System.IO.StringReader(xml);
return ((RootReportingClassesFull)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally
{
if ((stringReader != null))
{
stringReader.Dispose();
}
}
}
///
/// Serializes current RootReportingClassesFull object into file
///
/// full path of outupt xml file
/// output Exception value if failed
/// true if can serialize and save into file; otherwise, false
public virtual bool SaveToFile(string fileName, out System.Exception exception)
{
exception = null;
try
{
SaveToFile(fileName);
return true;
}
catch (System.Exception e)
{
exception = e;
return false;
}
}
public virtual void SaveToFile(string fileName)
{
System.IO.StreamWriter streamWriter = null;
try
{
string xmlString = Serialize();
System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
streamWriter = xmlFile.CreateText();
streamWriter.WriteLine(xmlString);
streamWriter.Close();
}
finally
{
if ((streamWriter != null))
{
streamWriter.Dispose();
}
}
}
///
/// Deserializes xml markup from file into an RootReportingClassesFull object
///
/// string xml file to load and deserialize
/// Output RootReportingClassesFull object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out RootReportingClassesFull obj, out System.Exception exception)
{
exception = null;
obj = default(RootReportingClassesFull);
try
{
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out RootReportingClassesFull obj)
{
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static RootReportingClassesFull LoadFromFile(string fileName)
{
System.IO.FileStream file = null;
System.IO.StreamReader sr = null;
try
{
file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
sr = new System.IO.StreamReader(file);
string xmlString = sr.ReadToEnd();
sr.Close();
file.Close();
return Deserialize(xmlString);
}
finally
{
if ((file != null))
{
file.Dispose();
}
if ((sr != null))
{
sr.Dispose();
}
}
}
#endregion
}
public enum RootReportingClassesFullReportingClass
{
///
NOA_NOD,
///
ATA,
///
ATD,
///
SEC,
///
POBA,
///
POBD,
///
NAME,
///
TIEFA,
///
TIEFD,
///
BKRA,
///
BKRD,
///
STAT,
///
LADG,
///
INFO,
///
SERV,
///
PRE72H,
///
MDH,
///
WAS,
///
CREW,
///
PAS,
///
BPOL,
///
TOWA,
///
TOWD,
///
HAZA,
///
HAZD,
}
public partial class RootReportingClassesPartial
{
private List reportingClassField;
private static System.Xml.Serialization.XmlSerializer serializer;
public RootReportingClassesPartial()
{
this.reportingClassField = new List();
}
public List ReportingClass
{
get
{
return this.reportingClassField;
}
set
{
this.reportingClassField = value;
}
}
private static System.Xml.Serialization.XmlSerializer Serializer
{
get
{
if ((serializer == null))
{
serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootReportingClassesPartial));
}
return serializer;
}
}
#region Serialize/Deserialize
///
/// Serializes current RootReportingClassesPartial object into an XML document
///
/// string XML value
public virtual string Serialize()
{
System.IO.StreamReader streamReader = null;
System.IO.MemoryStream memoryStream = null;
try
{
memoryStream = new System.IO.MemoryStream();
Serializer.Serialize(memoryStream, this);
memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
streamReader = new System.IO.StreamReader(memoryStream);
return streamReader.ReadToEnd();
}
finally
{
if ((streamReader != null))
{
streamReader.Dispose();
}
if ((memoryStream != null))
{
memoryStream.Dispose();
}
}
}
///
/// Deserializes workflow markup into an RootReportingClassesPartial object
///
/// string workflow markup to deserialize
/// Output RootReportingClassesPartial object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out RootReportingClassesPartial obj, out System.Exception exception)
{
exception = null;
obj = default(RootReportingClassesPartial);
try
{
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out RootReportingClassesPartial obj)
{
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static RootReportingClassesPartial Deserialize(string xml)
{
System.IO.StringReader stringReader = null;
try
{
stringReader = new System.IO.StringReader(xml);
return ((RootReportingClassesPartial)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally
{
if ((stringReader != null))
{
stringReader.Dispose();
}
}
}
///
/// Serializes current RootReportingClassesPartial object into file
///
/// full path of outupt xml file
/// output Exception value if failed
/// true if can serialize and save into file; otherwise, false
public virtual bool SaveToFile(string fileName, out System.Exception exception)
{
exception = null;
try
{
SaveToFile(fileName);
return true;
}
catch (System.Exception e)
{
exception = e;
return false;
}
}
public virtual void SaveToFile(string fileName)
{
System.IO.StreamWriter streamWriter = null;
try
{
string xmlString = Serialize();
System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
streamWriter = xmlFile.CreateText();
streamWriter.WriteLine(xmlString);
streamWriter.Close();
}
finally
{
if ((streamWriter != null))
{
streamWriter.Dispose();
}
}
}
///
/// Deserializes xml markup from file into an RootReportingClassesPartial object
///
/// string xml file to load and deserialize
/// Output RootReportingClassesPartial object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out RootReportingClassesPartial obj, out System.Exception exception)
{
exception = null;
obj = default(RootReportingClassesPartial);
try
{
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out RootReportingClassesPartial obj)
{
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static RootReportingClassesPartial LoadFromFile(string fileName)
{
System.IO.FileStream file = null;
System.IO.StreamReader sr = null;
try
{
file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
sr = new System.IO.StreamReader(file);
string xmlString = sr.ReadToEnd();
sr.Close();
file.Close();
return Deserialize(xmlString);
}
finally
{
if ((file != null))
{
file.Dispose();
}
if ((sr != null))
{
sr.Dispose();
}
}
}
#endregion
}
public enum RootReportingClassesPartialReportingClass
{
///
NOA_NOD,
///
ATA,
///
ATD,
///
SEC,
///
POBA,
///
POBD,
///
NAME,
///
TIEFA,
///
TIEFD,
///
BKRA,
///
BKRD,
///
STAT,
///
LADG,
///
INFO,
///
SERV,
///
PRE72H,
///
MDH,
///
WAS,
///
CREW,
///
PAS,
///
BPOL,
///
TOWA,
///
TOWD,
///
HAZA,
///
HAZD,
}
public partial class RootReportingClassesError
{
private List reportingClassField;
private static System.Xml.Serialization.XmlSerializer serializer;
public RootReportingClassesError()
{
this.reportingClassField = new List();
}
public List ReportingClass
{
get
{
return this.reportingClassField;
}
set
{
this.reportingClassField = value;
}
}
private static System.Xml.Serialization.XmlSerializer Serializer
{
get
{
if ((serializer == null))
{
serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootReportingClassesError));
}
return serializer;
}
}
#region Serialize/Deserialize
///
/// Serializes current RootReportingClassesError object into an XML document
///
/// string XML value
public virtual string Serialize()
{
System.IO.StreamReader streamReader = null;
System.IO.MemoryStream memoryStream = null;
try
{
memoryStream = new System.IO.MemoryStream();
Serializer.Serialize(memoryStream, this);
memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
streamReader = new System.IO.StreamReader(memoryStream);
return streamReader.ReadToEnd();
}
finally
{
if ((streamReader != null))
{
streamReader.Dispose();
}
if ((memoryStream != null))
{
memoryStream.Dispose();
}
}
}
///
/// Deserializes workflow markup into an RootReportingClassesError object
///
/// string workflow markup to deserialize
/// Output RootReportingClassesError object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out RootReportingClassesError obj, out System.Exception exception)
{
exception = null;
obj = default(RootReportingClassesError);
try
{
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out RootReportingClassesError obj)
{
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static RootReportingClassesError Deserialize(string xml)
{
System.IO.StringReader stringReader = null;
try
{
stringReader = new System.IO.StringReader(xml);
return ((RootReportingClassesError)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally
{
if ((stringReader != null))
{
stringReader.Dispose();
}
}
}
///
/// Serializes current RootReportingClassesError object into file
///
/// full path of outupt xml file
/// output Exception value if failed
/// true if can serialize and save into file; otherwise, false
public virtual bool SaveToFile(string fileName, out System.Exception exception)
{
exception = null;
try
{
SaveToFile(fileName);
return true;
}
catch (System.Exception e)
{
exception = e;
return false;
}
}
public virtual void SaveToFile(string fileName)
{
System.IO.StreamWriter streamWriter = null;
try
{
string xmlString = Serialize();
System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
streamWriter = xmlFile.CreateText();
streamWriter.WriteLine(xmlString);
streamWriter.Close();
}
finally
{
if ((streamWriter != null))
{
streamWriter.Dispose();
}
}
}
///
/// Deserializes xml markup from file into an RootReportingClassesError object
///
/// string xml file to load and deserialize
/// Output RootReportingClassesError object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out RootReportingClassesError obj, out System.Exception exception)
{
exception = null;
obj = default(RootReportingClassesError);
try
{
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out RootReportingClassesError obj)
{
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static RootReportingClassesError LoadFromFile(string fileName)
{
System.IO.FileStream file = null;
System.IO.StreamReader sr = null;
try
{
file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
sr = new System.IO.StreamReader(file);
string xmlString = sr.ReadToEnd();
sr.Close();
file.Close();
return Deserialize(xmlString);
}
finally
{
if ((file != null))
{
file.Dispose();
}
if ((sr != null))
{
sr.Dispose();
}
}
}
#endregion
}
public enum RootReportingClassesErrorReportingClass
{
///
NOA_NOD,
///
ATA,
///
ATD,
///
SEC,
///
POBA,
///
POBD,
///
NAME,
///
TIEFA,
///
TIEFD,
///
BKRA,
///
BKRD,
///
STAT,
///
LADG,
///
INFO,
///
SERV,
///
PRE72H,
///
MDH,
///
WAS,
///
CREW,
///
PAS,
///
BPOL,
///
TOWA,
///
TOWD,
///
HAZA,
///
HAZD,
}
public partial class RootReportingClassesResetted
{
private List reportingClassField;
private static System.Xml.Serialization.XmlSerializer serializer;
public RootReportingClassesResetted()
{
this.reportingClassField = new List();
}
public List ReportingClass
{
get
{
return this.reportingClassField;
}
set
{
this.reportingClassField = value;
}
}
private static System.Xml.Serialization.XmlSerializer Serializer
{
get
{
if ((serializer == null))
{
serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootReportingClassesResetted));
}
return serializer;
}
}
#region Serialize/Deserialize
///
/// Serializes current RootReportingClassesResetted object into an XML document
///
/// string XML value
public virtual string Serialize()
{
System.IO.StreamReader streamReader = null;
System.IO.MemoryStream memoryStream = null;
try
{
memoryStream = new System.IO.MemoryStream();
Serializer.Serialize(memoryStream, this);
memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
streamReader = new System.IO.StreamReader(memoryStream);
return streamReader.ReadToEnd();
}
finally
{
if ((streamReader != null))
{
streamReader.Dispose();
}
if ((memoryStream != null))
{
memoryStream.Dispose();
}
}
}
///
/// Deserializes workflow markup into an RootReportingClassesResetted object
///
/// string workflow markup to deserialize
/// Output RootReportingClassesResetted object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out RootReportingClassesResetted obj, out System.Exception exception)
{
exception = null;
obj = default(RootReportingClassesResetted);
try
{
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out RootReportingClassesResetted obj)
{
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static RootReportingClassesResetted Deserialize(string xml)
{
System.IO.StringReader stringReader = null;
try
{
stringReader = new System.IO.StringReader(xml);
return ((RootReportingClassesResetted)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally
{
if ((stringReader != null))
{
stringReader.Dispose();
}
}
}
///
/// Serializes current RootReportingClassesResetted object into file
///
/// full path of outupt xml file
/// output Exception value if failed
/// true if can serialize and save into file; otherwise, false
public virtual bool SaveToFile(string fileName, out System.Exception exception)
{
exception = null;
try
{
SaveToFile(fileName);
return true;
}
catch (System.Exception e)
{
exception = e;
return false;
}
}
public virtual void SaveToFile(string fileName)
{
System.IO.StreamWriter streamWriter = null;
try
{
string xmlString = Serialize();
System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
streamWriter = xmlFile.CreateText();
streamWriter.WriteLine(xmlString);
streamWriter.Close();
}
finally
{
if ((streamWriter != null))
{
streamWriter.Dispose();
}
}
}
///
/// Deserializes xml markup from file into an RootReportingClassesResetted object
///
/// string xml file to load and deserialize
/// Output RootReportingClassesResetted object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out RootReportingClassesResetted obj, out System.Exception exception)
{
exception = null;
obj = default(RootReportingClassesResetted);
try
{
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out RootReportingClassesResetted obj)
{
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static RootReportingClassesResetted LoadFromFile(string fileName)
{
System.IO.FileStream file = null;
System.IO.StreamReader sr = null;
try
{
file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
sr = new System.IO.StreamReader(file);
string xmlString = sr.ReadToEnd();
sr.Close();
file.Close();
return Deserialize(xmlString);
}
finally
{
if ((file != null))
{
file.Dispose();
}
if ((sr != null))
{
sr.Dispose();
}
}
}
#endregion
}
public enum RootReportingClassesResettedReportingClass
{
///
NOA_NOD,
///
ATA,
///
ATD,
///
SEC,
///
POBA,
///
POBD,
///
NAME,
///
TIEFA,
///
TIEFD,
///
BKRA,
///
BKRD,
///
STAT,
///
LADG,
///
INFO,
///
SERV,
///
PRE72H,
///
MDH,
///
WAS,
///
CREW,
///
PAS,
///
BPOL,
///
TOWA,
///
TOWD,
///
HAZA,
///
HAZD,
}
public partial class RootMessage
{
private string idField;
private RootMessageType typeField;
private string locationField;
private string textField;
private static System.Xml.Serialization.XmlSerializer serializer;
public string ID
{
get
{
return this.idField;
}
set
{
this.idField = value;
}
}
public RootMessageType Type
{
get
{
return this.typeField;
}
set
{
this.typeField = value;
}
}
public string Location
{
get
{
return this.locationField;
}
set
{
this.locationField = value;
}
}
public string Text
{
get
{
return this.textField;
}
set
{
this.textField = value;
}
}
private static System.Xml.Serialization.XmlSerializer Serializer
{
get
{
if ((serializer == null))
{
serializer = new System.Xml.Serialization.XmlSerializer(typeof(RootMessage));
}
return serializer;
}
}
#region Serialize/Deserialize
///
/// Serializes current RootMessage object into an XML document
///
/// string XML value
public virtual string Serialize()
{
System.IO.StreamReader streamReader = null;
System.IO.MemoryStream memoryStream = null;
try
{
memoryStream = new System.IO.MemoryStream();
Serializer.Serialize(memoryStream, this);
memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
streamReader = new System.IO.StreamReader(memoryStream);
return streamReader.ReadToEnd();
}
finally
{
if ((streamReader != null))
{
streamReader.Dispose();
}
if ((memoryStream != null))
{
memoryStream.Dispose();
}
}
}
///
/// Deserializes workflow markup into an RootMessage object
///
/// string workflow markup to deserialize
/// Output RootMessage object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out RootMessage obj, out System.Exception exception)
{
exception = null;
obj = default(RootMessage);
try
{
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out RootMessage obj)
{
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static RootMessage Deserialize(string xml)
{
System.IO.StringReader stringReader = null;
try
{
stringReader = new System.IO.StringReader(xml);
return ((RootMessage)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally
{
if ((stringReader != null))
{
stringReader.Dispose();
}
}
}
///
/// Serializes current RootMessage object into file
///
/// full path of outupt xml file
/// output Exception value if failed
/// true if can serialize and save into file; otherwise, false
public virtual bool SaveToFile(string fileName, out System.Exception exception)
{
exception = null;
try
{
SaveToFile(fileName);
return true;
}
catch (System.Exception e)
{
exception = e;
return false;
}
}
public virtual void SaveToFile(string fileName)
{
System.IO.StreamWriter streamWriter = null;
try
{
string xmlString = Serialize();
System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
streamWriter = xmlFile.CreateText();
streamWriter.WriteLine(xmlString);
streamWriter.Close();
}
finally
{
if ((streamWriter != null))
{
streamWriter.Dispose();
}
}
}
///
/// Deserializes xml markup from file into an RootMessage object
///
/// string xml file to load and deserialize
/// Output RootMessage object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out RootMessage obj, out System.Exception exception)
{
exception = null;
obj = default(RootMessage);
try
{
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex)
{
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out RootMessage obj)
{
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static RootMessage LoadFromFile(string fileName)
{
System.IO.FileStream file = null;
System.IO.StreamReader sr = null;
try
{
file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
sr = new System.IO.StreamReader(file);
string xmlString = sr.ReadToEnd();
sr.Close();
file.Close();
return Deserialize(xmlString);
}
finally
{
if ((file != null))
{
file.Dispose();
}
if ((sr != null))
{
sr.Dispose();
}
}
}
#endregion
}
public enum RootMessageType
{
///
INFO,
///
WARNING,
///
VIOLATION,
///
ERROR,
}
}