• 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

Revision6e1511e145b1f71c73fc10e96a73714c2f17eff4 (tree)
Zeit2011-02-07 20:53:17
Autorazyobuzin <azyobuzin@user...>
Commiterazyobuzin

Log Message

・DirectMessageを受信したときに例外を吐くのを修正
・limitに対応
・Ver.1.0.1

Ändern Zusammenfassung

Diff

--- a/UserStreamEx/Properties/AssemblyInfo.cs
+++ b/UserStreamEx/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
3232 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
3333 // 既定値にすることができます:
3434 // [assembly: AssemblyVersion("1.0.*")]
35-[assembly: AssemblyVersion("1.0.0.0")]
36-[assembly: AssemblyFileVersion("1.0.0.0")]
35+[assembly: AssemblyVersion("1.0.1.0")]
36+[assembly: AssemblyFileVersion("1.0.1.0")]
--- a/UserStreamEx/Readme.txt
+++ b/UserStreamEx/Readme.txt
@@ -13,4 +13,11 @@ LINQ to Twitter用UserStream補助ライブラリ
1313
1414 個人的にやってるものなのでご自由にお使いください(バイナリでもソースでも)
1515
16-何かあったら@azyobuzinまで
\ No newline at end of file
16+何かあったら@azyobuzinまで
17+
18+更新履歴
19+ 1.0.1 (2011/2/7)
20+ ・DirectMessageを受信したときに例外を吐くのを修正
21+ ・limitに対応
22+ 1.0 (2011/2/6)
23+ ・初版で適当
\ No newline at end of file
--- a/UserStreamEx/UserStreamEx.cs
+++ b/UserStreamEx/UserStreamEx.cs
@@ -74,6 +74,10 @@ namespace Azyobuzi.UserStreamEx
7474 {
7575 if (ReceiveEvent != null) ReceiveEvent(this, new ReceiveEventEventArgs(_line));
7676 }
77+ else if (json.limit())
78+ {
79+ if (TrackLimit != null) TrackLimit(this, new TrackLimitEventArgs(_line));
80+ }
7781 else if (json.text())
7882 {
7983 if (NewTweet != null) NewTweet(this, new NewTweetEventArgs(_line));
@@ -118,6 +122,7 @@ namespace Azyobuzi.UserStreamEx
118122 public event EventHandler<NewDirectMessageEventArgs> NewDirectMessage;
119123 public event EventHandler<DeleteStatusEventArgs> DeleteStatus;
120124 public event EventHandler<ReceiveEventEventArgs> ReceiveEvent;
125+ public event EventHandler<TrackLimitEventArgs> TrackLimit;
121126 public event EventHandler<ReceiveJsonEventArgs> ReceiveUnsupportedData;
122127 }
123128
@@ -192,7 +197,7 @@ namespace Azyobuzi.UserStreamEx
192197 ID = (ulong)json.id,
193198 SenderID = (ulong)json.sender_id,
194199 Text = json.text,
195- RecipientID = json.recipient_id,
200+ RecipientID = (ulong)json.recipient_id,
196201 CreatedAt = DateTime.ParseExact(json.created_at, "ddd MMM dd HH:mm:ss %zzzz yyyy", CultureInfo.InvariantCulture),
197202 SenderScreenName = json.sender_screen_name,
198203 RecipientScreenName = json.recipient_screen_name,
@@ -267,6 +272,17 @@ namespace Azyobuzi.UserStreamEx
267272 public List TargetList { private set; get; }
268273 }
269274
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+
270286 public enum EventTypes
271287 {
272288 Unknown,