static unsafe TextInfo() {
//with AppDomains active, the static initializer is no longer good enough to ensure that only one
//thread is ever in AllocateDefaultCasingTable at a given time.
//We use InterlockedExchangePointer in the native side to ensure that only one instance of native CasingTable instance
//is created per process.
//We check if the table is already allocated in native, so we only need to synchronize
//access in managed.
byte* temp = GlobalizationAssembly.GetGlobalizationResourceBytePtr(typeof(TextInfo).Assembly, CASING_FILE_NAME);
System.Threading.Thread.MemoryBarrier();
m_pDataTable = temp;
TextInfoDataHeader* pHeader = (TextInfoDataHeader*)m_pDataTable;
m_exceptionCount = pHeader->exceptionCount;
// Setup exception tables
m_exceptionTable = (ExceptionTableItem*)&(pHeader->exceptionLangId);
m_exceptionNativeTextInfo = new long[m_exceptionCount];
// Create the native NativeTextInfo for the default linguistic casing table.
m_pDefaultCasingTable = AllocateDefaultCasingTable(m_pDataTable);
BCLDebug.Assert(m_pDataTable != null, "Error in reading the table.");
BCLDebug.Assert(m_pDefaultCasingTable != null, "m_pDefaultCasingTable != null");
}