Esempio n. 1
0
            public int CompareTo(byte[] buffer)
            {
                // Note: this is internal knowledge of FileNameRecord structure - but for performance
                // reasons, we don't want to decode the entire structure.  In fact can avoid the string
                // conversion as well.
                byte fnLen = buffer[0x40];

                return(_upperCase.Compare(_query, 0, _query.Length, buffer, 0x42, fnLen * 2));
            }
Esempio n. 2
0
            public int Compare(byte[] x, byte[] y)
            {
                if (x == null && y == null)
                {
                    return(0);
                }
                else if (y == null)
                {
                    return(-1);
                }
                else if (x == null)
                {
                    return(1);
                }

                byte xFnLen = x[0x40];
                byte yFnLen = y[0x40];

                return(_stringComparer.Compare(x, 0x42, xFnLen * 2, y, 0x42, yFnLen * 2));
            }