Exemplo n.º 1
0
 internal AssemblyOs(MetadataHeader header, MetadataToken token, MetadataRow <uint, uint, uint> row)
     : base(header, token, row)
 {
     PlatformId   = row.Column1;
     MajorVersion = row.Column2;
     MinorVersion = row.Column3;
 }
Exemplo n.º 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]);
        }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 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)]);
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 8
0
        protected override void WriteRow(WritingContext context, MetadataRow <uint, uint> row)
        {
            var writer = context.Writer;

            writer.WriteUInt32(row.Column1);
            writer.WriteUInt32(row.Column2);
        }
Exemplo n.º 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)));
 }
Exemplo n.º 10
0
        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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 12
0
        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);
        }
Exemplo n.º 13
0
 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)));
 }
Exemplo n.º 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);
        }
Exemplo n.º 15
0
        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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 17
0
 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)];
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 23
0
        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)]);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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)));
        }
Exemplo n.º 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);
        }
Exemplo n.º 29
0
        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)]);
        }
Exemplo n.º 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);
        }