Encodes keys as element names and values as simple values with a type attribute that contains an XML type name. Complex names encode the type name with type='___namespace.classname' format followed by a standard xml serialized format. The latter serialization can be slow so it's not recommended to pass complex types if performance is critical.
public class PropertyBag<TValue> : Dictionary<String,TValue>, IXmlSerializable
Member | Description | |
---|---|---|
Constructor | ||
CreateFromXml | Creates an instance of a propertybag from an Xml string public static PropertyBag<TValue> CreateFromXml(string xml);
|
|
FromXml | Deserializes from an XML string public bool FromXml(string xml);
|
|
GetSchema | Not implemented - this means no schema information is passed so this won't work with ASMX/WCF services. public sealed XmlSchema GetSchema();
|
|
ReadXml | Reads the custom serialized format public sealed void ReadXml(XmlReader reader);
|
|
ToXml | Serializes this dictionary to an XML string public string ToXml();
|
|
WriteXml | Serializes the dictionary to XML. Keys are serialized to element names and values as element values. An xml type attribute is embedded for each serialized element - a .NET type element is embedded for each complex type and prefixed with three underscores. public sealed void WriteXml(XmlWriter writer);
|