protected override MetadataRow <DataSegment, uint> ReadRow(ReadingContext context, MetadataToken token) { var reader = context.Reader; uint rva = reader.ReadUInt32(); uint fieldRid = reader.ReadIndex(TableStream.GetTable(MetadataTokenType.Field).IndexSize); DataSegment dataSegment = null; if (rva != 0) { int dataSize = GetDataSize(fieldRid); var dataReader = context.Reader.CreateSubReader(context.Assembly.RvaToFileOffset(rva), dataSize); dataSegment = DataSegment.FromReader(dataReader); } return(new MetadataRow <DataSegment, uint>(token) { Column1 = dataSegment, Column2 = fieldRid }); }
protected override MetadataRow <uint, uint, uint> ReadRow(ReadingContext context, MetadataToken token) { var reader = context.Reader; return(new MetadataRow <uint, uint, uint>(token) { Column1 = reader.ReadIndex(TableStream.GetIndexEncoder(CodedIndex.HasCustomAttribute).IndexSize), Column2 = reader.ReadIndex(TableStream.GetIndexEncoder(CodedIndex.CustomAttributeType).IndexSize), Column3 = reader.ReadIndex(TableStream.BlobIndexSize), }); }
public MetadataRow <MethodSemanticsAttributes, uint, uint> FindSemanticsOfOwner(MetadataToken ownersToken) { var encoder = TableStream.GetIndexEncoder(CodedIndex.HasSemantics); return((MetadataRow <MethodSemanticsAttributes, uint, uint>)GetRowByKey(2, encoder.EncodeToken(ownersToken))); }
protected override MetadataRow <MethodSemanticsAttributes, uint, uint> ReadRow(ReadingContext context, MetadataToken token) { var reader = context.Reader; return(new MetadataRow <MethodSemanticsAttributes, uint, uint>(token) { Column1 = (MethodSemanticsAttributes)reader.ReadUInt16(), Column2 = reader.ReadIndex(TableStream.GetTable(MetadataTokenType.Method).IndexSize), Column3 = reader.ReadIndex(TableStream.GetIndexEncoder(CodedIndex.HasSemantics).IndexSize) }); }
protected override MetadataRow <ElementType, byte, uint, uint> ReadRow(ReadingContext context, MetadataToken token) { var reader = context.Reader; return(new MetadataRow <ElementType, byte, uint, uint>(token) { Column1 = (ElementType)reader.ReadByte(), Column2 = reader.ReadByte(), Column3 = reader.ReadIndex(TableStream.GetIndexEncoder(CodedIndex.HasConstant).IndexSize), Column4 = reader.ReadIndex(TableStream.BlobIndexSize) }); }
internal EncLog(MetadataHeader header, MetadataToken token, MetadataRow <uint, uint> row) : base(header, token, row) { Token = row.Column1; FuncCode = row.Column2; }
protected override MetadataRow <uint, uint, uint> ReadRow(ReadingContext context, MetadataToken token) { var reader = context.Reader; return(new MetadataRow <uint, uint, uint>(token) { Column1 = reader.ReadIndex(TableStream.GetIndexEncoder(CodedIndex.ResolutionScope).IndexSize), // ResolutionScope Column2 = reader.ReadIndex(TableStream.StringIndexSize), // Name Column3 = reader.ReadIndex(TableStream.StringIndexSize), // Namespace }); }
public MetadataRow <ElementType, byte, uint, uint> FindConstantOfOwner(MetadataToken ownersToken) { var encoder = TableStream.GetIndexEncoder(CodedIndex.HasConstant); return((MetadataRow <ElementType, byte, uint, uint>)GetRowByKey(2, encoder.EncodeToken(ownersToken))); }
protected override MetadataRow <TypeAttributes, uint, uint, uint, uint, uint> ReadRow(ReadingContext context, MetadataToken token) { var reader = context.Reader; return(new MetadataRow <TypeAttributes, uint, uint, uint, uint, uint>(token) { Column1 = (TypeAttributes)reader.ReadUInt32(), // Attributes Column2 = reader.ReadIndex(TableStream.StringIndexSize), // Name Column3 = reader.ReadIndex(TableStream.StringIndexSize), // Namespace Column4 = reader.ReadIndex(TableStream.GetIndexEncoder(CodedIndex.TypeDefOrRef).IndexSize), // BaseType Column5 = reader.ReadIndex(TableStream.GetTable(MetadataTokenType.Field).IndexSize), // FieldList Column6 = reader.ReadIndex(TableStream.GetTable(MetadataTokenType.Method).IndexSize), // MethodList }); }
protected override MetadataRow <ushort, ushort, ushort, ushort, AssemblyAttributes, uint, uint, uint, uint> ReadRow(ReadingContext context, MetadataToken token) { var reader = context.Reader; return(new MetadataRow <ushort, ushort, ushort, ushort, AssemblyAttributes, uint, uint, uint, uint>(token) { Column1 = reader.ReadUInt16(), Column2 = reader.ReadUInt16(), Column3 = reader.ReadUInt16(), Column4 = reader.ReadUInt16(), Column5 = (AssemblyAttributes)reader.ReadUInt32(), Column6 = reader.ReadIndex(TableStream.BlobIndexSize), Column7 = reader.ReadIndex(TableStream.StringIndexSize), Column8 = reader.ReadIndex(TableStream.StringIndexSize), Column9 = reader.ReadIndex(TableStream.BlobIndexSize), }); }
internal FieldPtr(MetadataHeader header, MetadataToken token, MetadataRow <uint> row) : base(header, token, row) { _field = new LazyValue <FieldDefinition>(() => header.GetStream <TableStream>().GetTable <FieldDefinition>()[(int)(row.Column1 - 1)]); }
public MetadataRow <uint, uint> FindFieldLayoutOfOwner(MetadataToken ownersToken) { return((MetadataRow <uint, uint>)GetRowByKey(1, ownersToken.Rid)); }
public MethodPtr(MetadataHeader header, MetadataToken token, MetadataRow <uint> row) : base(header, token, row) { _method = new LazyValue <MethodDefinition>(() => header.GetStream <TableStream>().GetTable <MethodDefinition>()[(int)(row.Column1 - 1)]); }