#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; [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute("ResourceFolderHeader", Namespace="", IsNullable=false)] public partial class ResourceFolderHeaderType : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private ResourceSecurityType securityField; private static System.Xml.Serialization.XmlSerializer serializer; public ResourceSecurityType Security { get { return this.securityField; } set { if ((this.securityField != null)) { if ((securityField.Equals(value) != true)) { this.securityField = value; this.OnPropertyChanged("Security"); } } else { this.securityField = value; this.OnPropertyChanged("Security"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceFolderHeaderType)); } 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 ResourceFolderHeaderType 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 ResourceFolderHeaderType object /// /// string workflow markup to deserialize /// Output ResourceFolderHeaderType object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceFolderHeaderType obj, out System.Exception exception) { exception = null; obj = default(ResourceFolderHeaderType); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceFolderHeaderType obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceFolderHeaderType Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceFolderHeaderType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceFolderHeaderType 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 ResourceFolderHeaderType object /// /// string xml file to load and deserialize /// Output ResourceFolderHeaderType object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceFolderHeaderType obj, out System.Exception exception) { exception = null; obj = default(ResourceFolderHeaderType); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceFolderHeaderType obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceFolderHeaderType 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 ResourceFolderHeaderType object /// public virtual ResourceFolderHeaderType Clone() { return ((ResourceFolderHeaderType)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class ResourceSecurityType : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private bool inheritedField; [EditorBrowsable(EditorBrowsableState.Never)] private ResourceSecurityTypeUsers usersField; [EditorBrowsable(EditorBrowsableState.Never)] private ResourceSecurityTypeGroups groupsField; private static System.Xml.Serialization.XmlSerializer serializer; public bool Inherited { get { return this.inheritedField; } set { if ((inheritedField.Equals(value) != true)) { this.inheritedField = value; this.OnPropertyChanged("Inherited"); } } } public ResourceSecurityTypeUsers 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 ResourceSecurityTypeGroups 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(ResourceSecurityType)); } 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 ResourceSecurityType 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 ResourceSecurityType object /// /// string workflow markup to deserialize /// Output ResourceSecurityType object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceSecurityType obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityType); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceSecurityType obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceSecurityType Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceSecurityType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceSecurityType 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 ResourceSecurityType object /// /// string xml file to load and deserialize /// Output ResourceSecurityType object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceSecurityType obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityType); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceSecurityType obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceSecurityType 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 ResourceSecurityType object /// public virtual ResourceSecurityType Clone() { return ((ResourceSecurityType)(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 ResourceSecurityTypeUsers : 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(ResourceSecurityTypeUsers)); } 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 ResourceSecurityTypeUsers 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 ResourceSecurityTypeUsers object /// /// string workflow markup to deserialize /// Output ResourceSecurityTypeUsers object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceSecurityTypeUsers obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityTypeUsers); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceSecurityTypeUsers obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceSecurityTypeUsers Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceSecurityTypeUsers)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceSecurityTypeUsers 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 ResourceSecurityTypeUsers object /// /// string xml file to load and deserialize /// Output ResourceSecurityTypeUsers object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceSecurityTypeUsers obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityTypeUsers); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceSecurityTypeUsers obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceSecurityTypeUsers 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 ResourceSecurityTypeUsers object /// public virtual ResourceSecurityTypeUsers Clone() { return ((ResourceSecurityTypeUsers)(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 ResourceSecurityTypeUsersUser : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string nameField; [EditorBrowsable(EditorBrowsableState.Never)] private PermissionsType permissionsField; 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"); } } } public PermissionsType Permissions { get { return this.permissionsField; } set { if ((permissionsField.Equals(value) != true)) { this.permissionsField = value; this.OnPropertyChanged("Permissions"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceSecurityTypeUsersUser)); } 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 ResourceSecurityTypeUsersUser 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 ResourceSecurityTypeUsersUser object /// /// string workflow markup to deserialize /// Output ResourceSecurityTypeUsersUser object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceSecurityTypeUsersUser obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityTypeUsersUser); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceSecurityTypeUsersUser obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceSecurityTypeUsersUser Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceSecurityTypeUsersUser)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceSecurityTypeUsersUser 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 ResourceSecurityTypeUsersUser object /// /// string xml file to load and deserialize /// Output ResourceSecurityTypeUsersUser object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceSecurityTypeUsersUser obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityTypeUsersUser); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceSecurityTypeUsersUser obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceSecurityTypeUsersUser 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 ResourceSecurityTypeUsersUser object /// public virtual ResourceSecurityTypeUsersUser Clone() { return ((ResourceSecurityTypeUsersUser)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] public enum PermissionsType { /// n, /// r, /// [System.Xml.Serialization.XmlEnumAttribute("r,w")] rw, } [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 ResourceSecurityTypeGroups : 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(ResourceSecurityTypeGroups)); } 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 ResourceSecurityTypeGroups 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 ResourceSecurityTypeGroups object /// /// string workflow markup to deserialize /// Output ResourceSecurityTypeGroups object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceSecurityTypeGroups obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityTypeGroups); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceSecurityTypeGroups obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceSecurityTypeGroups Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceSecurityTypeGroups)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceSecurityTypeGroups 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 ResourceSecurityTypeGroups object /// /// string xml file to load and deserialize /// Output ResourceSecurityTypeGroups object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceSecurityTypeGroups obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityTypeGroups); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceSecurityTypeGroups obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceSecurityTypeGroups 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 ResourceSecurityTypeGroups object /// public virtual ResourceSecurityTypeGroups Clone() { return ((ResourceSecurityTypeGroups)(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 ResourceSecurityTypeGroupsGroup : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string nameField; [EditorBrowsable(EditorBrowsableState.Never)] private PermissionsType permissionsField; 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"); } } } public PermissionsType Permissions { get { return this.permissionsField; } set { if ((permissionsField.Equals(value) != true)) { this.permissionsField = value; this.OnPropertyChanged("Permissions"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceSecurityTypeGroupsGroup)); } 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 ResourceSecurityTypeGroupsGroup 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 ResourceSecurityTypeGroupsGroup object /// /// string workflow markup to deserialize /// Output ResourceSecurityTypeGroupsGroup object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceSecurityTypeGroupsGroup obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityTypeGroupsGroup); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceSecurityTypeGroupsGroup obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceSecurityTypeGroupsGroup Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceSecurityTypeGroupsGroup)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceSecurityTypeGroupsGroup 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 ResourceSecurityTypeGroupsGroup object /// /// string xml file to load and deserialize /// Output ResourceSecurityTypeGroupsGroup object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceSecurityTypeGroupsGroup obj, out System.Exception exception) { exception = null; obj = default(ResourceSecurityTypeGroupsGroup); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceSecurityTypeGroupsGroup obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceSecurityTypeGroupsGroup 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 ResourceSecurityTypeGroupsGroup object /// public virtual ResourceSecurityTypeGroupsGroup Clone() { return ((ResourceSecurityTypeGroupsGroup)(this.MemberwiseClone())); } #endregion } [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlRootAttribute("ResourceDocumentHeader", Namespace="", IsNullable=false)] public partial class ResourceDocumentHeaderType : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private ResourceDocumentHeaderTypeGeneral generalField; [EditorBrowsable(EditorBrowsableState.Never)] private ResourceSecurityType securityField; [EditorBrowsable(EditorBrowsableState.Never)] private ResourceDocumentHeaderTypeMetadata metadataField; private static System.Xml.Serialization.XmlSerializer serializer; public ResourceDocumentHeaderTypeGeneral General { get { return this.generalField; } set { if ((this.generalField != null)) { if ((generalField.Equals(value) != true)) { this.generalField = value; this.OnPropertyChanged("General"); } } else { this.generalField = value; this.OnPropertyChanged("General"); } } } public ResourceSecurityType Security { get { return this.securityField; } set { if ((this.securityField != null)) { if ((securityField.Equals(value) != true)) { this.securityField = value; this.OnPropertyChanged("Security"); } } else { this.securityField = value; this.OnPropertyChanged("Security"); } } } public ResourceDocumentHeaderTypeMetadata Metadata { get { return this.metadataField; } set { if ((this.metadataField != null)) { if ((metadataField.Equals(value) != true)) { this.metadataField = value; this.OnPropertyChanged("Metadata"); } } else { this.metadataField = value; this.OnPropertyChanged("Metadata"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceDocumentHeaderType)); } 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 ResourceDocumentHeaderType 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 ResourceDocumentHeaderType object /// /// string workflow markup to deserialize /// Output ResourceDocumentHeaderType object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceDocumentHeaderType obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderType); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceDocumentHeaderType obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceDocumentHeaderType Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceDocumentHeaderType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceDocumentHeaderType 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 ResourceDocumentHeaderType object /// /// string xml file to load and deserialize /// Output ResourceDocumentHeaderType object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderType obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderType); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderType obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceDocumentHeaderType 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 ResourceDocumentHeaderType object /// public virtual ResourceDocumentHeaderType Clone() { return ((ResourceDocumentHeaderType)(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 ResourceDocumentHeaderTypeGeneral : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string iconNameField; private static System.Xml.Serialization.XmlSerializer serializer; public string IconName { get { return this.iconNameField; } set { if ((this.iconNameField != null)) { if ((iconNameField.Equals(value) != true)) { this.iconNameField = value; this.OnPropertyChanged("IconName"); } } else { this.iconNameField = value; this.OnPropertyChanged("IconName"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceDocumentHeaderTypeGeneral)); } 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 ResourceDocumentHeaderTypeGeneral 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 ResourceDocumentHeaderTypeGeneral object /// /// string workflow markup to deserialize /// Output ResourceDocumentHeaderTypeGeneral object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceDocumentHeaderTypeGeneral obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderTypeGeneral); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceDocumentHeaderTypeGeneral obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceDocumentHeaderTypeGeneral Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceDocumentHeaderTypeGeneral)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceDocumentHeaderTypeGeneral 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 ResourceDocumentHeaderTypeGeneral object /// /// string xml file to load and deserialize /// Output ResourceDocumentHeaderTypeGeneral object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderTypeGeneral obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderTypeGeneral); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderTypeGeneral obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceDocumentHeaderTypeGeneral 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 ResourceDocumentHeaderTypeGeneral object /// public virtual ResourceDocumentHeaderTypeGeneral Clone() { return ((ResourceDocumentHeaderTypeGeneral)(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 ResourceDocumentHeaderTypeMetadata : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private ResourceDocumentHeaderTypeMetadataSimple simpleField; private static System.Xml.Serialization.XmlSerializer serializer; public ResourceDocumentHeaderTypeMetadataSimple Simple { get { return this.simpleField; } set { if ((this.simpleField != null)) { if ((simpleField.Equals(value) != true)) { this.simpleField = value; this.OnPropertyChanged("Simple"); } } else { this.simpleField = value; this.OnPropertyChanged("Simple"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceDocumentHeaderTypeMetadata)); } 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 ResourceDocumentHeaderTypeMetadata 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 ResourceDocumentHeaderTypeMetadata object /// /// string workflow markup to deserialize /// Output ResourceDocumentHeaderTypeMetadata object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceDocumentHeaderTypeMetadata obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderTypeMetadata); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceDocumentHeaderTypeMetadata obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceDocumentHeaderTypeMetadata Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceDocumentHeaderTypeMetadata)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceDocumentHeaderTypeMetadata 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 ResourceDocumentHeaderTypeMetadata object /// /// string xml file to load and deserialize /// Output ResourceDocumentHeaderTypeMetadata object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderTypeMetadata obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderTypeMetadata); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderTypeMetadata obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceDocumentHeaderTypeMetadata 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 ResourceDocumentHeaderTypeMetadata object /// public virtual ResourceDocumentHeaderTypeMetadata Clone() { return ((ResourceDocumentHeaderTypeMetadata)(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 ResourceDocumentHeaderTypeMetadataSimple : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private BindingList propertyField; private static System.Xml.Serialization.XmlSerializer serializer; [System.Xml.Serialization.XmlElementAttribute("Property")] public BindingList Property { get { return this.propertyField; } set { if ((this.propertyField != null)) { if ((propertyField.Equals(value) != true)) { this.propertyField = value; this.OnPropertyChanged("Property"); } } else { this.propertyField = value; this.OnPropertyChanged("Property"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceDocumentHeaderTypeMetadataSimple)); } 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 ResourceDocumentHeaderTypeMetadataSimple 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 ResourceDocumentHeaderTypeMetadataSimple object /// /// string workflow markup to deserialize /// Output ResourceDocumentHeaderTypeMetadataSimple object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceDocumentHeaderTypeMetadataSimple obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderTypeMetadataSimple); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceDocumentHeaderTypeMetadataSimple obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceDocumentHeaderTypeMetadataSimple Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceDocumentHeaderTypeMetadataSimple)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceDocumentHeaderTypeMetadataSimple 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 ResourceDocumentHeaderTypeMetadataSimple object /// /// string xml file to load and deserialize /// Output ResourceDocumentHeaderTypeMetadataSimple object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderTypeMetadataSimple obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderTypeMetadataSimple); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderTypeMetadataSimple obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceDocumentHeaderTypeMetadataSimple 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 ResourceDocumentHeaderTypeMetadataSimple object /// public virtual ResourceDocumentHeaderTypeMetadataSimple Clone() { return ((ResourceDocumentHeaderTypeMetadataSimple)(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 ResourceDocumentHeaderTypeMetadataSimpleProperty : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string nameField; [EditorBrowsable(EditorBrowsableState.Never)] private string valueField; 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"); } } } public string Value { get { return this.valueField; } set { if ((this.valueField != null)) { if ((valueField.Equals(value) != true)) { this.valueField = value; this.OnPropertyChanged("Value"); } } else { this.valueField = value; this.OnPropertyChanged("Value"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceDocumentHeaderTypeMetadataSimpleProperty)); } 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 ResourceDocumentHeaderTypeMetadataSimpleProperty 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 ResourceDocumentHeaderTypeMetadataSimpleProperty object /// /// string workflow markup to deserialize /// Output ResourceDocumentHeaderTypeMetadataSimpleProperty object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceDocumentHeaderTypeMetadataSimpleProperty obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderTypeMetadataSimpleProperty); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceDocumentHeaderTypeMetadataSimpleProperty obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceDocumentHeaderTypeMetadataSimpleProperty Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceDocumentHeaderTypeMetadataSimpleProperty)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceDocumentHeaderTypeMetadataSimpleProperty 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 ResourceDocumentHeaderTypeMetadataSimpleProperty object /// /// string xml file to load and deserialize /// Output ResourceDocumentHeaderTypeMetadataSimpleProperty object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderTypeMetadataSimpleProperty obj, out System.Exception exception) { exception = null; obj = default(ResourceDocumentHeaderTypeMetadataSimpleProperty); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceDocumentHeaderTypeMetadataSimpleProperty obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceDocumentHeaderTypeMetadataSimpleProperty 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 ResourceDocumentHeaderTypeMetadataSimpleProperty object /// public virtual ResourceDocumentHeaderTypeMetadataSimpleProperty Clone() { return ((ResourceDocumentHeaderTypeMetadataSimpleProperty)(this.MemberwiseClone())); } #endregion } /// /// Resource list /// [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 ResourceList : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private BindingList itemsField; private static System.Xml.Serialization.XmlSerializer serializer; [System.Xml.Serialization.XmlElementAttribute("ResourceDocument", typeof(ResourceListResourceDocument))] [System.Xml.Serialization.XmlElementAttribute("ResourceFolder", typeof(ResourceListResourceFolder))] public BindingList Items { get { return this.itemsField; } set { if ((this.itemsField != null)) { if ((itemsField.Equals(value) != true)) { this.itemsField = value; this.OnPropertyChanged("Items"); } } else { this.itemsField = value; this.OnPropertyChanged("Items"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceList)); } 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 ResourceList 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 ResourceList object /// /// string workflow markup to deserialize /// Output ResourceList object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceList obj, out System.Exception exception) { exception = null; obj = default(ResourceList); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceList obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceList Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceList)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceList 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 ResourceList object /// /// string xml file to load and deserialize /// Output ResourceList object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceList obj, out System.Exception exception) { exception = null; obj = default(ResourceList); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceList obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceList 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 ResourceList object /// public virtual ResourceList Clone() { return ((ResourceList)(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 ResourceListResourceDocument : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string resourceIdField; [EditorBrowsable(EditorBrowsableState.Never)] private string depthField; [EditorBrowsable(EditorBrowsableState.Never)] private string ownerField; [EditorBrowsable(EditorBrowsableState.Never)] private System.DateTime createdDateField; [EditorBrowsable(EditorBrowsableState.Never)] private System.DateTime modifiedDateField; [EditorBrowsable(EditorBrowsableState.Never)] private ResourceDocumentHeaderType resourceDocumentHeaderField; private static System.Xml.Serialization.XmlSerializer serializer; public string ResourceId { get { return this.resourceIdField; } set { if ((this.resourceIdField != null)) { if ((resourceIdField.Equals(value) != true)) { this.resourceIdField = value; this.OnPropertyChanged("ResourceId"); } } else { this.resourceIdField = value; this.OnPropertyChanged("ResourceId"); } } } [System.Xml.Serialization.XmlElementAttribute(DataType="integer")] public string Depth { get { return this.depthField; } set { if ((this.depthField != null)) { if ((depthField.Equals(value) != true)) { this.depthField = value; this.OnPropertyChanged("Depth"); } } else { this.depthField = value; this.OnPropertyChanged("Depth"); } } } public string Owner { get { return this.ownerField; } set { if ((this.ownerField != null)) { if ((ownerField.Equals(value) != true)) { this.ownerField = value; this.OnPropertyChanged("Owner"); } } else { this.ownerField = value; this.OnPropertyChanged("Owner"); } } } public System.DateTime CreatedDate { get { return this.createdDateField; } set { if ((createdDateField.Equals(value) != true)) { this.createdDateField = value; this.OnPropertyChanged("CreatedDate"); } } } public System.DateTime ModifiedDate { get { return this.modifiedDateField; } set { if ((modifiedDateField.Equals(value) != true)) { this.modifiedDateField = value; this.OnPropertyChanged("ModifiedDate"); } } } public ResourceDocumentHeaderType ResourceDocumentHeader { get { return this.resourceDocumentHeaderField; } set { if ((this.resourceDocumentHeaderField != null)) { if ((resourceDocumentHeaderField.Equals(value) != true)) { this.resourceDocumentHeaderField = value; this.OnPropertyChanged("ResourceDocumentHeader"); } } else { this.resourceDocumentHeaderField = value; this.OnPropertyChanged("ResourceDocumentHeader"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceListResourceDocument)); } 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 ResourceListResourceDocument 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 ResourceListResourceDocument object /// /// string workflow markup to deserialize /// Output ResourceListResourceDocument object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceListResourceDocument obj, out System.Exception exception) { exception = null; obj = default(ResourceListResourceDocument); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceListResourceDocument obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceListResourceDocument Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceListResourceDocument)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceListResourceDocument 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 ResourceListResourceDocument object /// /// string xml file to load and deserialize /// Output ResourceListResourceDocument object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceListResourceDocument obj, out System.Exception exception) { exception = null; obj = default(ResourceListResourceDocument); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceListResourceDocument obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceListResourceDocument 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 ResourceListResourceDocument object /// public virtual ResourceListResourceDocument Clone() { return ((ResourceListResourceDocument)(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 ResourceListResourceFolder : System.ComponentModel.INotifyPropertyChanged { [EditorBrowsable(EditorBrowsableState.Never)] private string resourceIdField; [EditorBrowsable(EditorBrowsableState.Never)] private string depthField; [EditorBrowsable(EditorBrowsableState.Never)] private string ownerField; [EditorBrowsable(EditorBrowsableState.Never)] private System.DateTime createdDateField; [EditorBrowsable(EditorBrowsableState.Never)] private System.DateTime modifiedDateField; [EditorBrowsable(EditorBrowsableState.Never)] private string numberOfFoldersField; [EditorBrowsable(EditorBrowsableState.Never)] private string numberOfDocumentsField; [EditorBrowsable(EditorBrowsableState.Never)] private ResourceFolderHeaderType resourceFolderHeaderField; private static System.Xml.Serialization.XmlSerializer serializer; public string ResourceId { get { return this.resourceIdField; } set { if ((this.resourceIdField != null)) { if ((resourceIdField.Equals(value) != true)) { this.resourceIdField = value; this.OnPropertyChanged("ResourceId"); } } else { this.resourceIdField = value; this.OnPropertyChanged("ResourceId"); } } } [System.Xml.Serialization.XmlElementAttribute(DataType="integer")] public string Depth { get { return this.depthField; } set { if ((this.depthField != null)) { if ((depthField.Equals(value) != true)) { this.depthField = value; this.OnPropertyChanged("Depth"); } } else { this.depthField = value; this.OnPropertyChanged("Depth"); } } } public string Owner { get { return this.ownerField; } set { if ((this.ownerField != null)) { if ((ownerField.Equals(value) != true)) { this.ownerField = value; this.OnPropertyChanged("Owner"); } } else { this.ownerField = value; this.OnPropertyChanged("Owner"); } } } public System.DateTime CreatedDate { get { return this.createdDateField; } set { if ((createdDateField.Equals(value) != true)) { this.createdDateField = value; this.OnPropertyChanged("CreatedDate"); } } } public System.DateTime ModifiedDate { get { return this.modifiedDateField; } set { if ((modifiedDateField.Equals(value) != true)) { this.modifiedDateField = value; this.OnPropertyChanged("ModifiedDate"); } } } [System.Xml.Serialization.XmlElementAttribute(DataType="integer")] public string NumberOfFolders { get { return this.numberOfFoldersField; } set { if ((this.numberOfFoldersField != null)) { if ((numberOfFoldersField.Equals(value) != true)) { this.numberOfFoldersField = value; this.OnPropertyChanged("NumberOfFolders"); } } else { this.numberOfFoldersField = value; this.OnPropertyChanged("NumberOfFolders"); } } } [System.Xml.Serialization.XmlElementAttribute(DataType="integer")] public string NumberOfDocuments { get { return this.numberOfDocumentsField; } set { if ((this.numberOfDocumentsField != null)) { if ((numberOfDocumentsField.Equals(value) != true)) { this.numberOfDocumentsField = value; this.OnPropertyChanged("NumberOfDocuments"); } } else { this.numberOfDocumentsField = value; this.OnPropertyChanged("NumberOfDocuments"); } } } public ResourceFolderHeaderType ResourceFolderHeader { get { return this.resourceFolderHeaderField; } set { if ((this.resourceFolderHeaderField != null)) { if ((resourceFolderHeaderField.Equals(value) != true)) { this.resourceFolderHeaderField = value; this.OnPropertyChanged("ResourceFolderHeader"); } } else { this.resourceFolderHeaderField = value; this.OnPropertyChanged("ResourceFolderHeader"); } } } private static System.Xml.Serialization.XmlSerializer Serializer { get { if ((serializer == null)) { serializer = new System.Xml.Serialization.XmlSerializer(typeof(ResourceListResourceFolder)); } 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 ResourceListResourceFolder 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 ResourceListResourceFolder object /// /// string workflow markup to deserialize /// Output ResourceListResourceFolder object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool Deserialize(string xml, out ResourceListResourceFolder obj, out System.Exception exception) { exception = null; obj = default(ResourceListResourceFolder); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool Deserialize(string xml, out ResourceListResourceFolder obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); } public static ResourceListResourceFolder Deserialize(string xml) { System.IO.StringReader stringReader = null; try { stringReader = new System.IO.StringReader(xml); return ((ResourceListResourceFolder)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader)))); } finally { if ((stringReader != null)) { stringReader.Dispose(); } } } /// /// Serializes current ResourceListResourceFolder 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 ResourceListResourceFolder object /// /// string xml file to load and deserialize /// Output ResourceListResourceFolder object /// output Exception value if deserialize failed /// true if this XmlSerializer can deserialize the object; otherwise, false public static bool LoadFromFile(string fileName, out ResourceListResourceFolder obj, out System.Exception exception) { exception = null; obj = default(ResourceListResourceFolder); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } } public static bool LoadFromFile(string fileName, out ResourceListResourceFolder obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); } public static ResourceListResourceFolder 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 ResourceListResourceFolder object /// public virtual ResourceListResourceFolder Clone() { return ((ResourceListResourceFolder)(this.MemberwiseClone())); } #endregion } }