Beispiel #1
0
 void IMetadataProvider.Read(TokenTypes token, out MethodSemanticsRow result)
 {
     TableHeap theap = (TableHeap)_streams[(int)HeapType.Tables];
     theap.Read(token, out result);
 }
Beispiel #2
0
        /// <summary>
        /// Reads the specified token.
        /// </summary>
        /// <param name="token">The token.</param>
        /// <param name="result">The result.</param>
        public void Read(TokenTypes token, out MethodSemanticsRow result)
        {
            using (BinaryReader reader = CreateReaderForToken (token))
            {
                if ((token & TokenTypes.TableMask) != TokenTypes.MethodSemantics)
                    throw new ArgumentException ("Invalid token type for MethodSemanticsRow.", "token");

                result = new MethodSemanticsRow ((MethodSemanticsAttributes)reader.ReadInt16 (), ReadIndexValue (reader, TokenTypes.MethodDef), ReadIndexValue (reader, IndexType.HasSemantics));
            }
        }