OSDN Git Service

ArgumentExceptionのコンストラクタにparamNameが指定されていないか不正である箇所を修正 (CA2208)
authorKimura Youichi <kim.upsilon@bucyou.net>
Mon, 14 Jul 2014 05:20:51 +0000 (14:20 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Mon, 21 Jul 2014 06:27:13 +0000 (15:27 +0900)
http://msdn.microsoft.com/ja-jp/library/ms182347.aspx

OpenTween/Connection/TwipplePhoto.cs
OpenTween/LRUCacheDictionary.cs
OpenTween/PostFilterRule.cs
OpenTween/SearchWordDialog.cs

index e399867..61fe1fe 100644 (file)
@@ -56,7 +56,7 @@ namespace OpenTween.Connection
             if (twitter == null)
                 throw new ArgumentNullException("twitter");
             if (twitterConfig == null)
-                throw new ArgumentNullException("config");
+                throw new ArgumentNullException("twitterConfig");
 
             this.twitter = twitter;
             this.twitterConfig = twitterConfig;
index c1693d2..dd4206d 100644 (file)
@@ -240,13 +240,13 @@ namespace OpenTween
         public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
         {
             if (array == null)
-                throw new ArgumentNullException();
+                throw new ArgumentNullException("array");
             if (arrayIndex < 0)
-                throw new ArgumentOutOfRangeException();
+                throw new ArgumentOutOfRangeException("arrayIndex");
             if (arrayIndex >= array.Length)
-                throw new ArgumentException("arrayIndex is equal to or greater than array.Length.");
+                throw new ArgumentException("arrayIndex is equal to or greater than array.Length.", "arrayIndex");
             if (array.Length - arrayIndex < this.Count)
-                throw new ArgumentException("The destination array is too small.");
+                throw new ArgumentException("The destination array is too small.", "array");
 
             foreach (var pair in this)
                 array[arrayIndex++] = pair;
index e82ba31..e4f4f44 100644 (file)
@@ -95,7 +95,7 @@ namespace OpenTween
             set
             {
                 if (value == null)
-                    throw new ArgumentNullException();
+                    throw new ArgumentNullException("value");
 
                 this.IsDirty = true;
                 this._FilterBody = value;
@@ -110,7 +110,7 @@ namespace OpenTween
             set
             {
                 if (value == null)
-                    throw new ArgumentNullException();
+                    throw new ArgumentNullException("value");
 
                 this.IsDirty = true;
                 this._ExFilterBody = value;
index fab28b0..6e51599 100644 (file)
@@ -96,7 +96,7 @@ namespace OpenTween
                         this.textSearchTimeline.Text = value.Query;
                         break;
                     default:
-                        throw new InvalidEnumArgumentException("value.Type", (int)value.Type, typeof(SearchType));
+                        throw new InvalidEnumArgumentException("value", (int)value.Type, typeof(SearchType));
                 }
             }
         }