private static AddToDictionary ( string key, string value, IDictionary |
||
key | string | |
value | string | |
dictionary | IDictionary |
|
return | void |
private static void AddToDictionary(
string key,
string value,
IDictionary<string, ICollection<string>> dictionary)
{
ICollection<string> targetCollection;
if (!dictionary.TryGetValue(key, out targetCollection))
{
targetCollection = new List<string>();
dictionary.Add(key, targetCollection);
}
if (!targetCollection.Contains(value))
{
targetCollection.Add(value);
}
}