Class SerializableDictionary<TKey, TValue>
Represents serializable dictionary.
Inheritance
Implements
Namespace: Mediachase.BusinessFoundation.Data
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 14.26.0Syntax
public class SerializableDictionary<TKey, TValue> : Dictionary<TKey, TValue>, IXmlSerializable
Type Parameters
| Name | Description |
|---|---|
| TKey | The type of the key. |
| TValue | The type of the value. |
Constructors
SerializableDictionary()
Initializes a new instance of the SerializableDictionary<TKey, TValue> class.
Declaration
public SerializableDictionary()
SerializableDictionary(IDictionary<TKey, TValue>)
Initializes a new instance of the SerializableDictionary<TKey, TValue> class.
Declaration
public SerializableDictionary(IDictionary<TKey, TValue> dictionary)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IDictionary<TKey, TValue> | dictionary | The dictionary. |
SerializableDictionary(IDictionary<TKey, TValue>, IEqualityComparer<TKey>)
Initializes a new instance of the SerializableDictionary<TKey, TValue> class.
Declaration
public SerializableDictionary(IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IDictionary<TKey, TValue> | dictionary | The dictionary. |
| System.Collections.Generic.IEqualityComparer<TKey> | comparer | The comparer. |
SerializableDictionary(IEqualityComparer<TKey>)
Initializes a new instance of the SerializableDictionary<TKey, TValue> class.
Declaration
public SerializableDictionary(IEqualityComparer<TKey> comparer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEqualityComparer<TKey> | comparer | The comparer. |
SerializableDictionary(Int32)
Initializes a new instance of the SerializableDictionary<TKey, TValue> class.
Declaration
public SerializableDictionary(int capacity)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | capacity | The capacity. |
SerializableDictionary(Int32, IEqualityComparer<TKey>)
Initializes a new instance of the SerializableDictionary<TKey, TValue> class.
Declaration
public SerializableDictionary(int capacity, IEqualityComparer<TKey> comparer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | capacity | The capacity. |
| System.Collections.Generic.IEqualityComparer<TKey> | comparer | The comparer. |
SerializableDictionary(SerializationInfo, StreamingContext)
Initializes a new instance of the SerializableDictionary<TKey, TValue> class.
Declaration
protected SerializableDictionary(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Runtime.Serialization.SerializationInfo | info | A System.Runtime.Serialization.SerializationInfo object containing the information required to serialize the System.Collections.Generic.Dictionary<, >. |
| System.Runtime.Serialization.StreamingContext | context | A System.Runtime.Serialization.StreamingContext structure containing the source and destination of the serialized stream associated with the System.Collections.Generic.Dictionary<, >. |
Methods
GetSchema()
This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the System.Xml.Serialization.XmlSchemaProviderAttribute to the class.
Declaration
protected virtual XmlSchema GetSchema()
Returns
| Type | Description |
|---|---|
| System.Xml.Schema.XmlSchema | An System.Xml.Schema.XmlSchema that describes the XML representation of the object that is produced by the System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter) method and consumed by the System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader) method. |
ReadXml(XmlReader)
Reads the XML.
Declaration
protected virtual void ReadXml(XmlReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Xml.XmlReader | reader | The XML reader to use. |
WriteXml(XmlWriter)
Writes the XML.
Declaration
protected virtual void WriteXml(XmlWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Xml.XmlWriter | writer | The XML writer to use. |