コード例 #1
0
 /// <summary>
 /// Initializes a new OAuth client with default options.
 /// </summary>
 public SocialOAuthClient()
 {
     AutoReset = true;
     Nonce     = SocialOAuthUtils.GenerateNonce();
     Timestamp = SocialOAuthUtils.GetTimestamp();
     Version   = "1.0";
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new OAuth client with the specified <paramref name="consumerKey"/> and
 /// <paramref name="consumerSecret"/>.
 /// </summary>
 /// <param name="consumerKey">The consumer key of your application.</param>
 /// <param name="consumerSecret">The consumer secret of your application.</param>
 public SocialOAuthClient(string consumerKey, string consumerSecret)
 {
     AutoReset      = true;
     ConsumerKey    = consumerKey;
     ConsumerSecret = consumerSecret;
     Nonce          = SocialOAuthUtils.GenerateNonce();
     Timestamp      = SocialOAuthUtils.GetTimestamp();
     Version        = "1.0";
 }
コード例 #3
0
 /// <summary>
 /// Updates the <code>oauth_timestamp</code> and <code>oauth_nonce</code> parameters with new values for
 /// another request. If the <see cref="AutoReset"/> property is <code>true</code>, this method will be called
 /// automatically before each request to the underlying API.
 /// </summary>
 public virtual void Reset()
 {
     Nonce     = SocialOAuthUtils.GenerateNonce();
     Timestamp = SocialOAuthUtils.GetTimestamp();
 }