Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // First method where it goes wrong, it goes wrong at the return line.
- public static IAsyncResult GetRequestToken(string consumerKey, string consumerSecret, string callbackAddress, WebProxy proxy, TimeSpan timeout, Action<OAuthTokenResponse> function)
- {
- Func<string, string, string, WebProxy, OAuthTokenResponse> methodToCall = OAuthUtility.GetRequestToken;
- return methodToCall.BeginInvoke(
- consumerKey,
- consumerSecret,
- callbackAddress,
- proxy,
- result =>
- {
- result.AsyncWaitHandle.WaitOne(timeout);
- try
- {
- function(methodToCall.EndInvoke(result));
- }
- catch (TwitterizerException)
- {
- function(null);
- }
- },
- null);
- }
- // In a 2nd method it crashes on this little piece of code where parameters is a Dictionary<string, object>
- var paramsSorted = from p in parameters
- orderby p.Key, p.Value
- select p;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement