#pragma warning disable 1591, 0114, 0108, 0472
// ------------------------------------------------------------------------------
//
// Generated by Xsd2Code. Version 3.3.0.33001
// OSGeo.MapGuide.ObjectModels.CommonBindingListCSharpTrueFalseTrueTrueTrueFalseTrueFalseNet20SerializeDeserializeSaveToFileLoadFromFileTrueFalseFalseFalseFalse
//
// ------------------------------------------------------------------------------
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;
///
/// Specifies an envelope (a rectangle) using two corner points.
///
[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;
///
/// Specifies the lower left corner of the envelope.
///
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");
}
}
}
///
/// Specifies the upper right corner of the envelope.
///
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
///
/// Serializes current Envelope 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 Envelope object
///
/// string workflow markup to deserialize
/// Output Envelope object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
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();
}
}
}
///
/// Serializes current Envelope 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 Envelope object
///
/// string xml file to load and deserialize
/// Output Envelope object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
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
///
/// Create a clone of this Envelope object
///
public virtual Envelope Clone() {
return ((Envelope)(this.MemberwiseClone()));
}
#endregion
}
///
/// Specifies the lower left corner of the envelope.
///
[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
///
/// Serializes current EnvelopeLowerLeftCoordinate 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 EnvelopeLowerLeftCoordinate object
///
/// string workflow markup to deserialize
/// Output EnvelopeLowerLeftCoordinate object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
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();
}
}
}
///
/// Serializes current EnvelopeLowerLeftCoordinate 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 EnvelopeLowerLeftCoordinate object
///
/// string xml file to load and deserialize
/// Output EnvelopeLowerLeftCoordinate object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
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
///
/// Create a clone of this EnvelopeLowerLeftCoordinate object
///
public virtual EnvelopeLowerLeftCoordinate Clone() {
return ((EnvelopeLowerLeftCoordinate)(this.MemberwiseClone()));
}
#endregion
}
///
/// Specifies the upper right corner of the envelope.
///
[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
///
/// Serializes current EnvelopeUpperRightCoordinate 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 EnvelopeUpperRightCoordinate object
///
/// string workflow markup to deserialize
/// Output EnvelopeUpperRightCoordinate object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
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();
}
}
}
///
/// Serializes current EnvelopeUpperRightCoordinate 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 EnvelopeUpperRightCoordinate object
///
/// string xml file to load and deserialize
/// Output EnvelopeUpperRightCoordinate object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
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
///
/// Create a clone of this EnvelopeUpperRightCoordinate object
///
public virtual EnvelopeUpperRightCoordinate Clone() {
return ((EnvelopeUpperRightCoordinate)(this.MemberwiseClone()));
}
#endregion
}
}