Skip to content

Instantly share code, notes, and snippets.

@nessamurmur
Created March 8, 2016 17:01
Show Gist options
  • Save nessamurmur/9cf03fed2eed32df5d8f to your computer and use it in GitHub Desktop.
Save nessamurmur/9cf03fed2eed32df5d8f to your computer and use it in GitHub Desktop.
public Dictionary<string, UIImage> GetImages(string directory) {
var images = new Dictionary<string, UIImage>();
var paths = Directory.EnumerateFiles(directory, "*.png");
foreach (var path in paths) {
images[path] = UIImage.FromFile(path);
}
return images;
}
public async Task<List<FeedItem>> GetFeedItems(DateTime date) {
var feed = "http://planet.xamarin.com/feed/";
var response = await httpClient.GetStringAsync(feed);
var items = await ParseFeedAsync(response);
return items.Where(item => item.Published.Date == date).ToList();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment