summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-04-13 14:17:19 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2017-04-13 14:17:19 +0900
commita56e30c8d33048216567753d9d3fefc2152af8ac (patch)
tree7e5d979695fc4a431740982eb1cfecc2898b23a5 /src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs
parent4b11dc566a5bbfa1378d6266525c281b028abcc8 (diff)
downloadcoreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.gz
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.bz2
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.zip
Imported Upstream version 2.0.0.11353upstream/2.0.0.11353
Diffstat (limited to 'src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs')
-rw-r--r--src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs b/src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs
index e203223eb0..956543524a 100644
--- a/src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs
+++ b/src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs
@@ -3,21 +3,21 @@
// See the LICENSE file in the project root for more information.
-namespace System.Globalization {
- using System;
- using System.Reflection;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Security;
- using System.Runtime.CompilerServices;
- using System.Runtime.ConstrainedExecution;
- using System.Runtime.Versioning;
- using System.IO;
- using System.Diagnostics;
- using System.Diagnostics.Contracts;
+using System;
+using System.Reflection;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+using System.Security;
+using System.Runtime.CompilerServices;
+using System.Runtime.ConstrainedExecution;
+using System.Runtime.Versioning;
+using System.IO;
+using System.Diagnostics;
+using System.Diagnostics.Contracts;
-
+namespace System.Globalization
+{
/*=================================GlobalizationAssembly==========================
**
** This class provides the table loading wrapper that calls GetManifestResourceStream
@@ -32,31 +32,33 @@ namespace System.Globalization {
// Instance data members and instance methods.
//
// ----------------------------------------------------------------------------------------------------
- internal unsafe static byte* GetGlobalizationResourceBytePtr(Assembly assembly, String tableName) {
- Debug.Assert(assembly != null, "assembly can not be null. This should be generally the "+System.CoreLib.Name+" assembly.");
+ internal unsafe static byte* GetGlobalizationResourceBytePtr(Assembly assembly, String tableName)
+ {
+ Debug.Assert(assembly != null, "assembly can not be null. This should be generally the " + System.CoreLib.Name + " assembly.");
Debug.Assert(tableName != null, "table name can not be null");
-
+
Stream stream = assembly.GetManifestResourceStream(tableName);
UnmanagedMemoryStream bytesStream = stream as UnmanagedMemoryStream;
- if (bytesStream != null) {
+ if (bytesStream != null)
+ {
byte* bytes = bytesStream.PositionPointer;
- if (bytes != null) {
+ if (bytes != null)
+ {
return (bytes);
}
}
-
+
Debug.Assert(
- false,
+ false,
String.Format(
CultureInfo.CurrentCulture,
- "Didn't get the resource table {0} for System.Globalization from {1}",
- tableName,
+ "Didn't get the resource table {0} for System.Globalization from {1}",
+ tableName,
assembly));
-
+
// We can not continue if we can't get the resource.
throw new InvalidOperationException();
}
-
}
}