Class StringBoolDictionary
Serializable dictionary. This class works as a regular dictionary. The only restriction is that the string is a value type
Implements
Inherited Members
Namespace: SuperOffice.CRM.Services
Assembly: SoCore.dll
Syntax
[CollectionDataContract(Name = "StringBoolDictionary", ItemName = "StringBoolKeyValuePair", KeyName = "Key", ValueName = "Value", Namespace = "http://www.superoffice.net/ws/crm/NetServer/10.3.0.0")]
public class StringBoolDictionary : Dictionary<string, bool>, IDictionary<string, bool>, ICollection<KeyValuePair<string, bool>>, IDictionary, ICollection, IReadOnlyDictionary<string, bool>, IReadOnlyCollection<KeyValuePair<string, bool>>, IEnumerable<KeyValuePair<string, bool>>, IEnumerable, ISerializable, IDeserializationCallback
Remarks
Serializes a dictionary to and from XML. Used as part of the data-carriers.
Examples
StringDictionary dict = new StringDictionary();
dict["foo"] = "bar";
dict["baz"] = "quux";
dict.WriteXml( xmlWriter );
results in XML that looks like this:
<StringDictionary>
<StringKeyValuePair>
<Key>foo</Key><Value>bar</Value>
</StringKeyValuePair>
<StringKeyValuePair>
<Key>baz</Key><Value>quux</Value>
</StringKeyValuePair>
</StringDictionary>
Constructors
StringBoolDictionary()
Default constructor
Declaration
public StringBoolDictionary()
Remarks
Serializes a dictionary to and from XML. Used as part of the data-carriers.
StringBoolDictionary(Dictionary<string, bool>)
Make a copy of a generic string dictionary
Declaration
public StringBoolDictionary(Dictionary<string, bool> source)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<string, bool> | source |
Remarks
Serializes a dictionary to and from XML. Used as part of the data-carriers.
StringBoolDictionary(IEnumerable<string>, IEnumerable<bool>)
Make a string dictionary from two string arrays
Declaration
public StringBoolDictionary(IEnumerable<string> keys, IEnumerable<bool> values)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<string> | keys | |
IEnumerable<bool> | values |
Remarks
Serializes a dictionary to and from XML. Used as part of the data-carriers.
StringBoolDictionary(int)
Serializable dictionary. This class works as a regular dictionary. The only restriction is that the string is a value type
Declaration
public StringBoolDictionary(int capacity)
Parameters
Type | Name | Description |
---|---|---|
int | capacity |
Remarks
Serializes a dictionary to and from XML. Used as part of the data-carriers.
Examples
StringDictionary dict = new StringDictionary();
dict["foo"] = "bar";
dict["baz"] = "quux";
dict.WriteXml( xmlWriter );
results in XML that looks like this:
<StringDictionary>
<StringKeyValuePair>
<Key>foo</Key><Value>bar</Value>
</StringKeyValuePair>
<StringKeyValuePair>
<Key>baz</Key><Value>quux</Value>
</StringKeyValuePair>
</StringDictionary>
StringBoolDictionary(SerializationInfo, StreamingContext)
Initializes a new instance with serialized data.
Declaration
public StringBoolDictionary(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | Contains the information to de-serialize |
StreamingContext | context | Context |
Remarks
Serializes a dictionary to and from XML. Used as part of the data-carriers.
Methods
FromDictionary(Dictionary<string, bool>)
Serializable dictionary. This class works as a regular dictionary. The only restriction is that the string is a value type
Declaration
public static StringBoolDictionary FromDictionary(Dictionary<string, bool> input)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<string, bool> | input |
Returns
Type | Description |
---|---|
StringBoolDictionary |
Remarks
Serializes a dictionary to and from XML. Used as part of the data-carriers.
Examples
StringDictionary dict = new StringDictionary();
dict["foo"] = "bar";
dict["baz"] = "quux";
dict.WriteXml( xmlWriter );
results in XML that looks like this:
<StringDictionary>
<StringKeyValuePair>
<Key>foo</Key><Value>bar</Value>
</StringKeyValuePair>
<StringKeyValuePair>
<Key>baz</Key><Value>quux</Value>
</StringKeyValuePair>
</StringDictionary>
ToString(string)
Serializable dictionary. This class works as a regular dictionary. The only restriction is that the string is a value type
Declaration
public string ToString(string prefix)
Parameters
Type | Name | Description |
---|---|---|
string | prefix |
Returns
Type | Description |
---|---|
string |
Remarks
Serializes a dictionary to and from XML. Used as part of the data-carriers.
Examples
StringDictionary dict = new StringDictionary();
dict["foo"] = "bar";
dict["baz"] = "quux";
dict.WriteXml( xmlWriter );
results in XML that looks like this:
<StringDictionary>
<StringKeyValuePair>
<Key>foo</Key><Value>bar</Value>
</StringKeyValuePair>
<StringKeyValuePair>
<Key>baz</Key><Value>quux</Value>
</StringKeyValuePair>
</StringDictionary>