private static string GetFromProperty(IDictionary<string, string> properties, string key) { string result = null; if (properties.ContainsKey(key)) { result = properties[key]; properties.Remove(key); } return result; }