#pragma warning disable 1591, 0114, 0108 // ------------------------------------------------------------------------------ // // 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; /// /// Role /// [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 Role : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string descriptionField; [EditorBrowsable(EditorBrowsableState.Never)] private RoleUsers usersField; [EditorBrowsable(EditorBrowsableState.Never)] private RoleGroups groupsField; private static System.Xml.Serialization.XmlSerializer serializer; 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 RoleUsers Users { get { return this.usersField; } set { if ((this.usersField != null)) { if ((usersField.Equals(value) != true)) { this.usersField = value; this.OnPropertyChanged("Users"); } } else { this.usersField = value; this.OnPropertyChanged("Users"); } } } public RoleGroups Groups { get { return this.groupsField; } set { if ((this.groupsField != null)) { if ((groupsField.Equals(value) != true)) { this.groupsField = value; this.OnPropertyChanged("Groups"); } } else { this.groupsField = value; this.OnPropertyChanged("Groups"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(Role)); } 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 Role 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 Role object /// /// string workflow markup to deserialize /// Output Role object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out Role obj, out System.Exception exception) { exception = null; obj = default(Role); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out Role obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static Role Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((Role)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current Role 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 Role object /// /// string xml file to load and deserialize /// Output Role object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out Role obj, out System.Exception exception) { exception = null; obj = default(Role); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out Role obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static Role 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 Role object /// public virtual Role Clone() { return ((Role)(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 RoleUsers : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private BindingList userField; private static System.Xml.Serialization.XmlSerializer serializer; [System.Xml.Serialization.XmlElementAttribute("User")] public BindingList User { get { return this.userField; } set { if ((this.userField != null)) { if ((userField.Equals(value) != true)) { this.userField = value; this.OnPropertyChanged("User"); } } else { this.userField = value; this.OnPropertyChanged("User"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(RoleUsers)); } 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 RoleUsers 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 RoleUsers object /// /// string workflow markup to deserialize /// Output RoleUsers object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out RoleUsers obj, out System.Exception exception) { exception = null; obj = default(RoleUsers); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out RoleUsers obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static RoleUsers Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((RoleUsers)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current RoleUsers 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 RoleUsers object /// /// string xml file to load and deserialize /// Output RoleUsers object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out RoleUsers obj, out System.Exception exception) { exception = null; obj = default(RoleUsers); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out RoleUsers obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static RoleUsers 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 RoleUsers object /// public virtual RoleUsers Clone() { return ((RoleUsers)(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 RoleUsersUser : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string nameField; private static System.Xml.Serialization.XmlSerializer serializer; 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"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(RoleUsersUser)); } 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 RoleUsersUser 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 RoleUsersUser object /// /// string workflow markup to deserialize /// Output RoleUsersUser object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out RoleUsersUser obj, out System.Exception exception) { exception = null; obj = default(RoleUsersUser); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out RoleUsersUser obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static RoleUsersUser Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((RoleUsersUser)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current RoleUsersUser 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 RoleUsersUser object /// /// string xml file to load and deserialize /// Output RoleUsersUser object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out RoleUsersUser obj, out System.Exception exception) { exception = null; obj = default(RoleUsersUser); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out RoleUsersUser obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static RoleUsersUser 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 RoleUsersUser object /// public virtual RoleUsersUser Clone() { return ((RoleUsersUser)(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 RoleGroups : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private BindingList groupField; private static System.Xml.Serialization.XmlSerializer serializer; [System.Xml.Serialization.XmlElementAttribute("Group")] public BindingList Group { get { return this.groupField; } set { if ((this.groupField != null)) { if ((groupField.Equals(value) != true)) { this.groupField = value; this.OnPropertyChanged("Group"); } } else { this.groupField = value; this.OnPropertyChanged("Group"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(RoleGroups)); } 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 RoleGroups 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 RoleGroups object /// /// string workflow markup to deserialize /// Output RoleGroups object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out RoleGroups obj, out System.Exception exception) { exception = null; obj = default(RoleGroups); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out RoleGroups obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static RoleGroups Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((RoleGroups)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current RoleGroups 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 RoleGroups object /// /// string xml file to load and deserialize /// Output RoleGroups object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out RoleGroups obj, out System.Exception exception) { exception = null; obj = default(RoleGroups); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out RoleGroups obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static RoleGroups 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 RoleGroups object /// public virtual RoleGroups Clone() { return ((RoleGroups)(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 RoleGroupsGroup : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string nameField; private static System.Xml.Serialization.XmlSerializer serializer; 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"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(RoleGroupsGroup)); } 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 RoleGroupsGroup 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 RoleGroupsGroup object /// /// string workflow markup to deserialize /// Output RoleGroupsGroup object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out RoleGroupsGroup obj, out System.Exception exception) { exception = null; obj = default(RoleGroupsGroup); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out RoleGroupsGroup obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static RoleGroupsGroup Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((RoleGroupsGroup)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current RoleGroupsGroup 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 RoleGroupsGroup object /// /// string xml file to load and deserialize /// Output RoleGroupsGroup object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out RoleGroupsGroup obj, out System.Exception exception) { exception = null; obj = default(RoleGroupsGroup); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out RoleGroupsGroup obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static RoleGroupsGroup 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 RoleGroupsGroup object /// public virtual RoleGroupsGroup Clone() { return ((RoleGroupsGroup)(this.MemberwiseClone())); } #endregion } }