Class IntStringDictionary
Serializable dictionary. This class works as a regular dictionary. The only restriction is that the string is a value type
Implements
Inherited Members
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.Int32, System.String>>.Add(System.Collections.Generic.KeyValuePair<System.Int32, System.String>)
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.Int32, System.String>>.Contains(System.Collections.Generic.KeyValuePair<System.Int32, System.String>)
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.Int32, System.String>>.Remove(System.Collections.Generic.KeyValuePair<System.Int32, System.String>)
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Int32, System.String>>.GetEnumerator()
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.Int32, System.String>>.CopyTo(System.Collections.Generic.KeyValuePair<System.Int32, System.String>[], System.Int32)
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.IDictionary.get_Item(System.Object)
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.IDictionary.set_Item(System.Object, System.Object)
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.IDictionary<System.Int32, System.String>.Keys
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.IReadOnlyDictionary<System.Int32, System.String>.Keys
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.IDictionary<System.Int32, System.String>.Values
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.IReadOnlyDictionary<System.Int32, System.String>.Values
System.Collections.Generic.Dictionary<System.Int32, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.Int32, System.String>>.IsReadOnly
Namespace: SuperOffice.CRM.Services
Assembly: SoCore.dll
Syntax
public class IntStringDictionary : Dictionary<int, string>, IDictionary<int, string>, ICollection<KeyValuePair<int, string>>, IDictionary, ICollection, IReadOnlyDictionary<int, string>, IReadOnlyCollection<KeyValuePair<int, string>>, IEnumerable<KeyValuePair<int, string>>, 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
IntStringDictionary()
Default constructor
Declaration
public IntStringDictionary()
IntStringDictionary(Dictionary<Int32, String>)
Make a copy of a generic string dictionary
Declaration
public IntStringDictionary(Dictionary<int, string> source)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<Int32, String> | source |
IntStringDictionary(IEnumerable<Int32>, IEnumerable<String>)
Make a string dictionary from two string arrays
Declaration
public IntStringDictionary(IEnumerable<int> keys, IEnumerable<string> values)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Int32> | keys | |
IEnumerable<String> | values |
IntStringDictionary(Int32)
Declaration
public IntStringDictionary(int capacity)
Parameters
Type | Name | Description |
---|---|---|
Int32 | capacity |
IntStringDictionary(SerializationInfo, StreamingContext)
Initializes a new instance with serialized data.
Declaration
public IntStringDictionary(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | Contains the information to de-serialize |
StreamingContext | context | Context |
Methods
FromDictionary(Dictionary<Int32, String>)
Declaration
public static IntStringDictionary FromDictionary(Dictionary<int, string> input)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<Int32, String> | input |
Returns
Type | Description |
---|---|
IntStringDictionary |
ToString(String)
Declaration
public string ToString(string prefix)
Parameters
Type | Name | Description |
---|---|---|
String | prefix |
Returns
Type | Description |
---|---|
String |
Implements
Extension Methods
EnumUtil.MapEnums<From, To>(From)
IEnumerableExtensions.ForEach<T>(System.Collections.Generic.IEnumerable<T>, System.Action<T>)
IEnumerableExtensions.ContainsAny<T>(System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IEnumerable<T>)
IEnumerableExtensions.Batch<T>(System.Collections.Generic.IEnumerable<T>, System.Int32)
IEnumerableExtensions.IndexOf<T>(System.Collections.Generic.IEnumerable<T>, T, System.Int32)
IEnumerableExtensions.IndexOf<T>(System.Collections.Generic.IEnumerable<T>, System.Func<T, System.Boolean>, System.Int32)
IEnumerableExtensions.Permute<T>(System.Collections.Generic.IEnumerable<T>, System.Int32)
IEnumerableExtensions.PermissiveToDictionary<T, K, V>(System.Collections.Generic.IEnumerable<T>, System.Func<T, K>, System.Func<T, V>)
IEnumerableExtensions.PermissiveToDictionary<T, K, V>(System.Collections.Generic.IEnumerable<T>, System.Func<T, K>, System.Func<T, V>, System.Collections.Generic.IEqualityComparer<K>)
IEnumerableExtensions.GetDifferentCombinations<T>(System.Collections.Generic.IEnumerable<T>, System.Int32)