Class StringBoolDictionary
Serializable dictionary. This class works as a regular dictionary. The only restriction is that the string is a value type
Namespace: SuperOffice.CRM.Services
Assembly: SoCore.dll
Syntax
public class StringBoolDictionary : Dictionary<string, bool>
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.
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(Dictionary<String, Boolean>)
Make a copy of a generic string dictionary
Declaration
public StringBoolDictionary(Dictionary<string, bool> source)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<String, Boolean> | source |
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(IEnumerable<String>, IEnumerable<Boolean>)
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<Boolean> | values |
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(Int32)
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 |
---|---|---|
Int32 | 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.
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>
Methods
FromDictionary(Dictionary<String, Boolean>)
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, Boolean> | 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>