コード例 #1
0
 /// <summary>
 /// Initializes a new instance based on the specified <code>client</code> and <code>query</code>.
 /// </summary>
 /// <param name="client">The parent OAuth client.</param>
 /// <param name="query">The query string as specified by the response body.</param>
 protected SocialOAuthRequestToken(SocialOAuthClient client, NameValueCollection query) {
     Client = client;
     Token = query["oauth_token"];
     TokenSecret = query["oauth_token_secret"];
     IsCallbackConfirmed = query["oauth_callback_confirmed"] == "true";
     AuthorizeUrl = client.AuthorizeUrl + "?oauth_token=" + query["oauth_token"];
 }
コード例 #2
0
        /// <summary>
        /// Parses a query string received from the API.
        /// </summary>
        /// <param name="client">The parent OAuth client.</param>
        /// <param name="str">The query string.</param>
        public static SocialOAuthAccessToken Parse(SocialOAuthClient client, string str) {

            // Convert the query string to a NameValueCollection
            NameValueCollection query = SocialUtils.Misc.ParseQueryString(str);

            // Initialize a new instance
            return new SocialOAuthAccessToken(client, query);

        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance based on the specified <code>client</code> and <code>query</code>.
        /// </summary>
        /// <param name="client">The parent OAuth client.</param>
        /// <param name="query">The query string as specified by the response body.</param>
        protected SocialOAuthAccessToken(SocialOAuthClient client, NameValueCollection query) {

            Client = client;

            // Get the user ID
            long userId;
            Int64.TryParse(query["user_id"], out userId);

            // Populate the properties
            Token = query["oauth_token"];
            TokenSecret = query["oauth_token_secret"];
            Query = query;

        }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance based on the specified <paramref name="client"/> and <paramref name="query"/>.
        /// </summary>
        /// <param name="client">The parent OAuth client.</param>
        /// <param name="query">The query string as specified by the response body.</param>
        protected SocialOAuthAccessToken(SocialOAuthClient client, NameValueCollection query)
        {
            Client = client;

            // Get the user ID
            long userId;

            Int64.TryParse(query["user_id"], out userId);

            // Populate the properties
            Token       = query["oauth_token"];
            TokenSecret = query["oauth_token_secret"];
            Query       = query;
        }
コード例 #5
0
 /// <summary>
 /// Parses a query string received from the API.
 /// </summary>
 /// <param name="client">The parent OAuth client.</param>
 /// <param name="query">The query string.</param>
 public static SocialOAuthAccessToken Parse(SocialOAuthClient client, NameValueCollection query) {
     return query == null ? null : new SocialOAuthAccessToken(client, query);
 }
コード例 #6
0
 /// <summary>
 /// Parses a query string received from the API.
 /// </summary>
 /// <param name="client">The parent OAuth client.</param>
 /// <param name="query">The query string.</param>
 public new static TwitterOAuthAccessToken Parse(SocialOAuthClient client, NameValueCollection query)
 {
     return(query == null ? null : new TwitterOAuthAccessToken(client, query));
 }
コード例 #7
0
 protected TwitterOAuthAccessToken(SocialOAuthClient client, NameValueCollection query) : base(client, query)
 {
     UserId     = Int64.Parse(query["user_id"]);
     ScreenName = query["screen_name"];
 }
コード例 #8
0
 protected TwitterOAuthRequestToken(SocialOAuthClient client, NameValueCollection query) : base(client, query)
 {
 }
コード例 #9
0
 /// <summary>
 /// Parses a query string received from the API.
 /// </summary>
 /// <param name="client">The parent OAuth client.</param>
 /// <param name="query">The query string.</param>
 public static TwitterOAuthAccessToken Parse(SocialOAuthClient client, IHttpQueryString query)
 {
     return(query == null ? null : new TwitterOAuthAccessToken(client, query));
 }
コード例 #10
0
 protected TwitterOAuthAccessToken(SocialOAuthClient client, IHttpQueryString query) : base(client, query)
 {
     UserId     = Int64.Parse(query["user_id"]);
     ScreenName = query["screen_name"];
 }
コード例 #11
0
 protected TwitterOAuthRequestToken(SocialOAuthClient client, IHttpQueryString query) : base(client, query)
 {
 }
コード例 #12
0
 /// <summary>
 /// Parses a query string received from the API.
 /// </summary>
 /// <param name="client">The parent OAuth client.</param>
 /// <param name="query">The query string.</param>
 public static SocialOAuthRequestToken Parse(SocialOAuthClient client, NameValueCollection query)
 {
     return(query == null ? null : new SocialOAuthRequestToken(client, query));
 }