[Tween-svn] [1537] Foursquareプレビュー作成中にDictionaryに二回追加される場合があるのを修正

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2011年 5月 21日 (土) 11:34:51 JST


Revision: 1537
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1537
Author:   f_swallow
Date:     2011-05-21 11:34:51 +0900 (Sat, 21 May 2011)

Log Message:
-----------
Foursquareプレビュー作成中にDictionaryに二回追加される場合があるのを修正

Modified Paths:
--------------
    trunk/Tween/Foursquare.vb


-------------- next part --------------
Modified: trunk/Tween/Foursquare.vb
===================================================================
--- trunk/Tween/Foursquare.vb	2011-05-20 10:50:22 UTC (rev 1536)
+++ trunk/Tween/Foursquare.vb	2011-05-21 02:34:51 UTC (rev 1537)
@@ -81,7 +81,8 @@
         If curVenue Is Nothing Then Return Nothing
 
         Dim curLocation As New Google.GlobalLocation With {.Latitude = curVenue.Location.Latitude, .Longitude = curVenue.Location.Longitude, .LocateInfo = CreateVenueInfoText(curVenue)}
-        CheckInUrlsVenueCollection.Add(urlId, curLocation)
+        '例外発生の場合があるため
+        If Not CheckInUrlsVenueCollection.ContainsKey(urlId) Then CheckInUrlsVenueCollection.Add(urlId, curLocation)
         refText = curLocation.LocateInfo
         Return (New Google).CreateGoogleMapsUri(curLocation)
     End Function



Tween-svn メーリングリストの案内
アーカイブの一覧に戻る