Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 06828ca

Browse files
committed
Fix namespaces and ThrowHelper
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
1 parent a7427d8 commit 06828ca

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

src/mscorlib/shared/System/Globalization/Normalization.Unix.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Diagnostics;
6-
using System.Security;
76
using System.Text;
8-
using System.Globalization;
97

10-
namespace System.Text
8+
namespace System.Globalization
119
{
1210
internal static partial class Normalization
1311
{

src/mscorlib/shared/System/Globalization/Normalization.Windows.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Diagnostics;
6-
using System.Globalization;
76
using System.Runtime.InteropServices;
87
using System.Text;
98

10-
namespace System.Text
9+
namespace System.Globalization
1110
{
1211
internal static partial class Normalization
1312
{

src/mscorlib/shared/System/Nullable.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,15 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using System;
6-
using System.Globalization;
7-
using System.Reflection;
85
using System.Collections.Generic;
9-
using System.Runtime;
106
using System.Runtime.Versioning;
11-
using System.Runtime.CompilerServices;
127

138
namespace System
149
{
15-
// Also, because we have special type system support that says a a boxed Nullable<T>
10+
// Because we have special type system support that says a a boxed Nullable<T>
1611
// can be used where a boxed<T> is use, Nullable<T> can not implement any intefaces
1712
// at all (since T may not). Do NOT add any interfaces to Nullable!
18-
//
13+
//
1914
[Serializable]
2015
[NonVersionable] // This only applies to field layout
2116
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
@@ -46,7 +41,7 @@ public T Value
4641
{
4742
if (!hasValue)
4843
{
49-
ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_NoValue);
44+
ThrowHelper.ThrowInvalidOperationException_InvalidOperation_NoValue();
5045
}
5146
return value;
5247
}

src/mscorlib/src/System/ThrowHelper.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ internal static void ThrowInvalidOperationException_InvalidOperation_EnumOpCantH
260260
throw GetInvalidOperationException(ExceptionResource.InvalidOperation_EnumOpCantHappen);
261261
}
262262

263+
internal static void ThrowInvalidOperationException_InvalidOperation_NoValue()
264+
{
265+
throw GetInvalidOperationException(ExceptionResource.InvalidOperation_NoValue);
266+
}
267+
263268
internal static void ThrowArraySegmentCtorValidationFailedExceptions(Array array, int offset, int count)
264269
{
265270
throw GetArraySegmentCtorValidationFailedException(array, offset, count);

0 commit comments

Comments
 (0)