public static void AddElementsToDictionary(this ItemCollection source, Dictionary <string, string> elements) { if (elements.Count <= 0) { return; } foreach (KeyValuePair <string, string> element in elements) { source.AddorUpdate(element.Key, element.Value); } }