#pragma warning disable 1591, 0114, 0108, 0472 // ------------------------------------------------------------------------------ // <auto-generated> // Generated by Xsd2Code. Version 3.3.0.33001 // <NameSpace>OSGeo.MapGuide.ObjectModels.Common</NameSpace><Collection>BindingList</Collection><codeType>CSharp</codeType><EnableDataBinding>True</EnableDataBinding><EnableLasyLoading>False</EnableLasyLoading><HidePrivateFieldInIDE>True</HidePrivateFieldInIDE><EnableSummaryComment>True</EnableSummaryComment><IncludeSerializeMethod>True</IncludeSerializeMethod><UseBaseClass>False</UseBaseClass><GenerateCloneMethod>True</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><CodeBaseTag>Net20</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>True</GenerateXMLAttributes><AutomaticProperties>False</AutomaticProperties><DisableDebug>False</DisableDebug><CustomUsings></CustomUsings><ExcludeIncludedTypes>False</ExcludeIncludedTypes><EnableInitializeFields>False</EnableInitializeFields> // </auto-generated> // ------------------------------------------------------------------------------ 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; /// <summary> /// Specifies an envelope (a rectangle) using two corner points. /// </summary> [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [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 Envelope : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private EnvelopeLowerLeftCoordinate lowerLeftCoordinateField; [EditorBrowsable(EditorBrowsableState.Never)] private EnvelopeUpperRightCoordinate upperRightCoordinateField; private static System.Xml.Serialization.XmlSerializer serializer; /// <summary> /// Specifies the lower left corner of the envelope. /// </summary> public EnvelopeLowerLeftCoordinate LowerLeftCoordinate { get { return this.lowerLeftCoordinateField; } set { if ((this.lowerLeftCoordinateField != null)) { if ((lowerLeftCoordinateField.Equals(value) != true)) { this.lowerLeftCoordinateField = value; this.OnPropertyChanged("LowerLeftCoordinate"); } } else { this.lowerLeftCoordinateField = value; this.OnPropertyChanged("LowerLeftCoordinate"); } } } /// <summary> /// Specifies the upper right corner of the envelope. /// </summary> public EnvelopeUpperRightCoordinate UpperRightCoordinate { get { return this.upperRightCoordinateField; } set { if ((this.upperRightCoordinateField != null)) { if ((upperRightCoordinateField.Equals(value) != true)) { this.upperRightCoordinateField = value; this.OnPropertyChanged("UpperRightCoordinate"); } } else { this.upperRightCoordinateField = value; this.OnPropertyChanged("UpperRightCoordinate"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(Envelope)); } 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 /// <summary> /// Serializes current Envelope object into an XML document /// </summary> /// <returns>string XML value</returns> 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(); } } } /// <summary> /// Deserializes workflow markup into an Envelope object /// </summary> /// <param name="xml">string workflow markup to deserialize</param> /// <param name="obj">Output Envelope object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string xml, out Envelope obj, out System.Exception exception) { exception = null; obj = default(Envelope); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out Envelope obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static Envelope Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((Envelope)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// <summary> /// Serializes current Envelope object into file /// </summary> /// <param name="fileName">full path of outupt xml file</param> /// <param name="exception">output Exception value if failed</param> /// <returns>true if can serialize and save into file; otherwise, false</returns> 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(); } } } /// <summary> /// Deserializes xml markup from file into an Envelope object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output Envelope object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, out Envelope obj, out System.Exception exception) { exception = null; obj = default(Envelope); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out Envelope obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static Envelope 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 /// <summary> /// Create a clone of this Envelope object /// </summary> public virtual Envelope Clone() { return ((Envelope)(this.MemberwiseClone())); } #endregion } /// <summary> /// Specifies the lower left corner of the envelope. /// </summary> [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class EnvelopeLowerLeftCoordinate : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private double xField; [EditorBrowsable(EditorBrowsableState.Never)] private double yField; [EditorBrowsable(EditorBrowsableState.Never)] private double zField; [EditorBrowsable(EditorBrowsableState.Never)] private double mField; private static System.Xml.Serialization.XmlSerializer serializer; public double X { get { return this.xField; } set { if ((this.xField != null)) { if ((xField.Equals(value) != true)) { this.xField = value; this.OnPropertyChanged("X"); } } else { this.xField = value; this.OnPropertyChanged("X"); } } } public double Y { get { return this.yField; } set { if ((this.yField != null)) { if ((yField.Equals(value) != true)) { this.yField = value; this.OnPropertyChanged("Y"); } } else { this.yField = value; this.OnPropertyChanged("Y"); } } } public double Z { get { return this.zField; } set { if ((this.zField != null)) { if ((zField.Equals(value) != true)) { this.zField = value; this.OnPropertyChanged("Z"); } } else { this.zField = value; this.OnPropertyChanged("Z"); } } } public double M { get { return this.mField; } set { if ((this.mField != null)) { if ((mField.Equals(value) != true)) { this.mField = value; this.OnPropertyChanged("M"); } } else { this.mField = value; this.OnPropertyChanged("M"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(EnvelopeLowerLeftCoordinate)); } 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 /// <summary> /// Serializes current EnvelopeLowerLeftCoordinate object into an XML document /// </summary> /// <returns>string XML value</returns> 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(); } } } /// <summary> /// Deserializes workflow markup into an EnvelopeLowerLeftCoordinate object /// </summary> /// <param name="xml">string workflow markup to deserialize</param> /// <param name="obj">Output EnvelopeLowerLeftCoordinate object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string xml, out EnvelopeLowerLeftCoordinate obj, out System.Exception exception) { exception = null; obj = default(EnvelopeLowerLeftCoordinate); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out EnvelopeLowerLeftCoordinate obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static EnvelopeLowerLeftCoordinate Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((EnvelopeLowerLeftCoordinate)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// <summary> /// Serializes current EnvelopeLowerLeftCoordinate object into file /// </summary> /// <param name="fileName">full path of outupt xml file</param> /// <param name="exception">output Exception value if failed</param> /// <returns>true if can serialize and save into file; otherwise, false</returns> 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(); } } } /// <summary> /// Deserializes xml markup from file into an EnvelopeLowerLeftCoordinate object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output EnvelopeLowerLeftCoordinate object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, out EnvelopeLowerLeftCoordinate obj, out System.Exception exception) { exception = null; obj = default(EnvelopeLowerLeftCoordinate); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out EnvelopeLowerLeftCoordinate obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static EnvelopeLowerLeftCoordinate 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 /// <summary> /// Create a clone of this EnvelopeLowerLeftCoordinate object /// </summary> public virtual EnvelopeLowerLeftCoordinate Clone() { return ((EnvelopeLowerLeftCoordinate)(this.MemberwiseClone())); } #endregion } /// <summary> /// Specifies the upper right corner of the envelope. /// </summary> [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class EnvelopeUpperRightCoordinate : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private double xField; [EditorBrowsable(EditorBrowsableState.Never)] private double yField; [EditorBrowsable(EditorBrowsableState.Never)] private double zField; [EditorBrowsable(EditorBrowsableState.Never)] private double mField; private static System.Xml.Serialization.XmlSerializer serializer; public double X { get { return this.xField; } set { if ((this.xField != null)) { if ((xField.Equals(value) != true)) { this.xField = value; this.OnPropertyChanged("X"); } } else { this.xField = value; this.OnPropertyChanged("X"); } } } public double Y { get { return this.yField; } set { if ((this.yField != null)) { if ((yField.Equals(value) != true)) { this.yField = value; this.OnPropertyChanged("Y"); } } else { this.yField = value; this.OnPropertyChanged("Y"); } } } public double Z { get { return this.zField; } set { if ((this.zField != null)) { if ((zField.Equals(value) != true)) { this.zField = value; this.OnPropertyChanged("Z"); } } else { this.zField = value; this.OnPropertyChanged("Z"); } } } public double M { get { return this.mField; } set { if ((this.mField != null)) { if ((mField.Equals(value) != true)) { this.mField = value; this.OnPropertyChanged("M"); } } else { this.mField = value; this.OnPropertyChanged("M"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(EnvelopeUpperRightCoordinate)); } 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 /// <summary> /// Serializes current EnvelopeUpperRightCoordinate object into an XML document /// </summary> /// <returns>string XML value</returns> 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(); } } } /// <summary> /// Deserializes workflow markup into an EnvelopeUpperRightCoordinate object /// </summary> /// <param name="xml">string workflow markup to deserialize</param> /// <param name="obj">Output EnvelopeUpperRightCoordinate object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string xml, out EnvelopeUpperRightCoordinate obj, out System.Exception exception) { exception = null; obj = default(EnvelopeUpperRightCoordinate); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out EnvelopeUpperRightCoordinate obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static EnvelopeUpperRightCoordinate Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((EnvelopeUpperRightCoordinate)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// <summary> /// Serializes current EnvelopeUpperRightCoordinate object into file /// </summary> /// <param name="fileName">full path of outupt xml file</param> /// <param name="exception">output Exception value if failed</param> /// <returns>true if can serialize and save into file; otherwise, false</returns> 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(); } } } /// <summary> /// Deserializes xml markup from file into an EnvelopeUpperRightCoordinate object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output EnvelopeUpperRightCoordinate object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, out EnvelopeUpperRightCoordinate obj, out System.Exception exception) { exception = null; obj = default(EnvelopeUpperRightCoordinate); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out EnvelopeUpperRightCoordinate obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static EnvelopeUpperRightCoordinate 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 /// <summary> /// Create a clone of this EnvelopeUpperRightCoordinate object /// </summary> public virtual EnvelopeUpperRightCoordinate Clone() { return ((EnvelopeUpperRightCoordinate)(this.MemberwiseClone())); } #endregion } }