protected override EventMapRow ReadRow(TableHeap heap)
 {
     return(new EventMapRow(
                heap.ReadToken(MetadataTokenType.TypeDef),
                heap.ReadToken(MetadataTokenType.Event)
                ));
 }
 protected override FieldMarshalRow ReadRow(TableHeap heap)
 {
     return(new FieldMarshalRow(
                heap.ReadCodedToken(CodedTokenType.HasFieldMarshal),
                heap.ReadBlob()
                ));
 }
Exemple #3
0
 protected override GenericParamConstraintRow ReadRow(TableHeap heap)
 {
     return(new GenericParamConstraintRow(
                heap.ReadToken(MetadataTokenType.GenericParam),
                heap.ReadCodedToken(CodedTokenType.TypeDefOrRef)
                ));
 }
Exemple #4
0
 protected override void WriteRow(ManifestResourceRow row, TableHeap heap)
 {
     heap.WriteUInt32(row.Offset);
     heap.WriteUInt32((uint)row.Attributes);
     heap.WriteString(row.Name);
     heap.WriteCodedToken(row.Implementation, CodedTokenType.Implementation);
 }
Exemple #5
0
 protected override FieldLayoutRow ReadRow(TableHeap heap)
 {
     return(new FieldLayoutRow(
                heap.ReadUInt32(),
                heap.ReadToken(MetadataTokenType.Field)
                ));
 }
Exemple #6
0
        private void ReadTableHeap()
        {
            TableHeap tableHeap = image.TableHeap;

            base.MoveTo(table_heap_offset + image.MetadataSection.PointerToRawData);
            base.Advance(6);
            byte sizes = ReadByte();

            base.Advance(1);
            tableHeap.Valid  = ReadInt64();
            tableHeap.Sorted = ReadInt64();
            if (image.PdbHeap != null)
            {
                for (int i = 0; i < 58; i++)
                {
                    if (image.PdbHeap.HasTable((Table)i))
                    {
                        tableHeap.Tables[i].Length = image.PdbHeap.TypeSystemTableRows[i];
                    }
                }
            }
            for (int j = 0; j < 58; j++)
            {
                if (tableHeap.HasTable((Table)j))
                {
                    tableHeap.Tables[j].Length = ReadUInt32();
                }
            }
            SetIndexSize(image.StringHeap, sizes, 1);
            SetIndexSize(image.GuidHeap, sizes, 2);
            SetIndexSize(image.BlobHeap, sizes, 4);
            ComputeTableInformations();
        }
Exemple #7
0
 protected override MethodSpecRow ReadRow(TableHeap heap)
 {
     return(new MethodSpecRow(
                heap.ReadCodedToken(CodedTokenType.MethodDefOrRef),
                heap.ReadBlob()
                ));
 }
Exemple #8
0
 protected override NestedClassRow ReadRow(TableHeap heap)
 {
     return(new NestedClassRow(
                heap.ReadToken(MetadataTokenType.TypeDef),
                heap.ReadToken(MetadataTokenType.TypeDef)
                ));
 }
Exemple #9
0
 protected override PropertyMapRow ReadRow(TableHeap heap)
 {
     return(new PropertyMapRow(
                heap.ReadToken(MetadataTokenType.TypeDef),
                heap.ReadToken(MetadataTokenType.Property)
                ));
 }
Exemple #10
0
 protected override void WriteRow(ImplMapRow row, TableHeap heap)
 {
     heap.WriteUInt16((ushort)row.Attributes);
     heap.WriteCodedToken(row.MemberForwarded, CodedTokenType.MemberForwarded);
     heap.WriteString(row.ImportName);
     heap.WriteToken(row.ImportScope);
 }
Exemple #11
0
 protected override void WriteRow(GenericParamRow row, TableHeap heap)
 {
     heap.WriteUInt16(row.Number);
     heap.WriteUInt16((ushort)row.Attributes);
     heap.WriteCodedToken(row.Owner, CodedTokenType.TypeOrMethodDef);
     heap.WriteString(row.Name);
 }
Exemple #12
0
 protected override InterfaceImplRow ReadRow(TableHeap heap)
 {
     return(new InterfaceImplRow(
                heap.ReadToken(MetadataTokenType.TypeDef),
                heap.ReadCodedToken(CodedTokenType.TypeDefOrRef)
                ));
 }
Exemple #13
0
 protected override PropertyRow ReadRow(TableHeap heap)
 {
     return(new PropertyRow(
                (PropertyAttributes)heap.ReadUInt16(),
                heap.ReadString(),
                heap.ReadBlob()
                ));
 }
Exemple #14
0
 protected override TypeRefRow ReadRow(TableHeap heap)
 {
     return(new TypeRefRow(
                heap.ReadCodedToken(CodedTokenType.ResolutionScope),
                heap.ReadString(),
                heap.ReadString()
                ));
 }
Exemple #15
0
 protected override void WriteRow(ExportedTypeRow row, TableHeap heap)
 {
     heap.WriteUInt32((uint)row.Attributes);
     heap.WriteUInt32(row.TypeDefId);
     heap.WriteString(row.TypeName);
     heap.WriteString(row.TypeNamespace);
     heap.WriteCodedToken(row.Implementation, CodedTokenType.Implementation);
 }
 protected override CustomAttributeRow ReadRow(TableHeap heap)
 {
     return(new CustomAttributeRow(
                heap.ReadCodedToken(CodedTokenType.HasCustomAttribute),
                heap.ReadCodedToken(CodedTokenType.CustomAttributeType),
                heap.ReadBlob()
                ));
 }
Exemple #17
0
 public MetadataHeaps()
 {
     Guids       = new GuidHeap();
     Blobs       = new BlobHeap();
     Strings     = new StringHeap();
     UserStrings = new UserStringHeap();
     Tables      = new TableHeap(this);
 }
Exemple #18
0
 protected override MethodImplRow ReadRow(TableHeap heap)
 {
     return(new MethodImplRow(
                heap.ReadToken(MetadataTokenType.TypeDef),
                heap.ReadCodedToken(CodedTokenType.MethodDefOrRef),
                heap.ReadCodedToken(CodedTokenType.MethodDefOrRef)
                ));
 }
Exemple #19
0
 protected override ParamRow ReadRow(TableHeap heap)
 {
     return(new ParamRow(
                (ParameterAttributes)heap.ReadUInt16(),
                heap.ReadUInt16(),
                heap.ReadString()
                ));
 }
Exemple #20
0
 protected override MemberRefRow ReadRow(TableHeap heap)
 {
     return(new MemberRefRow(
                heap.ReadCodedToken(CodedTokenType.MemberRefParent),
                heap.ReadString(),
                heap.ReadBlob()
                ));
 }
Exemple #21
0
 protected override FileRow ReadRow(TableHeap heap)
 {
     return(new FileRow(
                (FileAttributes)heap.ReadUInt32(),
                heap.ReadString(),
                heap.ReadBlob()
                ));
 }
Exemple #22
0
 protected override void WriteRow(ModuleRow row, TableHeap heap)
 {
     heap.WriteUInt16(row.Generation);
     heap.WriteString(row.Name);
     heap.WriteGuid(row.Mvid);
     heap.WriteUInt16(row.EncId);
     heap.WriteUInt16(row.EncBaseId);
 }
Exemple #23
0
 protected override DeclSecurityRow ReadRow(TableHeap heap)
 {
     return(new DeclSecurityRow(
                heap.ReadUInt16(),
                heap.ReadCodedToken(CodedTokenType.HasDeclSecurity),
                heap.ReadBlob()
                ));
 }
 protected override ClassLayoutRow ReadRow(TableHeap heap)
 {
     return(new ClassLayoutRow(
                heap.ReadUInt16(),
                heap.ReadUInt32(),
                heap.ReadToken(MetadataTokenType.TypeDef)
                ));
 }
Exemple #25
0
 protected override MethodSemanticsRow ReadRow(TableHeap heap)
 {
     return(new MethodSemanticsRow(
                (MethodSemanticsAttributes)heap.ReadUInt16(),
                heap.ReadToken(MetadataTokenType.Method),
                heap.ReadCodedToken(CodedTokenType.HasSemantics)
                ));
 }
Exemple #26
0
 protected override ConstantRow ReadRow(TableHeap heap)
 {
     return(new ConstantRow(
                (ElementType)heap.ReadUInt16(),
                heap.ReadCodedToken(CodedTokenType.HasConstant),
                heap.ReadBlob()
                ));
 }
Exemple #27
0
 protected override EventRow ReadRow(TableHeap heap)
 {
     return(new EventRow(
                (EventAttributes)heap.ReadUInt16(),
                heap.ReadString(),
                heap.ReadCodedToken(CodedTokenType.TypeDefOrRef)
                ));
 }
Exemple #28
0
 protected override void WriteRow(TypeDefRow row, TableHeap heap)
 {
     heap.WriteUInt32((uint)row.Attributes);
     heap.WriteString(row.Name);
     heap.WriteString(row.Namespace);
     heap.WriteCodedToken(row.Extends, CodedTokenType.TypeDefOrRef);
     heap.WriteUInt16(row.FieldList);
     heap.WriteUInt16(row.MethodList);
 }
Exemple #29
0
 protected override void WriteRow(MethodRow row, TableHeap heap)
 {
     heap.WriteUInt32(row.RVA);
     heap.WriteUInt16((ushort)row.ImplAttributes);
     heap.WriteUInt16((ushort)row.Attributes);
     heap.WriteString(row.Name);
     heap.WriteBlob(row.Signature);
     heap.WriteUInt16(row.ParamList);
 }
Exemple #30
0
 protected override ManifestResourceRow ReadRow(TableHeap heap)
 {
     return(new ManifestResourceRow(
                heap.ReadUInt32(),
                (ManifestResourceAttributes)heap.ReadUInt32(),
                heap.ReadString(),
                heap.ReadCodedToken(CodedTokenType.Implementation)
                ));
 }