// ------------------------------------------------------------------------------
//
// Generated by Xsd2Code. Version 3.3.0.20459
// OSGeo.MapGuide.ObjectModels.CommonBindingListCSharpTrueFalseTrueTrueTrueFalseTrueFalseNet20SerializeDeserializeSaveToFileLoadFromFileTrueFalseFalseFalseTrue
//
// ------------------------------------------------------------------------------
namespace OSGeo.MapGuide.ObjectModels.Common {
using System;
using System.Diagnostics;
using System.Xml.Serialization;
using System.Collections;
using System.Xml.Schema;
using System.ComponentModel;
using System.IO;
///
/// Site Version
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.20460")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
public partial class SiteVersion : SiteVersionType, System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string versionField;
private static System.Xml.Serialization.XmlSerializer serializer;
public SiteVersion() {
this.versionField = "2.2.0";
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public string version {
get {
return this.versionField;
}
set {
if ((this.versionField != null)) {
if ((versionField.Equals(value) != true)) {
this.versionField = value;
this.OnPropertyChanged("version");
}
}
else {
this.versionField = value;
this.OnPropertyChanged("version");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(SiteVersion));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string info) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(info));
}
}
#region Serialize/Deserialize
///
/// Serializes current SiteVersion 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 SiteVersion object
///
/// string workflow markup to deserialize
/// Output SiteVersion object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out SiteVersion obj, out System.Exception exception) {
exception = null;
obj = default(SiteVersion);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out SiteVersion obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static SiteVersion Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((SiteVersion)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current SiteVersion 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 SiteVersion object
///
/// string xml file to load and deserialize
/// Output SiteVersion object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out SiteVersion obj, out System.Exception exception) {
exception = null;
obj = default(SiteVersion);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out SiteVersion obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static SiteVersion 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
#region Clone method
///
/// Create a clone of this SiteVersion object
///
public virtual SiteVersion Clone() {
return ((SiteVersion)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.20460")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class SiteVersionType : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private SiteVersionTypeServer serverField;
private static System.Xml.Serialization.XmlSerializer serializer;
///
/// SiteVersionType class constructor
///
public SiteVersionType() {
this.serverField = new SiteVersionTypeServer();
}
public SiteVersionTypeServer Server {
get {
return this.serverField;
}
set {
if ((this.serverField != null)) {
if ((serverField.Equals(value) != true)) {
this.serverField = value;
this.OnPropertyChanged("Server");
}
}
else {
this.serverField = value;
this.OnPropertyChanged("Server");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(SiteVersionType));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string info) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(info));
}
}
#region Serialize/Deserialize
///
/// Serializes current SiteVersionType 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 SiteVersionType object
///
/// string workflow markup to deserialize
/// Output SiteVersionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out SiteVersionType obj, out System.Exception exception) {
exception = null;
obj = default(SiteVersionType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out SiteVersionType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static SiteVersionType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((SiteVersionType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current SiteVersionType 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 SiteVersionType object
///
/// string xml file to load and deserialize
/// Output SiteVersionType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out SiteVersionType obj, out System.Exception exception) {
exception = null;
obj = default(SiteVersionType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out SiteVersionType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static SiteVersionType 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
#region Clone method
///
/// Create a clone of this SiteVersionType object
///
public virtual SiteVersionType Clone() {
return ((SiteVersionType)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.20460")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class SiteVersionTypeServer : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string versionField;
private static System.Xml.Serialization.XmlSerializer serializer;
public string Version {
get {
return this.versionField;
}
set {
if ((this.versionField != null)) {
if ((versionField.Equals(value) != true)) {
this.versionField = value;
this.OnPropertyChanged("Version");
}
}
else {
this.versionField = value;
this.OnPropertyChanged("Version");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(SiteVersionTypeServer));
}
return serializer;
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public virtual void OnPropertyChanged(string info) {
System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
if ((handler != null)) {
handler(this, new System.ComponentModel.PropertyChangedEventArgs(info));
}
}
#region Serialize/Deserialize
///
/// Serializes current SiteVersionTypeServer 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 SiteVersionTypeServer object
///
/// string workflow markup to deserialize
/// Output SiteVersionTypeServer object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out SiteVersionTypeServer obj, out System.Exception exception) {
exception = null;
obj = default(SiteVersionTypeServer);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out SiteVersionTypeServer obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static SiteVersionTypeServer Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((SiteVersionTypeServer)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current SiteVersionTypeServer 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 SiteVersionTypeServer object
///
/// string xml file to load and deserialize
/// Output SiteVersionTypeServer object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out SiteVersionTypeServer obj, out System.Exception exception) {
exception = null;
obj = default(SiteVersionTypeServer);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out SiteVersionTypeServer obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static SiteVersionTypeServer 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
#region Clone method
///
/// Create a clone of this SiteVersionTypeServer object
///
public virtual SiteVersionTypeServer Clone() {
return ((SiteVersionTypeServer)(this.MemberwiseClone()));
}
#endregion
}
}