瀏覽代碼

Localization of error messages.

Bart De Smet 10 年之前
父節點
當前提交
730a353c1a

+ 1 - 1
Rx.NET/Source/System.Reactive.Core/Reactive/Disposables/CompositeDisposable.cs

@@ -67,7 +67,7 @@ namespace System.Reactive.Disposables
             // Doing this on the list to avoid duplicate enumeration of disposables.
             //
             if (_disposables.Contains(null))
-                throw new ArgumentException("Disposables collection can not contain null values.", "disposables");
+                throw new ArgumentException(Strings_Core.DISPOSABLES_CANT_CONTAIN_NULL, "disposables");
             
             _count = _disposables.Count;
         }

+ 11 - 0
Rx.NET/Source/System.Reactive.Core/Strings_Core.Generated.cs

@@ -168,5 +168,16 @@ namespace System.Reactive
                 return ResourceManager.GetString("SCHEDULER_OPERATION_ALREADY_AWAITED", resourceCulture);
             }
         }
+
+        /// <summary>
+        ///   Looks up a localized string similar to Disposables collection can not contain null values..
+        /// </summary>
+        internal static string DISPOSABLES_CANT_CONTAIN_NULL
+        {
+            get
+            {
+                return ResourceManager.GetString("DISPOSABLES_CANT_CONTAIN_NULL", resourceCulture);
+            }
+        }
     }
 }

+ 3 - 0
Rx.NET/Source/System.Reactive.Core/Strings_Core.resx

@@ -123,6 +123,9 @@
   <data name="COMPLETED_NO_VALUE" xml:space="preserve">
     <value>OnCompleted notification doesn't have a value.</value>
   </data>
+  <data name="DISPOSABLES_CANT_CONTAIN_NULL" xml:space="preserve">
+    <value>Disposables collection can not contain null values.</value>
+  </data>
   <data name="DISPOSABLE_ALREADY_ASSIGNED" xml:space="preserve">
     <value>Disposable has already been assigned.</value>
   </data>