Esempio n. 1
0
        /// <summary>
        /// Parses the modifier.
        /// </summary>
        /// <param name="reader">The reader.</param>
        private void ParseModifier(SignatureReader reader)
        {
            CilElementType value = (CilElementType)reader.PeekByte();

            if (value == CilElementType.Pinned)
            {
                Modifier = value;
                reader.SkipByte();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Parses the custom mods.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <returns></returns>
        public static CustomMod[] ParseCustomMods(SignatureReader reader)
        {
            List <CustomMod> mods = new List <CustomMod>();

            while (reader.Index != reader.Length)
            {
                CilElementType type = (CilElementType)reader.PeekByte();
                if (type != CilElementType.Optional && type != CilElementType.Required)
                {
                    break;
                }

                reader.SkipByte();

                Token modType = reader.ReadEncodedTypeDefOrRef();
                mods.Add(new CustomMod((CustomModType)(type - CilElementType.Required + 1), modType));
            }

            return(mods.ToArray());
        }
Esempio n. 3
0
 private void ParseModifier(SignatureReader reader)
 {
     CilElementType value = (CilElementType)reader.PeekByte();
     if (value == CilElementType.Pinned)
     {
         this.modifier = value;
         reader.SkipByte();
     }
 }
Esempio n. 4
0
        /// <summary>
        /// Parses the custom mods.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <returns></returns>
        public static CustomMod[] ParseCustomMods(SignatureReader reader)
        {
            List<CustomMod> mods = new List<CustomMod>();
            while (reader.Index != reader.Length)
            {
                CilElementType type = (CilElementType)reader.PeekByte();
                if (type != CilElementType.Optional && type != CilElementType.Required)
                    break;

                reader.SkipByte();

                Token modType = reader.ReadEncodedTypeDefOrRef();
                mods.Add(new CustomMod((CustomModType)(type - CilElementType.Required + 1), modType));
            }

            return mods.ToArray();
        }