Created
June 1, 2012 08:13
-
-
Save mabster/2850198 to your computer and use it in GitHub Desktop.
Awaiting a call in an anonymous type initializer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class MainWindow : Window | |
{ | |
public MainWindow() | |
{ | |
InitializeComponent(); | |
this.Loaded += MainWindow_Loaded; | |
} | |
async void MainWindow_Loaded(object sender, RoutedEventArgs e) | |
{ | |
this.DataContext = new | |
{ | |
Tweets = (await new TwitterAnonymousClient().GetUserTimelineAsync("mabster", 50)).Result, | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment