#pragma warning disable 1591, 0114, 0108
// ------------------------------------------------------------------------------
//  <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;
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
    public partial class FdoSpatialContextList : System.ComponentModel.INotifyPropertyChanged {
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string providerNameField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private BindingList<FdoSpatialContextListSpatialContext> spatialContextField;
        
        private static System.Xml.Serialization.XmlSerializer serializer;
        
        public string ProviderName {
            get {
                return this.providerNameField;
            }
            set {
                if ((this.providerNameField != null)) {
                    if ((providerNameField.Equals(value) != true)) {
                        this.providerNameField = value;
                        this.OnPropertyChanged("ProviderName");
                    }
                }
                else {
                    this.providerNameField = value;
                    this.OnPropertyChanged("ProviderName");
                }
            }
        }
        
        [System.Xml.Serialization.XmlElementAttribute("SpatialContext")]
        public BindingList<FdoSpatialContextListSpatialContext> SpatialContext {
            get {
                return this.spatialContextField;
            }
            set {
                if ((this.spatialContextField != null)) {
                    if ((spatialContextField.Equals(value) != true)) {
                        this.spatialContextField = value;
                        this.OnPropertyChanged("SpatialContext");
                    }
                }
                else {
                    this.spatialContextField = value;
                    this.OnPropertyChanged("SpatialContext");
                }
            }
        }
        
        private static System.Xml.Serialization.XmlSerializer Serializer {
            get {
                if ((serializer == null)) {
                    serializer = new System.Xml.Serialization.XmlSerializer(typeof(FdoSpatialContextList));
                }
                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 FdoSpatialContextList 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 FdoSpatialContextList object
        /// </summary>
        /// <param name="xml">string workflow markup to deserialize</param>
        /// <param name="obj">Output FdoSpatialContextList 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 FdoSpatialContextList obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextList);
            try {
                obj = Deserialize(xml);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool Deserialize(string xml, out FdoSpatialContextList obj) {
            System.Exception exception = null;
            return Deserialize(xml, out obj, out exception);
        }
        
        public static FdoSpatialContextList Deserialize(string xml) {
            System.IO.StringReader stringReader = null;
            try {
                stringReader = new System.IO.StringReader(xml);
                return ((FdoSpatialContextList)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
            }
            finally {
                if ((stringReader != null)) {
                    stringReader.Dispose();
                }
            }
        }
        
        /// <summary>
        /// Serializes current FdoSpatialContextList 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 FdoSpatialContextList object
        /// </summary>
        /// <param name="fileName">string xml file to load and deserialize</param>
        /// <param name="obj">Output FdoSpatialContextList 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 FdoSpatialContextList obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextList);
            try {
                obj = LoadFromFile(fileName);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool LoadFromFile(string fileName, out FdoSpatialContextList obj) {
            System.Exception exception = null;
            return LoadFromFile(fileName, out obj, out exception);
        }
        
        public static FdoSpatialContextList 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 FdoSpatialContextList object
        /// </summary>
        public virtual FdoSpatialContextList Clone() {
            return ((FdoSpatialContextList)(this.MemberwiseClone()));
        }
        #endregion
    }
    
    [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 FdoSpatialContextListSpatialContext : System.ComponentModel.INotifyPropertyChanged {
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string nameField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string descriptionField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string coordinateSystemNameField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string coordinateSystemWktField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private FdoSpatialContextListSpatialContextExtentType extentTypeField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private FdoSpatialContextListSpatialContextExtent extentField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private double xYToleranceField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private double zToleranceField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private bool isActiveField;
        
        private static System.Xml.Serialization.XmlSerializer serializer;
        
        public FdoSpatialContextListSpatialContext() {
            this.isActiveField = false;
        }
        
        public string Name {
            get {
                return this.nameField;
            }
            set {
                if ((this.nameField != null)) {
                    if ((nameField.Equals(value) != true)) {
                        this.nameField = value;
                        this.OnPropertyChanged("Name");
                    }
                }
                else {
                    this.nameField = value;
                    this.OnPropertyChanged("Name");
                }
            }
        }
        
        public string Description {
            get {
                return this.descriptionField;
            }
            set {
                if ((this.descriptionField != null)) {
                    if ((descriptionField.Equals(value) != true)) {
                        this.descriptionField = value;
                        this.OnPropertyChanged("Description");
                    }
                }
                else {
                    this.descriptionField = value;
                    this.OnPropertyChanged("Description");
                }
            }
        }
        
        public string CoordinateSystemName {
            get {
                return this.coordinateSystemNameField;
            }
            set {
                if ((this.coordinateSystemNameField != null)) {
                    if ((coordinateSystemNameField.Equals(value) != true)) {
                        this.coordinateSystemNameField = value;
                        this.OnPropertyChanged("CoordinateSystemName");
                    }
                }
                else {
                    this.coordinateSystemNameField = value;
                    this.OnPropertyChanged("CoordinateSystemName");
                }
            }
        }
        
        public string CoordinateSystemWkt {
            get {
                return this.coordinateSystemWktField;
            }
            set {
                if ((this.coordinateSystemWktField != null)) {
                    if ((coordinateSystemWktField.Equals(value) != true)) {
                        this.coordinateSystemWktField = value;
                        this.OnPropertyChanged("CoordinateSystemWkt");
                    }
                }
                else {
                    this.coordinateSystemWktField = value;
                    this.OnPropertyChanged("CoordinateSystemWkt");
                }
            }
        }
        
        public FdoSpatialContextListSpatialContextExtentType ExtentType {
            get {
                return this.extentTypeField;
            }
            set {
                if ((extentTypeField.Equals(value) != true)) {
                    this.extentTypeField = value;
                    this.OnPropertyChanged("ExtentType");
                }
            }
        }
        
        /// <summary>
        /// This would return AWKT representing extents e.g. polygon, polyline or circle etc.
        /// </summary>
        public FdoSpatialContextListSpatialContextExtent Extent {
            get {
                return this.extentField;
            }
            set {
                if ((this.extentField != null)) {
                    if ((extentField.Equals(value) != true)) {
                        this.extentField = value;
                        this.OnPropertyChanged("Extent");
                    }
                }
                else {
                    this.extentField = value;
                    this.OnPropertyChanged("Extent");
                }
            }
        }
        
        public double XYTolerance {
            get {
                return this.xYToleranceField;
            }
            set {
                if ((xYToleranceField.Equals(value) != true)) {
                    this.xYToleranceField = value;
                    this.OnPropertyChanged("XYTolerance");
                }
            }
        }
        
        public double ZTolerance {
            get {
                return this.zToleranceField;
            }
            set {
                if ((zToleranceField.Equals(value) != true)) {
                    this.zToleranceField = value;
                    this.OnPropertyChanged("ZTolerance");
                }
            }
        }
        
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute(false)]
        public bool IsActive {
            get {
                return this.isActiveField;
            }
            set {
                if ((isActiveField.Equals(value) != true)) {
                    this.isActiveField = value;
                    this.OnPropertyChanged("IsActive");
                }
            }
        }
        
        private static System.Xml.Serialization.XmlSerializer Serializer {
            get {
                if ((serializer == null)) {
                    serializer = new System.Xml.Serialization.XmlSerializer(typeof(FdoSpatialContextListSpatialContext));
                }
                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 FdoSpatialContextListSpatialContext 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 FdoSpatialContextListSpatialContext object
        /// </summary>
        /// <param name="xml">string workflow markup to deserialize</param>
        /// <param name="obj">Output FdoSpatialContextListSpatialContext 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 FdoSpatialContextListSpatialContext obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextListSpatialContext);
            try {
                obj = Deserialize(xml);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool Deserialize(string xml, out FdoSpatialContextListSpatialContext obj) {
            System.Exception exception = null;
            return Deserialize(xml, out obj, out exception);
        }
        
        public static FdoSpatialContextListSpatialContext Deserialize(string xml) {
            System.IO.StringReader stringReader = null;
            try {
                stringReader = new System.IO.StringReader(xml);
                return ((FdoSpatialContextListSpatialContext)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
            }
            finally {
                if ((stringReader != null)) {
                    stringReader.Dispose();
                }
            }
        }
        
        /// <summary>
        /// Serializes current FdoSpatialContextListSpatialContext 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 FdoSpatialContextListSpatialContext object
        /// </summary>
        /// <param name="fileName">string xml file to load and deserialize</param>
        /// <param name="obj">Output FdoSpatialContextListSpatialContext 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 FdoSpatialContextListSpatialContext obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextListSpatialContext);
            try {
                obj = LoadFromFile(fileName);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool LoadFromFile(string fileName, out FdoSpatialContextListSpatialContext obj) {
            System.Exception exception = null;
            return LoadFromFile(fileName, out obj, out exception);
        }
        
        public static FdoSpatialContextListSpatialContext 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 FdoSpatialContextListSpatialContext object
        /// </summary>
        public virtual FdoSpatialContextListSpatialContext Clone() {
            return ((FdoSpatialContextListSpatialContext)(this.MemberwiseClone()));
        }
        #endregion
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
    public enum FdoSpatialContextListSpatialContextExtentType {
        
        /// <remarks/>
        Static,
        
        /// <remarks/>
        Dynamic,
    }
    
    /// <summary>
    /// This would return AWKT representing extents e.g. polygon, polyline or circle etc.
    /// </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 FdoSpatialContextListSpatialContextExtent : System.ComponentModel.INotifyPropertyChanged {
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate lowerLeftCoordinateField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private FdoSpatialContextListSpatialContextExtentUpperRightCoordinate upperRightCoordinateField;
        
        private static System.Xml.Serialization.XmlSerializer serializer;
        
        public FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate 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");
                }
            }
        }
        
        public FdoSpatialContextListSpatialContextExtentUpperRightCoordinate 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(FdoSpatialContextListSpatialContextExtent));
                }
                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 FdoSpatialContextListSpatialContextExtent 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 FdoSpatialContextListSpatialContextExtent object
        /// </summary>
        /// <param name="xml">string workflow markup to deserialize</param>
        /// <param name="obj">Output FdoSpatialContextListSpatialContextExtent 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 FdoSpatialContextListSpatialContextExtent obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextListSpatialContextExtent);
            try {
                obj = Deserialize(xml);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool Deserialize(string xml, out FdoSpatialContextListSpatialContextExtent obj) {
            System.Exception exception = null;
            return Deserialize(xml, out obj, out exception);
        }
        
        public static FdoSpatialContextListSpatialContextExtent Deserialize(string xml) {
            System.IO.StringReader stringReader = null;
            try {
                stringReader = new System.IO.StringReader(xml);
                return ((FdoSpatialContextListSpatialContextExtent)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
            }
            finally {
                if ((stringReader != null)) {
                    stringReader.Dispose();
                }
            }
        }
        
        /// <summary>
        /// Serializes current FdoSpatialContextListSpatialContextExtent 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 FdoSpatialContextListSpatialContextExtent object
        /// </summary>
        /// <param name="fileName">string xml file to load and deserialize</param>
        /// <param name="obj">Output FdoSpatialContextListSpatialContextExtent 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 FdoSpatialContextListSpatialContextExtent obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextListSpatialContextExtent);
            try {
                obj = LoadFromFile(fileName);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool LoadFromFile(string fileName, out FdoSpatialContextListSpatialContextExtent obj) {
            System.Exception exception = null;
            return LoadFromFile(fileName, out obj, out exception);
        }
        
        public static FdoSpatialContextListSpatialContextExtent 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 FdoSpatialContextListSpatialContextExtent object
        /// </summary>
        public virtual FdoSpatialContextListSpatialContextExtent Clone() {
            return ((FdoSpatialContextListSpatialContextExtent)(this.MemberwiseClone()));
        }
        #endregion
    }
    
    [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 FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate : System.ComponentModel.INotifyPropertyChanged {
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string xField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string yField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string zField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string mField;
        
        private static System.Xml.Serialization.XmlSerializer serializer;
        
        public string 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 string 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 string 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 string 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(FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate));
                }
                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 FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate 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 FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate object
        /// </summary>
        /// <param name="xml">string workflow markup to deserialize</param>
        /// <param name="obj">Output FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate 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 FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate);
            try {
                obj = Deserialize(xml);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool Deserialize(string xml, out FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate obj) {
            System.Exception exception = null;
            return Deserialize(xml, out obj, out exception);
        }
        
        public static FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate Deserialize(string xml) {
            System.IO.StringReader stringReader = null;
            try {
                stringReader = new System.IO.StringReader(xml);
                return ((FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
            }
            finally {
                if ((stringReader != null)) {
                    stringReader.Dispose();
                }
            }
        }
        
        /// <summary>
        /// Serializes current FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate 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 FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate object
        /// </summary>
        /// <param name="fileName">string xml file to load and deserialize</param>
        /// <param name="obj">Output FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate 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 FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate);
            try {
                obj = LoadFromFile(fileName);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool LoadFromFile(string fileName, out FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate obj) {
            System.Exception exception = null;
            return LoadFromFile(fileName, out obj, out exception);
        }
        
        public static FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate 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 FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate object
        /// </summary>
        public virtual FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate Clone() {
            return ((FdoSpatialContextListSpatialContextExtentLowerLeftCoordinate)(this.MemberwiseClone()));
        }
        #endregion
    }
    
    [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 FdoSpatialContextListSpatialContextExtentUpperRightCoordinate : System.ComponentModel.INotifyPropertyChanged {
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string xField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string yField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string zField;
        
        [EditorBrowsable(EditorBrowsableState.Never)]
        private string mField;
        
        private static System.Xml.Serialization.XmlSerializer serializer;
        
        public string 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 string 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 string 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 string 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(FdoSpatialContextListSpatialContextExtentUpperRightCoordinate));
                }
                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 FdoSpatialContextListSpatialContextExtentUpperRightCoordinate 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 FdoSpatialContextListSpatialContextExtentUpperRightCoordinate object
        /// </summary>
        /// <param name="xml">string workflow markup to deserialize</param>
        /// <param name="obj">Output FdoSpatialContextListSpatialContextExtentUpperRightCoordinate 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 FdoSpatialContextListSpatialContextExtentUpperRightCoordinate obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextListSpatialContextExtentUpperRightCoordinate);
            try {
                obj = Deserialize(xml);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool Deserialize(string xml, out FdoSpatialContextListSpatialContextExtentUpperRightCoordinate obj) {
            System.Exception exception = null;
            return Deserialize(xml, out obj, out exception);
        }
        
        public static FdoSpatialContextListSpatialContextExtentUpperRightCoordinate Deserialize(string xml) {
            System.IO.StringReader stringReader = null;
            try {
                stringReader = new System.IO.StringReader(xml);
                return ((FdoSpatialContextListSpatialContextExtentUpperRightCoordinate)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
            }
            finally {
                if ((stringReader != null)) {
                    stringReader.Dispose();
                }
            }
        }
        
        /// <summary>
        /// Serializes current FdoSpatialContextListSpatialContextExtentUpperRightCoordinate 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 FdoSpatialContextListSpatialContextExtentUpperRightCoordinate object
        /// </summary>
        /// <param name="fileName">string xml file to load and deserialize</param>
        /// <param name="obj">Output FdoSpatialContextListSpatialContextExtentUpperRightCoordinate 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 FdoSpatialContextListSpatialContextExtentUpperRightCoordinate obj, out System.Exception exception) {
            exception = null;
            obj = default(FdoSpatialContextListSpatialContextExtentUpperRightCoordinate);
            try {
                obj = LoadFromFile(fileName);
                return true;
            }
            catch (System.Exception ex) {
                exception = ex;
                return false;
            }
        }
        
        public static bool LoadFromFile(string fileName, out FdoSpatialContextListSpatialContextExtentUpperRightCoordinate obj) {
            System.Exception exception = null;
            return LoadFromFile(fileName, out obj, out exception);
        }
        
        public static FdoSpatialContextListSpatialContextExtentUpperRightCoordinate 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 FdoSpatialContextListSpatialContextExtentUpperRightCoordinate object
        /// </summary>
        public virtual FdoSpatialContextListSpatialContextExtentUpperRightCoordinate Clone() {
            return ((FdoSpatialContextListSpatialContextExtentUpperRightCoordinate)(this.MemberwiseClone()));
        }
        #endregion
    }
}