Exemplo n.º 1
0
 public OAuthParameter(string consumerKey, string token, SignatureMethodType signatureMethod, DateTime timestamp, string nonce, OAuthVersionType version)
 {
     this.ConsumerKey = consumerKey;
     this.Token = token;
     this.SignatureMethod = GeneralUtil.SignatureMethodTypeToString(signatureMethod);
     this.Timestamp = this.DateTimeToUtcTicks(timestamp).ToString();
     this.Nonce = nonce;
     this.Version = GeneralUtil.OAuthVersionTypeToString(version);
 }
Exemplo n.º 2
0
 public static string OAuthVersionTypeToString(OAuthVersionType versionType)
 {
     switch (versionType)
     {
         case OAuthVersionType.Version1:
             return VERSION1_TEXT;
         case OAuthVersionType.Version2:
             return VERSION2_TEXT;
         default:
             throw new ArgumentOutOfRangeException("versionType");
     }
 }