public static GetLatitudeAndLongitudeFromStatusValueDictionary ( Object>.Dictionary |
||
statusValueDictionary | Object>.Dictionary | |
latitude | String | |
longitude | String | |
리턴 | void |
TryFromStatusValueDictionary ( Dictionary <String, Object> statusValueDictionary, Boolean expandStatusUrls, out TwitterStatus twitterStatus ) { Debug.Assert(statusValueDictionary != null); twitterStatus = null; // Get the status information. String statusID, statusText; if ( !TwitterJsonUtil.TryGetJsonValueFromDictionary( statusValueDictionary, "id_str", out statusID) || !TwitterJsonUtil.TryGetJsonValueFromDictionary( statusValueDictionary, "text", out statusText) ) { return(false); } String statusDateUtc; if (TwitterJsonUtil.TryGetJsonValueFromDictionary( statusValueDictionary, "created_at", out statusDateUtc)) { statusDateUtc = TwitterDateParser.ParseTwitterDate(statusDateUtc); } String latitude, longitude; TwitterGraphMLUtil.GetLatitudeAndLongitudeFromStatusValueDictionary( statusValueDictionary, out latitude, out longitude); String statusUrls, statusHashtags; TwitterGraphMLUtil.GetUrlsAndHashtagsFromStatusValueDictionary( statusValueDictionary, expandStatusUrls, out statusUrls, out statusHashtags); String inReplyToStatusID; TwitterJsonUtil.TryGetJsonValueFromDictionary( statusValueDictionary, "in_reply_to_status_id_str", out inReplyToStatusID); // Note that null date, coordinates, URLs hashtags, and in-reply-to-ID // are acceptable here. twitterStatus = new TwitterStatus( statusID, statusText, statusDateUtc, latitude, longitude, statusUrls, statusHashtags, inReplyToStatusID); return(true); }