void IMetadataProvider.Read(TokenTypes token, out ConstantRow result) { TableHeap theap = (TableHeap)_streams[(int)HeapType.Tables]; theap.Read(token, out result); }
/// <summary> /// Reads the specified token. /// </summary> /// <param name="token">The token.</param> /// <param name="result">The result.</param> public void Read(TokenTypes token, out ConstantRow result) { if ((token & TokenTypes.TableMask) != TokenTypes.Constant) throw new ArgumentException ("Invalid token type for ConstantRow.", "token"); using (BinaryReader reader = CreateReaderForToken (token)) { CilElementType cet = (CilElementType)reader.ReadByte (); reader.ReadByte (); result = new ConstantRow (cet, ReadIndexValue (reader, IndexType.HasConstant), ReadIndexValue (reader, IndexType.BlobHeap)); } }