complete PocketItem properties; add PocketImage, PocketVideo, PocketAuthor;

This commit is contained in:
2013-06-26 12:17:01 +02:00
parent f84c0a9c20
commit 899a2e1c4c
12 changed files with 189 additions and 24 deletions
+25
View File
@@ -266,5 +266,30 @@ namespace PocketSharp
throw new APIException("No access token available. Use authentification first.");
}
}
/// <summary>
/// Convert a dictionary to a list
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="items">The items.</param>
/// <returns></returns>
internal static List<T> DictionaryToList<T>(Dictionary<string, T> items) where T : new()
{
if(items == null)
{
return null;
}
var itemEnumerator = items.GetEnumerator();
List<T> list = new List<T>();
while (itemEnumerator.MoveNext())
{
list.Add(itemEnumerator.Current.Value);
}
return list;
}
}
}