/// <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; ? }
/// <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; ? }
void IMetadataProvider.Read(TokenTypes token, out FieldRow[] 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 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; }
public FieldRowExt(IMetadataProvider metadata, FieldRow row) : base(metadata) { this.row = row; }