|
using System;
namespace CSharp_CustomXmlSerializer_Demo
{
public class Buyer:System.Xml.Serialization.IXmlSerializable
{
#region "Definition Section"
private int _Identifier;
private string _Name;
private string _Email;
private string _Phone;
private Profile.Questionnaire _Questionnaire;
#endregion
#region "Exposed Properties"
public int Identifier
{
get{return _Identifier;}
set{_Identifier = value;}
}
public string Name
{
get{return _Name;}
set{_Name = value;}
}
public string EMailAddress
{
get{return _Email;}
set{_Email = value;}
}
public string PhoneNumber
{
get{return _Phone;}
set{_Phone = value;}
}
public Profile.Questionnaire Questionnaire
{
get
{
if (_Questionnaire == null) _Questionnaire = new Profile.Questionnaire();
return _Questionnaire;
}
set
{
_Questionnaire = value;
}
}
public object PreferredPlans
{get{return null;}}
public object SelectedPlan
{get{return null;}}
#endregion
#region "Implements IXmlSerializable"
public System.Xml.Schema.XmlSchema GetSchema()
{
return null;
}
public void ReadXml(System.Xml.XmlReader reader)
{
CustomXmlSerializer XmlReader = new CustomXmlSerializer();
XmlReader.ReadXml(reader, this);
}
public void WriteXml(System.Xml.XmlWriter writer)
{
CustomXmlSerializer XmlWriter = new CustomXmlSerializer();
XmlWriter.WriteXml(this, writer);
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Larry Steinle is a systems analyst for HDR, Inc, a nationally recognized architecture, engineering, and consulting firm. He graduated with a certificate in Biblical Studies, an Associate in Computer Programming, and a Bachelor Degree in Management Information Systems.