Last active
August 29, 2015 13:56
-
-
Save iamralch/9071950 to your computer and use it in GitHub Desktop.
WCF Data Table Implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WcfDataTable : DataTable, IXmlSerializable | |
{ | |
private string _ServerName; | |
public WcfDataTable() | |
: base() | |
{ } | |
public WcfDataTable(string tableName) | |
: base(tableName) | |
{ } | |
public string ServerName | |
{ | |
get { return this._ServerName; } | |
set { this._ServerName = value; } | |
} | |
void IXmlSerializable.ReadXml(System.Xml.XmlReader reader) | |
{ | |
base.ReadXmlSchema(reader); | |
XmlSerializer xmlSerializer = new XmlSerializer(typeof(string)); | |
this._ServerName = xmlSerializer.Deserialize(reader) as string; | |
base.ReadXml(reader); | |
} | |
void IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) | |
{ | |
base.WriteXmlSchema(writer); | |
XmlSerializer xmlSerializer = new XmlSerializer(typeof(string)); | |
xmlSerializer.Serialize(writer, this._ServerName); | |
base.WriteXml(writer, XmlWriteMode.DiffGram); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment