Esempio n. 1
0
        private bool SkipFunkyAndCustomModifiers()
        {
            SigParser sigTemp = new SigParser(this);

            if (!sigTemp.SkipAnyVASentinel())
            {
                return(false);
            }


            byte bElementType = 0;

            if (!sigTemp.PeekByte(out bElementType))
            {
                return(false);
            }

            while (ELEMENT_TYPE_CMOD_REQD == bElementType ||
                   ELEMENT_TYPE_CMOD_OPT == bElementType ||
                   ELEMENT_TYPE_MODIFIER == bElementType ||
                   ELEMENT_TYPE_PINNED == bElementType)
            {
                sigTemp.SkipBytes(1);

                int token;
                if (!sigTemp.GetToken(out token))
                {
                    return(false);
                }

                if (!sigTemp.PeekByte(out bElementType))
                {
                    return(false);
                }
            }

            // Following custom modifiers must be an element type value which is less than ELEMENT_TYPE_MAX, or one of the other element types
            // that we support while parsing various signatures
            if (bElementType >= ELEMENT_TYPE_MAX)
            {
                switch (bElementType)
                {
                case ELEMENT_TYPE_PINNED:
                    break;

                default:
                    return(false);
                }
            }

            CopyFrom(sigTemp);
            return(true);
        }// SkipFunkyAndCustomModifiers