static unsafe CharUnicodeInfo() { UnicodeDataHeader* headerPtr = (UnicodeDataHeader*) s_pDataTable; s_pCategoryLevel1Index = (ushort*) (s_pDataTable + headerPtr->OffsetToCategoriesIndex); s_pCategoriesValue = s_pDataTable + ((byte*) headerPtr->OffsetToCategoriesValue); s_pNumericLevel1Index = (ushort*) (s_pDataTable + headerPtr->OffsetToNumbericIndex); s_pNumericValues = s_pDataTable + ((byte*) headerPtr->OffsetToNumbericValue); s_pDigitValues = (DigitValues*) (s_pDataTable + headerPtr->OffsetToDigitValue); nativeInitTable(s_pDataTable); }
static unsafe CharUnicodeInfo() { UnicodeDataHeader* pDataTable = (UnicodeDataHeader*) m_pDataTable; m_pCategoryLevel1Index = (ushort*) (m_pDataTable + pDataTable->OffsetToCategoriesIndex); m_pCategoriesValue = m_pDataTable + ((byte*) pDataTable->OffsetToCategoriesValue); m_pNumericLevel1Index = (ushort*) (m_pDataTable + pDataTable->OffsetToNumbericIndex); m_pNumericValues = m_pDataTable + ((byte*) pDataTable->OffsetToNumbericValue); m_pDigitValues = (DigitValues*) (m_pDataTable + pDataTable->OffsetToDigitValue); nativeInitTable(m_pDataTable); }
static unsafe CharUnicodeInfo() { UnicodeDataHeader *pDataTable = (UnicodeDataHeader *)m_pDataTable; m_pCategoryLevel1Index = (ushort *)(m_pDataTable + pDataTable->OffsetToCategoriesIndex); m_pCategoriesValue = m_pDataTable + ((byte *)pDataTable->OffsetToCategoriesValue); m_pNumericLevel1Index = (ushort *)(m_pDataTable + pDataTable->OffsetToNumbericIndex); m_pNumericValues = m_pDataTable + ((byte *)pDataTable->OffsetToNumbericValue); m_pDigitValues = (DigitValues *)(m_pDataTable + pDataTable->OffsetToDigitValue); nativeInitTable(m_pDataTable); }
static unsafe CharUnicodeInfo() { UnicodeDataHeader *headerPtr = (UnicodeDataHeader *)s_pDataTable; s_pCategoryLevel1Index = (ushort *)(s_pDataTable + headerPtr->OffsetToCategoriesIndex); s_pCategoriesValue = s_pDataTable + ((byte *)headerPtr->OffsetToCategoriesValue); s_pNumericLevel1Index = (ushort *)(s_pDataTable + headerPtr->OffsetToNumbericIndex); s_pNumericValues = s_pDataTable + ((byte *)headerPtr->OffsetToNumbericValue); s_pDigitValues = (DigitValues *)(s_pDataTable + headerPtr->OffsetToDigitValue); nativeInitTable(s_pDataTable); }
//We need to allocate the underlying table that provides us with the information that we //use. We allocate this once in the class initializer and then we don't need to worry //about it again. // unsafe static CharUnicodeInfo() { m_pDataTable = GlobalizationAssembly.GetGlobalizationResourceBytePtr(typeof(CharUnicodeInfo).Assembly, UNICODE_INFO_FILE_NAME); UnicodeDataHeader *mainHeader = (UnicodeDataHeader *)m_pDataTable; // Set up the native pointer to different part of the tables. m_pCategoryLevel1Index = (ushort *)(m_pDataTable + mainHeader->OffsetToCategoriesIndex); m_pCategoriesValue = (byte *)(m_pDataTable + mainHeader->OffsetToCategoriesValue); m_pNumericLevel1Index = (ushort *)(m_pDataTable + mainHeader->OffsetToNumbericIndex); m_pNumericValues = (byte *)(m_pDataTable + mainHeader->OffsetToNumbericValue); m_pDigitValues = (DigitValues *)(m_pDataTable + mainHeader->OffsetToDigitValue); // Go to native side to make sure the native CharacterInfoTable pointer in the native side is initialized. nativeInitTable(m_pDataTable); }
unsafe static bool InitTable() { // Go to native side and get pointer to the native table byte *pDataTable = GlobalizationAssembly.GetGlobalizationResourceBytePtr(typeof(CharUnicodeInfo).Assembly, UNICODE_INFO_FILE_NAME); UnicodeDataHeader *mainHeader = (UnicodeDataHeader *)pDataTable; // Set up the native pointer to different part of the tables. s_pCategoryLevel1Index = (ushort *)(pDataTable + EndianSwap(mainHeader->OffsetToCategoriesIndex)); s_pCategoriesValue = (byte *)(pDataTable + EndianSwap(mainHeader->OffsetToCategoriesValue)); s_pNumericLevel1Index = (ushort *)(pDataTable + EndianSwap(mainHeader->OffsetToNumbericIndex)); s_pNumericValues = (byte *)(pDataTable + EndianSwap(mainHeader->OffsetToNumbericValue)); s_pDigitValues = (DigitValues *)(pDataTable + EndianSwap(mainHeader->OffsetToDigitValue)); return(true); }
[System.Security.SecuritySafeCritical] // auto-generated unsafe static bool InitTable() { // Go to native side and get pointer to the native table byte * pDataTable = GlobalizationAssembly.GetGlobalizationResourceBytePtr(typeof(CharUnicodeInfo).Assembly, UNICODE_INFO_FILE_NAME); UnicodeDataHeader* mainHeader = (UnicodeDataHeader*)pDataTable; // Set up the native pointer to different part of the tables. s_pCategoryLevel1Index = (ushort*) (pDataTable + mainHeader->OffsetToCategoriesIndex); s_pCategoriesValue = (byte*) (pDataTable + mainHeader->OffsetToCategoriesValue); s_pNumericLevel1Index = (ushort*) (pDataTable + mainHeader->OffsetToNumbericIndex); s_pNumericValues = (byte*) (pDataTable + mainHeader->OffsetToNumbericValue); s_pDigitValues = (DigitValues*) (pDataTable + mainHeader->OffsetToDigitValue); return true; }
//We need to allocate the underlying table that provides us with the information that we //use. We allocate this once in the class initializer and then we don't need to worry //about it again. // unsafe static CharUnicodeInfo() { m_pDataTable = GlobalizationAssembly.GetGlobalizationResourceBytePtr(typeof(CharUnicodeInfo).Assembly, UNICODE_INFO_FILE_NAME); UnicodeDataHeader* mainHeader = (UnicodeDataHeader*)m_pDataTable; // Set up the native pointer to different part of the tables. m_pCategoryLevel1Index = (ushort*) (m_pDataTable + mainHeader->OffsetToCategoriesIndex); m_pCategoriesValue = (byte*) (m_pDataTable + mainHeader->OffsetToCategoriesValue); m_pNumericLevel1Index = (ushort*) (m_pDataTable + mainHeader->OffsetToNumbericIndex); m_pNumericValues = (byte*) (m_pDataTable + mainHeader->OffsetToNumbericValue); m_pDigitValues = (DigitValues*) (m_pDataTable + mainHeader->OffsetToDigitValue); // Go to native side to make sure the native CharacterInfoTable pointer in the native side is initialized. nativeInitTable(m_pDataTable); }