System.Globalization.CompareInfo.nativeCreateSortKey C# (CSharp) Метод

nativeCreateSortKey() приватный Метод

private nativeCreateSortKey ( void pSortingFile, String pString, int dwFlags, int win32LCID ) : byte[]
pSortingFile void
pString String
dwFlags int
win32LCID int
Результат byte[]
        unsafe internal static extern byte[] nativeCreateSortKey(void* pSortingFile, String pString, int dwFlags, int win32LCID);

Usage Example

Пример #1
0
        ////////////////////////////////////////////////////////////////////////
        //
        //  SortKey Constructor
        //
        //  Implements CultureInfo.CompareInfo.GetSortKey().
        //  Package access only.
        //
        ////////////////////////////////////////////////////////////////////////

        unsafe internal SortKey(void *pSortingFile, int win32LCID, String str, CompareOptions options)
        {
            if (str == null)
            {
                throw new ArgumentNullException("str");
            }

            //
            //
            if ((options & ValidSortkeyCtorMaskOffFlags) != 0)
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_InvalidFlag"), "options");
            }

            //This takes the sort id from CompareInfo, so we should be able to skip initializing it.
            this.win32LCID = win32LCID;

            this.options = options;
            m_String     = str;

            //We need an initialized SortTable here, but since we're getting this as an instance
            //method off of a CompareInfo, we're guaranteed that that already happened.
            m_KeyData = CompareInfo.nativeCreateSortKey(pSortingFile, str, (int)options, win32LCID);
        }