Fix namespaces and ThrowHelper
authorJan Kotas <jkotas@microsoft.com>
Thu, 23 Nov 2017 03:29:51 +0000 (19:29 -0800)
committerJan Kotas <jkotas@microsoft.com>
Thu, 23 Nov 2017 06:53:20 +0000 (22:53 -0800)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
src/mscorlib/shared/System/Globalization/Normalization.Unix.cs
src/mscorlib/shared/System/Globalization/Normalization.Windows.cs
src/mscorlib/shared/System/Nullable.cs
src/mscorlib/src/System/ThrowHelper.cs

index 6616c6e..a25c1b9 100644 (file)
@@ -3,11 +3,9 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
-using System.Security;
 using System.Text;
-using System.Globalization;
 
-namespace System.Text
+namespace System.Globalization
 {
     internal static partial class Normalization
     {
index 56217a5..8418c53 100644 (file)
@@ -3,11 +3,10 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
-using System.Globalization;
 using System.Runtime.InteropServices;
 using System.Text;
 
-namespace System.Text
+namespace System.Globalization
 {
     internal static partial class Normalization
     {
index 5ee55e7..cb748a6 100644 (file)
@@ -2,20 +2,15 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
-using System.Globalization;
-using System.Reflection;
 using System.Collections.Generic;
-using System.Runtime;
 using System.Runtime.Versioning;
-using System.Runtime.CompilerServices;
 
 namespace System
 {
-    // Also, because we have special type system support that says a a boxed Nullable<T>
+    // Because we have special type system support that says a a boxed Nullable<T>
     // can be used where a boxed<T> is use, Nullable<T> can not implement any intefaces
     // at all (since T may not).   Do NOT add any interfaces to Nullable!
-    // 
+    //
     [Serializable]
     [NonVersionable] // This only applies to field layout
     [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
@@ -46,7 +41,7 @@ namespace System
             {
                 if (!hasValue)
                 {
-                    ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_NoValue);
+                    ThrowHelper.ThrowInvalidOperationException_InvalidOperation_NoValue();
                 }
                 return value;
             }
index 782c30a..c3dc2c4 100644 (file)
@@ -260,6 +260,11 @@ namespace System
             throw GetInvalidOperationException(ExceptionResource.InvalidOperation_EnumOpCantHappen);
         }
 
+        internal static void ThrowInvalidOperationException_InvalidOperation_NoValue()
+        {
+            throw GetInvalidOperationException(ExceptionResource.InvalidOperation_NoValue);
+        }
+
         internal static void ThrowArraySegmentCtorValidationFailedExceptions(Array array, int offset, int count)
         {
             throw GetArraySegmentCtorValidationFailedException(array, offset, count);