コード例 #1
0
ファイル: AssemblyOs.cs プロジェクト: micax/AsmResolver
 internal AssemblyOs(MetadataHeader header, MetadataToken token, MetadataRow <uint, uint, uint> row)
     : base(header, token, row)
 {
     PlatformId   = row.Column1;
     MajorVersion = row.Column2;
     MinorVersion = row.Column3;
 }
コード例 #2
0
        internal PropertyMap(MetadataHeader header, MetadataToken token, MetadataRow <uint, uint> row)
            : base(header, token, row)
        {
            var tableStream = header.GetStream <TableStream>();

            _parent = new LazyValue <TypeDefinition>(() => tableStream.GetTable <TypeDefinition>()[(int)row.Column1 - 1]);
        }
コード例 #3
0
ファイル: EventDefinitionTable.cs プロジェクト: xuhaoa/WinPIT
 protected override void WriteRow(WritingContext context, MetadataRow<EventAttributes, uint, uint> row)
 {
     var writer = context.Writer;
     writer.WriteUInt16((ushort) row.Column1);
     writer.WriteIndex(TableStream.StringIndexSize, row.Column2);
     writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.TypeDefOrRef).IndexSize, row.Column3);
 }
コード例 #4
0
        protected override void WriteRow(WritingContext context, MetadataRow <uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteIndex(TableStream.GetTable(MetadataTokenType.Method).IndexSize, row.Column1);
            writer.WriteIndex(TableStream.BlobIndexSize, row.Column2);
        }
コード例 #5
0
 internal AssemblyRefProcessor(MetadataHeader header, MetadataToken token, MetadataRow <uint, uint> row)
     : base(header, token, row)
 {
     Processor  = row.Column1;
     _reference = new LazyValue <AssemblyReference>(() =>
                                                    header.GetStream <TableStream>().GetTable <AssemblyReference>()[(int)(row.Column1 - 1)]);
 }
コード例 #6
0
        protected override void WriteRow(WritingContext context, MetadataRow <uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteIndex(TableStream.GetTable(MetadataTokenType.TypeDef).IndexSize, row.Column1);
            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.TypeDefOrRef).IndexSize, row.Column2);
        }
コード例 #7
0
        protected override void WriteRow(WritingContext context, MetadataRow <uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.HasFieldMarshal).IndexSize, row.Column1);
            writer.WriteIndex(TableStream.BlobIndexSize, row.Column2);
        }
コード例 #8
0
        protected override void WriteRow(WritingContext context, MetadataRow <uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt32(row.Column1);
            writer.WriteUInt32(row.Column2);
        }
コード例 #9
0
 internal PropertyDefinition(MetadataHeader header, MetadataToken token, MetadataRow <ushort, uint, uint> row)
     : base(header, token, row)
 {
     Attributes = (PropertyAttributes)row.Column1;
     _name      = new LazyValue <string>(() => header.GetStream <StringStream>().GetStringByOffset(row.Column2));
     _signature = new LazyValue <PropertySignature>(() => PropertySignature.FromReader(header, header.GetStream <BlobStream>().CreateBlobReader(row.Column3)));
 }
コード例 #10
0
ファイル: FieldRvaTable.cs プロジェクト: zsr2531/AsmResolver
        protected override void WriteRow(WritingContext context, MetadataRow <DataSegment, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt32((uint)row.Column1.GetRva(context.Assembly));
            writer.WriteIndex(TableStream.GetTable(MetadataTokenType.Field).IndexSize, row.Column2);
        }
コード例 #11
0
        protected override void WriteRow(WritingContext context, MetadataRow <ParameterAttributes, ushort, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt16((ushort)row.Column1);
            writer.WriteUInt16(row.Column2);
            writer.WriteIndex(TableStream.StringIndexSize, row.Column3);
        }
コード例 #12
0
ファイル: NestedClassTable.cs プロジェクト: xuhaoa/WinPIT
        protected override void WriteRow(WritingContext context, MetadataRow <uint, uint> row)
        {
            var writer          = context.Writer;
            var definitionTable = TableStream.GetTable(MetadataTokenType.TypeDef);

            writer.WriteIndex(definitionTable.IndexSize, row.Column1);
            writer.WriteIndex(definitionTable.IndexSize, row.Column2);
        }
コード例 #13
0
ファイル: FileDefinition.cs プロジェクト: micax/AsmResolver
 internal FileDefinition(MetadataHeader header, MetadataToken token, MetadataRow <uint, uint, uint> row)
     : base(header, token, row)
 {
     Attributes = (FileAttributes)row.Column1;
     _name      = new LazyValue <string>(() => header.GetStream <StringStream>().GetStringByOffset(row.Column2));
     _hashValue = new LazyValue <DataBlobSignature>(() =>
                                                    DataBlobSignature.FromReader(header.GetStream <BlobStream>().CreateBlobReader(row.Column3)));
 }
コード例 #14
0
        protected override void WriteRow(WritingContext context, MetadataRow <uint, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.HasCustomAttribute).IndexSize, row.Column1);
            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.CustomAttributeType).IndexSize, row.Column2);
            writer.WriteIndex(TableStream.BlobIndexSize, row.Column3);
        }
コード例 #15
0
ファイル: MethodSemanticsTable.cs プロジェクト: xuhaoa/WinPIT
        protected override void WriteRow(WritingContext context, MetadataRow <MethodSemanticsAttributes, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt16((ushort)row.Column1);
            writer.WriteIndex(TableStream.GetTable(MetadataTokenType.Method).IndexSize, row.Column2);
            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.HasSemantics).IndexSize, row.Column3);
        }
コード例 #16
0
        protected override void WriteRow(WritingContext context, MetadataRow <uint, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.MemberRefParent).IndexSize, row.Column1);
            writer.WriteIndex(TableStream.StringIndexSize, row.Column2);
            writer.WriteIndex(TableStream.BlobIndexSize, row.Column3);
        }
コード例 #17
0
ファイル: AssemblyRefOs.cs プロジェクト: micax/AsmResolver
 internal AssemblyRefOs(MetadataHeader header, MetadataToken token, MetadataRow <uint, uint, uint, uint> row)
     : base(header, token, row)
 {
     PlatformId   = row.Column1;
     MajorVersion = row.Column2;
     MinorVersion = row.Column3;
     Reference    = header.GetStream <TableStream>().GetTable <AssemblyReference>()[(int)(row.Column4 - 1)];
 }
コード例 #18
0
        protected override void WriteRow(WritingContext context, MetadataRow <SecurityAction, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt16((ushort)row.Column1);
            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.HasDeclSecurity).IndexSize, row.Column2);
            writer.WriteIndex(TableStream.BlobIndexSize, row.Column3);
        }
コード例 #19
0
        protected override void WriteRow(WritingContext context, MetadataRow <FileAttributes, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt32((uint)row.Column1);
            writer.WriteIndex(TableStream.StringIndexSize, row.Column2);
            writer.WriteIndex(TableStream.BlobIndexSize, row.Column3);
        }
コード例 #20
0
        protected override void WriteRow(WritingContext context, MetadataRow <ushort, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt16(row.Column1);
            writer.WriteUInt32(row.Column2);
            writer.WriteIndex(TableStream.GetTable(MetadataTokenType.TypeDef).IndexSize, row.Column3);
        }
コード例 #21
0
        protected override void WriteRow(WritingContext context, MetadataRow <ushort, GenericParameterAttributes, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt16(row.Column1);
            writer.WriteUInt16((ushort)row.Column2);
            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.TypeOrMethodDef).IndexSize, row.Column3);
            writer.WriteIndex(TableStream.StringIndexSize, row.Column4);
        }
コード例 #22
0
        protected override void WriteRow(WritingContext context, MetadataRow <ImplementationMapAttributes, uint, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt16((ushort)row.Column1);
            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.MemberForwarded).IndexSize, row.Column2);
            writer.WriteIndex(TableStream.StringIndexSize, row.Column3);
            writer.WriteIndex(TableStream.GetTable(MetadataTokenType.ModuleRef).IndexSize, row.Column4);
        }
コード例 #23
0
ファイル: FieldLayout.cs プロジェクト: micax/AsmResolver
        internal FieldLayout(MetadataHeader header, MetadataToken token, MetadataRow <uint, uint> row)
            : base(header, token, row)
        {
            Offset = row.Column1;

            var tableStream = header.GetStream <TableStream>();

            _field = new LazyValue <FieldDefinition>(() => tableStream.GetTable <FieldDefinition>()[(int)(row.Column2 - 1)]);
        }
コード例 #24
0
        protected override void WriteRow(WritingContext context, MetadataRow <uint, ManifestResourceAttributes, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt32(row.Column1);
            writer.WriteUInt32((uint)row.Column2);
            writer.WriteIndex(TableStream.StringIndexSize, row.Column3);
            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.Implementation).IndexSize, row.Column4);
        }
コード例 #25
0
        internal ParameterDefinition(MetadataHeader header, MetadataToken token, MetadataRow <ushort, ushort, uint> row)
            : base(header, token, row)
        {
            var stringStream = header.GetStream <StringStream>();

            Attributes = (ParameterAttributes)row.Column1;
            Sequence   = row.Column2;
            _name      = new LazyValue <string>(() => stringStream.GetStringByOffset(row.Column3));
        }
コード例 #26
0
        protected override void WriteRow(WritingContext context, MetadataRow <ElementType, byte, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteByte((byte)row.Column1);
            writer.WriteByte(row.Column2);
            writer.WriteIndex(TableStream.GetIndexEncoder(CodedIndex.HasConstant).IndexSize, row.Column3);
            writer.WriteIndex(TableStream.BlobIndexSize, row.Column4);
        }
コード例 #27
0
        internal FieldDefinition(MetadataHeader header, MetadataToken token, MetadataRow <ushort, uint, uint> row)
            : base(header, token, row)
        {
            var stringStream = header.GetStream <StringStream>();

            Attributes = (FieldAttributes)row.Column1;
            _name      = new LazyValue <string>(() => stringStream.GetStringByOffset(row.Column2));
            _signature = new LazyValue <FieldSignature>(() =>
                                                        FieldSignature.FromReader(header, header.GetStream <BlobStream>().CreateBlobReader(row.Column3)));
        }
コード例 #28
0
        protected override void WriteRow(WritingContext context, MetadataRow <ushort, uint, uint, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt16(row.Column1);
            writer.WriteIndex(TableStream.StringIndexSize, row.Column2);
            writer.WriteIndex(TableStream.GuidIndexSize, row.Column3);
            writer.WriteIndex(TableStream.GuidIndexSize, row.Column4);
            writer.WriteIndex(TableStream.GuidIndexSize, row.Column5);
        }
コード例 #29
0
ファイル: ClassLayout.cs プロジェクト: micax/AsmResolver
        public ClassLayout(MetadataHeader header, MetadataToken token, MetadataRow <ushort, uint, uint> row)
            : base(header, token, row)
        {
            PackingSize = row.Column1;
            ClassSize   = row.Column2;

            var tableStream = header.GetStream <TableStream>();

            _parent = new LazyValue <TypeDefinition>(() => tableStream.GetTable <TypeDefinition>()[(int)(row.Column3 - 1)]);
        }
コード例 #30
0
        protected override void WriteRow(WritingContext context, MetadataRow <FileSegment, MethodImplAttributes, MethodAttributes, uint, uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt32((uint)(row.Column1 != null ? row.Column1.GetRva(context.Assembly) : 0));
            writer.WriteUInt16((ushort)row.Column2);
            writer.WriteUInt16((ushort)row.Column3);
            writer.WriteIndex(TableStream.StringIndexSize, row.Column4);
            writer.WriteIndex(TableStream.BlobIndexSize, row.Column5);
            writer.WriteIndex(TableStream.GetTable(MetadataTokenType.Param).IndexSize, row.Column6);
        }