#pragma warning disable 1591, 0114, 0108, 1570
// ------------------------------------------------------------------------------
//
// Generated by Xsd2Code. Version 3.3.0.33001
// OSGeo.MapGuide.ObjectModels.CommonBindingListCSharpTrueFalseTrueTrueTrueFalseTrueFalseNet20SerializeDeserializeSaveToFileLoadFromFileTrueFalseFalseFalseFalse
//
// ------------------------------------------------------------------------------
namespace OSGeo.MapGuide.ObjectModels.Common
{
using System.ComponentModel;
using System.IO;
///
/// Root element that contains a collection of FeatureProvider elements.
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.3.0.33572")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
public partial class FeatureProviderRegistry : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private BindingList featureProviderField;
private static System.Xml.Serialization.XmlSerializer serializer;
///
/// Describes an installed feature provider.
///
[System.Xml.Serialization.XmlElementAttribute("FeatureProvider")]
public BindingList FeatureProvider {
get {
return this.featureProviderField;
}
set {
if ((this.featureProviderField != null)) {
if ((featureProviderField.Equals(value) != true)) {
this.featureProviderField = value;
this.OnPropertyChanged("FeatureProvider");
}
}
else {
this.featureProviderField = value;
this.OnPropertyChanged("FeatureProvider");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(FeatureProviderRegistry));
}
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 FeatureProviderRegistry 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 FeatureProviderRegistry object
///
/// string workflow markup to deserialize
/// Output FeatureProviderRegistry object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out FeatureProviderRegistry obj, out System.Exception exception) {
exception = null;
obj = default(FeatureProviderRegistry);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out FeatureProviderRegistry obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static FeatureProviderRegistry Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((FeatureProviderRegistry)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current FeatureProviderRegistry 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 FeatureProviderRegistry object
///
/// string xml file to load and deserialize
/// Output FeatureProviderRegistry object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out FeatureProviderRegistry obj, out System.Exception exception) {
exception = null;
obj = default(FeatureProviderRegistry);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out FeatureProviderRegistry obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static FeatureProviderRegistry 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 FeatureProviderRegistry object
///
public virtual FeatureProviderRegistry Clone() {
return ((FeatureProviderRegistry)(this.MemberwiseClone()));
}
#endregion
}
///
/// Describes an installed feature provider.
///
[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 FeatureProviderRegistryFeatureProvider : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string nameField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string displayNameField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string descriptionField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string versionField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string featureDataObjectsVersionField;
[EditorBrowsable(EditorBrowsableState.Never)]
private BindingList connectionPropertiesField;
private static System.Xml.Serialization.XmlSerializer serializer;
///
/// Unique name of the feature provider. This name should be of the form ..lt;Version>.
///
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");
}
}
}
///
/// A user friendly display name of the feature provider.
///
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");
}
}
}
///
/// A brief description of the feature provider.
///
public string Description {
get {
return this.descriptionField;
}
set {
if ((this.descriptionField != null)) {
if ((descriptionField.Equals(value) != true)) {
this.descriptionField = value;
this.OnPropertyChanged("Description");
}
}
else {
this.descriptionField = value;
this.OnPropertyChanged("Description");
}
}
}
///
/// The version of the feature provider. The version number string has the form ....
///
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");
}
}
}
///
/// The version of the feature data objects specification the feature provider conforms to. The version number string has the form ....
///
public string FeatureDataObjectsVersion {
get {
return this.featureDataObjectsVersionField;
}
set {
if ((this.featureDataObjectsVersionField != null)) {
if ((featureDataObjectsVersionField.Equals(value) != true)) {
this.featureDataObjectsVersionField = value;
this.OnPropertyChanged("FeatureDataObjectsVersion");
}
}
else {
this.featureDataObjectsVersionField = value;
this.OnPropertyChanged("FeatureDataObjectsVersion");
}
}
}
///
/// Connection properties for each provider with default values will be listed here.
///
[System.Xml.Serialization.XmlArrayItemAttribute("ConnectionProperty", IsNullable=false)]
public BindingList ConnectionProperties {
get {
return this.connectionPropertiesField;
}
set {
if ((this.connectionPropertiesField != null)) {
if ((connectionPropertiesField.Equals(value) != true)) {
this.connectionPropertiesField = value;
this.OnPropertyChanged("ConnectionProperties");
}
}
else {
this.connectionPropertiesField = value;
this.OnPropertyChanged("ConnectionProperties");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(FeatureProviderRegistryFeatureProvider));
}
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 FeatureProviderRegistryFeatureProvider 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 FeatureProviderRegistryFeatureProvider object
///
/// string workflow markup to deserialize
/// Output FeatureProviderRegistryFeatureProvider object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out FeatureProviderRegistryFeatureProvider obj, out System.Exception exception) {
exception = null;
obj = default(FeatureProviderRegistryFeatureProvider);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out FeatureProviderRegistryFeatureProvider obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static FeatureProviderRegistryFeatureProvider Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((FeatureProviderRegistryFeatureProvider)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current FeatureProviderRegistryFeatureProvider 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 FeatureProviderRegistryFeatureProvider object
///
/// string xml file to load and deserialize
/// Output FeatureProviderRegistryFeatureProvider object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out FeatureProviderRegistryFeatureProvider obj, out System.Exception exception) {
exception = null;
obj = default(FeatureProviderRegistryFeatureProvider);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out FeatureProviderRegistryFeatureProvider obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static FeatureProviderRegistryFeatureProvider 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 FeatureProviderRegistryFeatureProvider object
///
public virtual FeatureProviderRegistryFeatureProvider Clone() {
return ((FeatureProviderRegistryFeatureProvider)(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 FeatureProviderRegistryFeatureProviderConnectionProperty : System.ComponentModel.INotifyPropertyChanged {
[EditorBrowsable(EditorBrowsableState.Never)]
private string nameField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string localizedNameField;
[EditorBrowsable(EditorBrowsableState.Never)]
private string defaultValueField;
[EditorBrowsable(EditorBrowsableState.Never)]
private BindingList valueField;
[EditorBrowsable(EditorBrowsableState.Never)]
private bool requiredField;
[EditorBrowsable(EditorBrowsableState.Never)]
private bool protectedField;
[EditorBrowsable(EditorBrowsableState.Never)]
private bool enumerableField;
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 LocalizedName {
get {
return this.localizedNameField;
}
set {
if ((this.localizedNameField != null)) {
if ((localizedNameField.Equals(value) != true)) {
this.localizedNameField = value;
this.OnPropertyChanged("LocalizedName");
}
}
else {
this.localizedNameField = value;
this.OnPropertyChanged("LocalizedName");
}
}
}
public string DefaultValue {
get {
return this.defaultValueField;
}
set {
if ((this.defaultValueField != null)) {
if ((defaultValueField.Equals(value) != true)) {
this.defaultValueField = value;
this.OnPropertyChanged("DefaultValue");
}
}
else {
this.defaultValueField = value;
this.OnPropertyChanged("DefaultValue");
}
}
}
[System.Xml.Serialization.XmlElementAttribute("Value")]
public BindingList 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");
}
}
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public bool Required {
get {
return this.requiredField;
}
set {
if ((requiredField.Equals(value) != true)) {
this.requiredField = value;
this.OnPropertyChanged("Required");
}
}
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public bool Protected {
get {
return this.protectedField;
}
set {
if ((protectedField.Equals(value) != true)) {
this.protectedField = value;
this.OnPropertyChanged("Protected");
}
}
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public bool Enumerable {
get {
return this.enumerableField;
}
set {
if ((enumerableField.Equals(value) != true)) {
this.enumerableField = value;
this.OnPropertyChanged("Enumerable");
}
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(FeatureProviderRegistryFeatureProviderConnectionProperty));
}
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 FeatureProviderRegistryFeatureProviderConnectionProperty 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 FeatureProviderRegistryFeatureProviderConnectionProperty object
///
/// string workflow markup to deserialize
/// Output FeatureProviderRegistryFeatureProviderConnectionProperty object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool Deserialize(string xml, out FeatureProviderRegistryFeatureProviderConnectionProperty obj, out System.Exception exception) {
exception = null;
obj = default(FeatureProviderRegistryFeatureProviderConnectionProperty);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out FeatureProviderRegistryFeatureProviderConnectionProperty obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static FeatureProviderRegistryFeatureProviderConnectionProperty Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((FeatureProviderRegistryFeatureProviderConnectionProperty)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
///
/// Serializes current FeatureProviderRegistryFeatureProviderConnectionProperty 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 FeatureProviderRegistryFeatureProviderConnectionProperty object
///
/// string xml file to load and deserialize
/// Output FeatureProviderRegistryFeatureProviderConnectionProperty object
/// output Exception value if deserialize failed
/// true if this XmlSerializer can deserialize the object; otherwise, false
public static bool LoadFromFile(string fileName, out FeatureProviderRegistryFeatureProviderConnectionProperty obj, out System.Exception exception) {
exception = null;
obj = default(FeatureProviderRegistryFeatureProviderConnectionProperty);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out FeatureProviderRegistryFeatureProviderConnectionProperty obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static FeatureProviderRegistryFeatureProviderConnectionProperty 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 FeatureProviderRegistryFeatureProviderConnectionProperty object
///
public virtual FeatureProviderRegistryFeatureProviderConnectionProperty Clone() {
return ((FeatureProviderRegistryFeatureProviderConnectionProperty)(this.MemberwiseClone()));
}
#endregion
}
}