wx.Xml.XmlSerialization Class Reference

List of all members.

Public Member Functions

void Add (string membername, object value)
IEnumerator
< KeyValuePair
< string, object > > 
GetEnumerator ()
System.Xml.Schema.XmlSchema GetSchema ()
void ReadXml (XmlReader reader)
override string ToString ()
void WriteXml (XmlWriter writer)
 XmlSerialization ()

Static Public Member Functions

static object Deserialize (XmlReader reader)
static void Deserialize (XmlReader reader, object value)
static void Serialize (XmlWriter writer, object o, bool useNativeSerializationIfAvailable)
static void Serialize (XmlWriter writer, object o)

Properties

ICollection< string > Membernames [get]
Type SerializedType [get, set]
object this [string membername] [get, set]


Detailed Description

Instances are used to describe a deserialized object. This is a collection of member values associated to member names. Member values must be either int, double, bool, string, or instances of System.Xml.Serialization.IXmlSerializable implementing a standard CTor.

Constructor & Destructor Documentation

wx.Xml.XmlSerialization.XmlSerialization (  ) 


Member Function Documentation

void wx.Xml.XmlSerialization.Add ( string  membername,
object  value 
)

Adds a new member.

Parameters:
membername The name of the new member.
value The value of the new member.
Exceptions:
System.ArgumentException If member is already defined.

static object wx.Xml.XmlSerialization.Deserialize ( XmlReader  reader  )  [static]

This will deserialize objects that have been serialized with serialize(). If possible, this method will replace deserialized instances of XmlSerialization by instances of the original type. Prerequisites: The original type has been serialized and all public properties implement setters.

Parameters:
reader The source providing the serialized data.
Returns:

static void wx.Xml.XmlSerialization.Deserialize ( XmlReader  reader,
object  value 
) [static]

Use this method to implement ReadXml() with objects that have been serialized with Serialize(). All serialized members must be a name of a public property implementing a setter for this to work.

Parameters:
reader The source providing the serialized data.
value The value whise properties will be set according to the serialized members.

IEnumerator<KeyValuePair<string, object> > wx.Xml.XmlSerialization.GetEnumerator (  ) 

This enumerator iterates instances of KeyValuePair<string, object> containing the name of a member and its value.

Returns:

System.Xml.Schema.XmlSchema wx.Xml.XmlSerialization.GetSchema (  ) 

void wx.Xml.XmlSerialization.ReadXml ( XmlReader  reader  ) 

static void wx.Xml.XmlSerialization.Serialize ( XmlWriter  writer,
object  o,
bool  useNativeSerializationIfAvailable 
) [static]

This method will serialize object o and store the result using w. Object o can be int, double, bool, a string, or an object implementing a default constructor and System.Xml.Serialization.IXmlSerializable. This method can also serialize all public properties of objects implementing a default constructor can also be serialized if they implement getter and setter. Additionally, this mehtod can serialze arrays.

Parameters:
writer The serialization will be written into this stream.
o This object will be serialized.
useNativeSerializationIfAvailable If true, this method will use System.Xml.Serialization.WriteXml() if implemented by o. Use false here if you use this mehtod to implement System.Xml.Serialization.WriteXml().

static void wx.Xml.XmlSerialization.Serialize ( XmlWriter  writer,
object  o 
) [static]

This method will serialize object o and store the result using w. Object o can be int, double, bool, a string, or an object implementing a default constructor and System.Xml.Serialization.IXmlSerializable. This method can also serialize all public properties of objects implementing a default constructor can also be serialized if they implement getter and setter.

This will use System.Xml.Serialization.WriteXml() if implemented by o. If you want to use this class to implement this method, you have to avoid this. Otherwise, you will implement an non-terminating recursion. Use the form of this method providing an additional Boolean parameter to avoid the call to System.Xml.Serialization.WriteXml().

Parameters:
writer The serialization will be written into this stream.
o This object will be serialized.

override string wx.Xml.XmlSerialization.ToString (  ) 

void wx.Xml.XmlSerialization.WriteXml ( XmlWriter  writer  ) 


Property Documentation

ICollection<string> wx.Xml.XmlSerialization.Membernames [get]

Returns a collection of all member names that can be dereferenced by the indexer.

Type wx.Xml.XmlSerialization.SerializedType [get, set]

The type of the object that has been serialized. Deserialization will restore this type and use public setters to assign the deserialized attributes. If this is not possible, deserialization will use an instance of XmlSerialization to store everything that has been read from the XML reader.

object wx.Xml.XmlSerialization.this[string membername] (  )  [get, set]

Returns the value associated with the membername.

Parameters:
membername The name of the member whose value is desired.
Returns:


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads