private static async Task PullReceivedDirectMessages(TwitterCredentials credentials) { var service = new TwitterService(credentials.ConsumerKey, credentials.ConsumerSecret); if (!string.IsNullOrEmpty(credentials.AccessToken) || !string.IsNullOrEmpty(credentials.AccessTokenSecret)) { service.AuthenticateWith(credentials.AccessToken, credentials.AccessTokenSecret); } var r = await service.ListDirectMessagesReceivedAsync(new ListDirectMessagesReceivedOptions { Count = 200 }); Console.WriteLine(r.Value == null ? 0 : r.Value.Count()); }