예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CilRuntimeField"/> class.
 /// </summary>
 /// <param name="module">The module.</param>
 /// <param name="field">The field.</param>
 /// <param name="offset">The offset.</param>
 /// <param name="rva">The rva.</param>
 /// <param name="declaringType">Type of the declaring.</param>
 public CilRuntimeField(IMetadataModule module, ref FieldRow field, IntPtr offset, IntPtr rva, RuntimeType declaringType)
     : base(module, declaringType)
 {
     this.nameIdx = field.NameStringIdx;
     this.signature = field.SignatureBlobIdx;
     base.Attributes = field.Flags;
     base.RVA = rva;
     //base.Offset = offset; ?
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CilRuntimeField"/> class.
 /// </summary>
 /// <param name="moduleTypeSystem">The module type system.</param>
 /// <param name="field">The field.</param>
 /// <param name="offset">The offset.</param>
 /// <param name="rva">The rva.</param>
 /// <param name="declaringType">Type of the declaring.</param>
 public CilRuntimeField(IModuleTypeSystem moduleTypeSystem, FieldRow field, uint offset, uint rva, RuntimeType declaringType)
     : base(moduleTypeSystem, declaringType)
 {
     this.nameIdx = field.NameStringIdx;
     this.signatureBlobIdx = field.SignatureBlobIdx;
     base.Attributes = field.Flags;
     base.RVA = rva;
     //base.Offset = offset; ?
 }
예제 #3
0
 void IMetadataProvider.Read(TokenTypes token, out FieldRow[] result)
 {
     TableHeap theap = (TableHeap) _streams[(int) HeapType.Tables];
     theap.Read(token, out result);
 }
예제 #4
0
파일: TableHeap.cs 프로젝트: hj1980/Mosa
        /// <summary>
        /// Reads the specified token.
        /// </summary>
        /// <param name="token">The token.</param>
        /// <param name="result">The result.</param>
        public void Read(TokenTypes token, out FieldRow[] result)
        {
            if ((token & TokenTypes.TableMask) != TokenTypes.Field)
                throw new ArgumentException ("Invalid token type for FieldRow.", "token");

            using (BinaryReader reader = CreateReaderForToken (token))
            {
            }
                /*
                result = new FieldRow(
                    (FieldAttributes)reader.ReadUInt16(),
                    ReadIndexValue(reader, IndexType.StringHeap),
                    ReadIndexValue(reader, IndexType.BlobHeap)
                );*/

            result = null;
        }
예제 #5
0
 public FieldRowExt(IMetadataProvider metadata, FieldRow row)
     : base(metadata)
 {
     this.row = row;
 }