コード例 #1
0
        private Task <OAuthToken> RequestOAuthTokenAsync(FormQuery <OAuthToken> oauthTokenQuery)
        {
            for (int i = 0; i < 2; i++)
            {
                try
                {
                    return(oauthTokenQuery.ExecuteAsync());
                }
                catch (OAuthErrorException)
                {
                    throw;
                }
                catch (Exception)
                {
                    if (i >= 1)
                    {
                        throw;
                    }
                }
            }

            throw new Exception();
        }
コード例 #2
0
        private Task<OAuthToken> RequestOAuthTokenAsync(FormQuery<OAuthToken> oauthTokenQuery)
        {
            for (int i = 0; i < 2; i++)
            {
                try
                {
                    return oauthTokenQuery.ExecuteAsync();
                }
                catch (OAuthErrorException)
                {
                    throw;
                }
                catch (Exception)
                {
                    if (i >= 1)
                    {
                        throw;
                    }
                }
            }

            throw new Exception();
        }