示例#1
0
 /// <summary>
 /// Initializes a new OAuth client with default options.
 /// </summary>
 public OAuthClient()
 {
     AutoReset = true;
     Nonce     = OAuthUtils.GenerateNonce();
     Timestamp = OAuthUtils.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 OAuthClient(string consumerKey, string consumerSecret)
 {
     AutoReset      = true;
     ConsumerKey    = consumerKey;
     ConsumerSecret = consumerSecret;
     Nonce          = OAuthUtils.GenerateNonce();
     Timestamp      = OAuthUtils.GetTimestamp();
     Version        = "1.0";
 }
示例#3
0
 /// <summary>
 /// Updates the <see cref="Timestamp"/> and <see cref="Nonce"/> properties with new values for another
 /// request. If the <see cref="AutoReset"/> property is <c>true</c>, this method will be called automatically
 /// before each request to the underlying API.
 /// </summary>
 public virtual void Reset()
 {
     Nonce     = OAuthUtils.GenerateNonce();
     Timestamp = OAuthUtils.GetTimestamp();
 }