/Main/src/DynamicDataDisplay/Common/Auxiliary/DictionaryExtensions.cs
C# | 27 lines | 25 code | 2 blank | 0 comment | 0 complexity | 63e5b6e82815a8c733f77bbba8c01781 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Microsoft.Research.DynamicDataDisplay.Charts.Isolines;
-
- namespace Microsoft.Research.DynamicDataDisplay.Common.Auxiliary
- {
- internal static class DictionaryExtensions
- {
- internal static void Add<TKey, TValue>(this Dictionary<TKey, TValue> dict, TValue value, params TKey[] keys)
- {
- foreach (var key in keys)
- {
- dict.Add(key, value);
- }
- }
-
- internal static void Add(this Dictionary<int, Edge> dict, Edge value, params CellBitmask[] keys)
- {
- foreach (var key in keys)
- {
- dict.Add((int)key, value);
- }
- }
- }
- }