internal unsafe static byte* GetGlobalizationResourceBytePtr(Assembly assembly, String tableName) {
BCLDebug.Assert(assembly != null, "assembly can not be null. This should be generally the mscorlib.dll assembly.");
BCLDebug.Assert(tableName != null, "table name can not be null");
Stream stream = assembly.GetManifestResourceStream(tableName);
UnmanagedMemoryStream bytesStream = stream as UnmanagedMemoryStream;
if (bytesStream != null) {
byte* bytes = bytesStream.PositionPointer;
if (bytes != null) {
return (bytes);
}
}
BCLDebug.Assert(
false,
String.Format(
CultureInfo.CurrentCulture,
"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 ExecutionEngineException();
}