• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

LINQ To TwitterのUserStreamをもっと使いやすくしようとか妄想してるプロジェクト


Commit MetaInfo

Revision04ce54dfa698b664aa5943b8227e8343a0b74706 (tree)
Zeit2011-02-09 16:14:12
Autorazyobuzin <azyobuzin@user...>
Commiterazyobuzin

Log Message

・typoでtarget_objectが取得できずに例外を吐くのを修正
・list_destroyedイベントに対応

Ändern Zusammenfassung

Diff

--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
11
2-*.suo
\ No newline at end of file
2+*.suo
3+Release/
\ No newline at end of file
--- a/UserStreamEx/UserStreamEx.cs
+++ b/UserStreamEx/UserStreamEx.cs
@@ -242,9 +242,8 @@ namespace Azyobuzi.UserStreamEx
242242 : base(line)
243243 {
244244 var json = DynamicJson.Parse(line);
245- EventTypes eventType;
246- if (!Enum.TryParse(((string)json.@event).Replace("_", ""), true, out eventType))
247- eventType = EventTypes.Unknown;
245+ EventTypes eventType = EventTypes.Unknown;
246+ Enum.TryParse(((string)json.@event).Replace("_", ""), true, out eventType);
248247 EventType = eventType;
249248 CreatedAt = DateTime.ParseExact(json.created_at, "ddd MMM dd HH:mm:ss %zzzz yyyy", CultureInfo.InvariantCulture).ToLocalTime();
250249 Source = User.CreateUser(((string)json.source.ToString()).JsonToXml());
@@ -254,7 +253,7 @@ namespace Azyobuzi.UserStreamEx
254253 if (json.target_object.mode())
255254 {
256255 //リスト
257- TargetList = List.CreateList(((string)json.target_onject.ToString()).JsonToXml(), new XElement("lists_list"));
256+ TargetList = List.CreateList(((string)json.target_object.ToString()).JsonToXml(), new XElement("lists_list"));
258257 }
259258 else
260259 {
@@ -272,17 +271,6 @@ namespace Azyobuzi.UserStreamEx
272271 public List TargetList { private set; get; }
273272 }
274273
275- public class TrackLimitEventArgs : ReceiveJsonEventArgs
276- {
277- public TrackLimitEventArgs(string line)
278- : base(line)
279- {
280- Track = (ulong)DynamicJson.Parse(line).limit.track;
281- }
282-
283- public ulong Track { private set; get; }
284- }
285-
286274 public enum EventTypes
287275 {
288276 Unknown,
@@ -294,6 +282,18 @@ namespace Azyobuzi.UserStreamEx
294282 Block,
295283 Unblock,
296284 UserUpdate,
297- ListCreated
285+ ListCreated,
286+ ListDestroyed
287+ }
288+
289+ public class TrackLimitEventArgs : ReceiveJsonEventArgs
290+ {
291+ public TrackLimitEventArgs(string line)
292+ : base(line)
293+ {
294+ Track = (ulong)DynamicJson.Parse(line).limit.track;
295+ }
296+
297+ public ulong Track { private set; get; }
298298 }
299299 }