// ------------------------------------------------------------------------------
//
// Generated by Xsd2Code. Version 3.3.0.20459
// OSGeo.MapGuide.ObjectModels.CommonBindingListCSharpTrueFalseTrueTrueTrueFalseTrueFalseNet20SerializeDeserializeSaveToFileLoadFromFileTrueFalseFalseFalseTrue
//
// ------------------------------------------------------------------------------
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;
///
/// Site Information
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.20460")]
[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 SiteInformation : SiteInformationType, System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string versionField;
private static System.Xml.Serialization.XmlSerializer serializer;
public SiteInformation() {
this.versionField = "2.2.0";
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public string version {
get {
return this.versionField;
}
set {
if ((this.versionField != null)) {
if ((versionField.Equals(value) != true)) {
this.versionField = value;
this.OnPropertyChanged("version");
}
}
else {
this.versionField = value;
this.OnPropertyChanged("version");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(SiteInformation));
}
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 SiteInformation 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 SiteInformation object
///
/// string workflow markup to deserialize
/// Output SiteInformation object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out SiteInformation obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformation);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out SiteInformation obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static SiteInformation Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((SiteInformation)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current SiteInformation 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 SiteInformation object
///
/// string xml file to load and deserialize
/// Output SiteInformation object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out SiteInformation obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformation);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out SiteInformation obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static SiteInformation 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 SiteInformation object
///
public virtual SiteInformation Clone() {
return ((SiteInformation)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.20460")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
public partial class SiteInformationType : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private SiteInformationTypeServer serverField;
private static System.Xml.Serialization.XmlSerializer serializer;
///
/// SiteInformationType class constructor
///
public SiteInformationType() {
this.serverField = new SiteInformationTypeServer();
}
public SiteInformationTypeServer Server {
get {
return this.serverField;
}
set {
if ((this.serverField != null)) {
if ((serverField.Equals(value) != true)) {
this.serverField = value;
this.OnPropertyChanged("Server");
}
}
else {
this.serverField = value;
this.OnPropertyChanged("Server");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(SiteInformationType));
}
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 SiteInformationType 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 SiteInformationType object
///
/// string workflow markup to deserialize
/// Output SiteInformationType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out SiteInformationType obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformationType);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out SiteInformationType obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static SiteInformationType Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((SiteInformationType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current SiteInformationType 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 SiteInformationType object
///
/// string xml file to load and deserialize
/// Output SiteInformationType object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out SiteInformationType obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformationType);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out SiteInformationType obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static SiteInformationType 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 SiteInformationType object
///
public virtual SiteInformationType Clone() {
return ((SiteInformationType)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.20460")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class SiteInformationTypeServer : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string ipAddressField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string displayNameField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string statusField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string versionField;
[EditorBrowsable(EditorBrowsableState.Never)]
private SiteInformationTypeServerOperatingSystem operatingSystemField;
[EditorBrowsable(EditorBrowsableState.Never)]
private SiteInformationTypeServerStatistics statisticsField;
private static System.Xml.Serialization.XmlSerializer serializer;
///
/// SiteInformationTypeServer class constructor
///
public SiteInformationTypeServer() {
this.statisticsField = new SiteInformationTypeServerStatistics();
this.operatingSystemField = new SiteInformationTypeServerOperatingSystem();
}
public string IpAddress {
get {
return this.ipAddressField;
}
set {
if ((this.ipAddressField != null)) {
if ((ipAddressField.Equals(value) != true)) {
this.ipAddressField = value;
this.OnPropertyChanged("IpAddress");
}
}
else {
this.ipAddressField = value;
this.OnPropertyChanged("IpAddress");
}
}
}
public string DisplayName {
get {
return this.displayNameField;
}
set {
if ((this.displayNameField != null)) {
if ((displayNameField.Equals(value) != true)) {
this.displayNameField = value;
this.OnPropertyChanged("DisplayName");
}
}
else {
this.displayNameField = value;
this.OnPropertyChanged("DisplayName");
}
}
}
public string Status {
get {
return this.statusField;
}
set {
if ((this.statusField != null)) {
if ((statusField.Equals(value) != true)) {
this.statusField = value;
this.OnPropertyChanged("Status");
}
}
else {
this.statusField = value;
this.OnPropertyChanged("Status");
}
}
}
public string Version {
get {
return this.versionField;
}
set {
if ((this.versionField != null)) {
if ((versionField.Equals(value) != true)) {
this.versionField = value;
this.OnPropertyChanged("Version");
}
}
else {
this.versionField = value;
this.OnPropertyChanged("Version");
}
}
}
public SiteInformationTypeServerOperatingSystem OperatingSystem {
get {
return this.operatingSystemField;
}
set {
if ((this.operatingSystemField != null)) {
if ((operatingSystemField.Equals(value) != true)) {
this.operatingSystemField = value;
this.OnPropertyChanged("OperatingSystem");
}
}
else {
this.operatingSystemField = value;
this.OnPropertyChanged("OperatingSystem");
}
}
}
public SiteInformationTypeServerStatistics Statistics {
get {
return this.statisticsField;
}
set {
if ((this.statisticsField != null)) {
if ((statisticsField.Equals(value) != true)) {
this.statisticsField = value;
this.OnPropertyChanged("Statistics");
}
}
else {
this.statisticsField = value;
this.OnPropertyChanged("Statistics");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(SiteInformationTypeServer));
}
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 SiteInformationTypeServer 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 SiteInformationTypeServer object
///
/// string workflow markup to deserialize
/// Output SiteInformationTypeServer object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out SiteInformationTypeServer obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformationTypeServer);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out SiteInformationTypeServer obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static SiteInformationTypeServer Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((SiteInformationTypeServer)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current SiteInformationTypeServer 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 SiteInformationTypeServer object
///
/// string xml file to load and deserialize
/// Output SiteInformationTypeServer object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out SiteInformationTypeServer obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformationTypeServer);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out SiteInformationTypeServer obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static SiteInformationTypeServer 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 SiteInformationTypeServer object
///
public virtual SiteInformationTypeServer Clone() {
return ((SiteInformationTypeServer)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.20460")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class SiteInformationTypeServerOperatingSystem : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string availablePhysicalMemoryField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string totalPhysicalMemoryField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string availableVirtualMemoryField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string totalVirtualMemoryField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string versionField;
private static System.Xml.Serialization.XmlSerializer serializer;
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string AvailablePhysicalMemory {
get {
return this.availablePhysicalMemoryField;
}
set {
if ((this.availablePhysicalMemoryField != null)) {
if ((availablePhysicalMemoryField.Equals(value) != true)) {
this.availablePhysicalMemoryField = value;
this.OnPropertyChanged("AvailablePhysicalMemory");
}
}
else {
this.availablePhysicalMemoryField = value;
this.OnPropertyChanged("AvailablePhysicalMemory");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string TotalPhysicalMemory {
get {
return this.totalPhysicalMemoryField;
}
set {
if ((this.totalPhysicalMemoryField != null)) {
if ((totalPhysicalMemoryField.Equals(value) != true)) {
this.totalPhysicalMemoryField = value;
this.OnPropertyChanged("TotalPhysicalMemory");
}
}
else {
this.totalPhysicalMemoryField = value;
this.OnPropertyChanged("TotalPhysicalMemory");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string AvailableVirtualMemory {
get {
return this.availableVirtualMemoryField;
}
set {
if ((this.availableVirtualMemoryField != null)) {
if ((availableVirtualMemoryField.Equals(value) != true)) {
this.availableVirtualMemoryField = value;
this.OnPropertyChanged("AvailableVirtualMemory");
}
}
else {
this.availableVirtualMemoryField = value;
this.OnPropertyChanged("AvailableVirtualMemory");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string TotalVirtualMemory {
get {
return this.totalVirtualMemoryField;
}
set {
if ((this.totalVirtualMemoryField != null)) {
if ((totalVirtualMemoryField.Equals(value) != true)) {
this.totalVirtualMemoryField = value;
this.OnPropertyChanged("TotalVirtualMemory");
}
}
else {
this.totalVirtualMemoryField = value;
this.OnPropertyChanged("TotalVirtualMemory");
}
}
}
public string Version {
get {
return this.versionField;
}
set {
if ((this.versionField != null)) {
if ((versionField.Equals(value) != true)) {
this.versionField = value;
this.OnPropertyChanged("Version");
}
}
else {
this.versionField = value;
this.OnPropertyChanged("Version");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(SiteInformationTypeServerOperatingSystem));
}
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 SiteInformationTypeServerOperatingSystem 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 SiteInformationTypeServerOperatingSystem object
///
/// string workflow markup to deserialize
/// Output SiteInformationTypeServerOperatingSystem object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out SiteInformationTypeServerOperatingSystem obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformationTypeServerOperatingSystem);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out SiteInformationTypeServerOperatingSystem obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static SiteInformationTypeServerOperatingSystem Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((SiteInformationTypeServerOperatingSystem)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current SiteInformationTypeServerOperatingSystem 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 SiteInformationTypeServerOperatingSystem object
///
/// string xml file to load and deserialize
/// Output SiteInformationTypeServerOperatingSystem object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out SiteInformationTypeServerOperatingSystem obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformationTypeServerOperatingSystem);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out SiteInformationTypeServerOperatingSystem obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static SiteInformationTypeServerOperatingSystem 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 SiteInformationTypeServerOperatingSystem object
///
public virtual SiteInformationTypeServerOperatingSystem Clone() {
return ((SiteInformationTypeServerOperatingSystem)(this.MemberwiseClone()));
}
#endregion
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.20460")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class SiteInformationTypeServerStatistics : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string adminOperationsQueueCountField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string clientOperationsQueueCountField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string siteOperationsQueueCountField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string averageOperationTimeField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string cpuUtilizationField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string workingSetField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string virtualMemoryField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string totalOperationTimeField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string activeConnectionsField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string totalConnectionsField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string totalOperationsProcessedField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string totalOperationsReceivedField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string uptimeField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string cacheSizeField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string cacheDroppedEntriesField;
private static System.Xml.Serialization.XmlSerializer serializer;
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string AdminOperationsQueueCount {
get {
return this.adminOperationsQueueCountField;
}
set {
if ((this.adminOperationsQueueCountField != null)) {
if ((adminOperationsQueueCountField.Equals(value) != true)) {
this.adminOperationsQueueCountField = value;
this.OnPropertyChanged("AdminOperationsQueueCount");
}
}
else {
this.adminOperationsQueueCountField = value;
this.OnPropertyChanged("AdminOperationsQueueCount");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string ClientOperationsQueueCount {
get {
return this.clientOperationsQueueCountField;
}
set {
if ((this.clientOperationsQueueCountField != null)) {
if ((clientOperationsQueueCountField.Equals(value) != true)) {
this.clientOperationsQueueCountField = value;
this.OnPropertyChanged("ClientOperationsQueueCount");
}
}
else {
this.clientOperationsQueueCountField = value;
this.OnPropertyChanged("ClientOperationsQueueCount");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string SiteOperationsQueueCount {
get {
return this.siteOperationsQueueCountField;
}
set {
if ((this.siteOperationsQueueCountField != null)) {
if ((siteOperationsQueueCountField.Equals(value) != true)) {
this.siteOperationsQueueCountField = value;
this.OnPropertyChanged("SiteOperationsQueueCount");
}
}
else {
this.siteOperationsQueueCountField = value;
this.OnPropertyChanged("SiteOperationsQueueCount");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string AverageOperationTime {
get {
return this.averageOperationTimeField;
}
set {
if ((this.averageOperationTimeField != null)) {
if ((averageOperationTimeField.Equals(value) != true)) {
this.averageOperationTimeField = value;
this.OnPropertyChanged("AverageOperationTime");
}
}
else {
this.averageOperationTimeField = value;
this.OnPropertyChanged("AverageOperationTime");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string CpuUtilization {
get {
return this.cpuUtilizationField;
}
set {
if ((this.cpuUtilizationField != null)) {
if ((cpuUtilizationField.Equals(value) != true)) {
this.cpuUtilizationField = value;
this.OnPropertyChanged("CpuUtilization");
}
}
else {
this.cpuUtilizationField = value;
this.OnPropertyChanged("CpuUtilization");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string WorkingSet {
get {
return this.workingSetField;
}
set {
if ((this.workingSetField != null)) {
if ((workingSetField.Equals(value) != true)) {
this.workingSetField = value;
this.OnPropertyChanged("WorkingSet");
}
}
else {
this.workingSetField = value;
this.OnPropertyChanged("WorkingSet");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string VirtualMemory {
get {
return this.virtualMemoryField;
}
set {
if ((this.virtualMemoryField != null)) {
if ((virtualMemoryField.Equals(value) != true)) {
this.virtualMemoryField = value;
this.OnPropertyChanged("VirtualMemory");
}
}
else {
this.virtualMemoryField = value;
this.OnPropertyChanged("VirtualMemory");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string TotalOperationTime {
get {
return this.totalOperationTimeField;
}
set {
if ((this.totalOperationTimeField != null)) {
if ((totalOperationTimeField.Equals(value) != true)) {
this.totalOperationTimeField = value;
this.OnPropertyChanged("TotalOperationTime");
}
}
else {
this.totalOperationTimeField = value;
this.OnPropertyChanged("TotalOperationTime");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string ActiveConnections {
get {
return this.activeConnectionsField;
}
set {
if ((this.activeConnectionsField != null)) {
if ((activeConnectionsField.Equals(value) != true)) {
this.activeConnectionsField = value;
this.OnPropertyChanged("ActiveConnections");
}
}
else {
this.activeConnectionsField = value;
this.OnPropertyChanged("ActiveConnections");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string TotalConnections {
get {
return this.totalConnectionsField;
}
set {
if ((this.totalConnectionsField != null)) {
if ((totalConnectionsField.Equals(value) != true)) {
this.totalConnectionsField = value;
this.OnPropertyChanged("TotalConnections");
}
}
else {
this.totalConnectionsField = value;
this.OnPropertyChanged("TotalConnections");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string TotalOperationsProcessed {
get {
return this.totalOperationsProcessedField;
}
set {
if ((this.totalOperationsProcessedField != null)) {
if ((totalOperationsProcessedField.Equals(value) != true)) {
this.totalOperationsProcessedField = value;
this.OnPropertyChanged("TotalOperationsProcessed");
}
}
else {
this.totalOperationsProcessedField = value;
this.OnPropertyChanged("TotalOperationsProcessed");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string TotalOperationsReceived {
get {
return this.totalOperationsReceivedField;
}
set {
if ((this.totalOperationsReceivedField != null)) {
if ((totalOperationsReceivedField.Equals(value) != true)) {
this.totalOperationsReceivedField = value;
this.OnPropertyChanged("TotalOperationsReceived");
}
}
else {
this.totalOperationsReceivedField = value;
this.OnPropertyChanged("TotalOperationsReceived");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string Uptime {
get {
return this.uptimeField;
}
set {
if ((this.uptimeField != null)) {
if ((uptimeField.Equals(value) != true)) {
this.uptimeField = value;
this.OnPropertyChanged("Uptime");
}
}
else {
this.uptimeField = value;
this.OnPropertyChanged("Uptime");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string CacheSize {
get {
return this.cacheSizeField;
}
set {
if ((this.cacheSizeField != null)) {
if ((cacheSizeField.Equals(value) != true)) {
this.cacheSizeField = value;
this.OnPropertyChanged("CacheSize");
}
}
else {
this.cacheSizeField = value;
this.OnPropertyChanged("CacheSize");
}
}
}
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string CacheDroppedEntries {
get {
return this.cacheDroppedEntriesField;
}
set {
if ((this.cacheDroppedEntriesField != null)) {
if ((cacheDroppedEntriesField.Equals(value) != true)) {
this.cacheDroppedEntriesField = value;
this.OnPropertyChanged("CacheDroppedEntries");
}
}
else {
this.cacheDroppedEntriesField = value;
this.OnPropertyChanged("CacheDroppedEntries");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(SiteInformationTypeServerStatistics));
}
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 SiteInformationTypeServerStatistics 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 SiteInformationTypeServerStatistics object
///
/// string workflow markup to deserialize
/// Output SiteInformationTypeServerStatistics object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out SiteInformationTypeServerStatistics obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformationTypeServerStatistics);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out SiteInformationTypeServerStatistics obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static SiteInformationTypeServerStatistics Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((SiteInformationTypeServerStatistics)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current SiteInformationTypeServerStatistics 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 SiteInformationTypeServerStatistics object
///
/// string xml file to load and deserialize
/// Output SiteInformationTypeServerStatistics object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out SiteInformationTypeServerStatistics obj, out System.Exception exception) {
exception = null;
obj = default(SiteInformationTypeServerStatistics);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out SiteInformationTypeServerStatistics obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static SiteInformationTypeServerStatistics 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 SiteInformationTypeServerStatistics object
///
public virtual SiteInformationTypeServerStatistics Clone() {
return ((SiteInformationTypeServerStatistics)(this.MemberwiseClone()));
}
#endregion
}
}