static List <Item> PropertiesToData(PropertiesCollection properties) { return(properties .GetKeys() .Select(key => new Item { Key = key, Value = properties[key].ToString() }) .ToList()); }