Exemplo n.º 1
0
        /// <summary>
        /// Writes the constant table.
        /// </summary>
        /// <param name="metadataSource">The metadata source.</param>
        /// <param name="metadataWriter">The metadata writer.</param>
        private static void WriteConstantTable(IMetadataProvider metadataSource, MetadataBuilderStage metadataWriter)
        {
            ConstantRow row;

            WriteTable(TokenTypes.Constant, metadataSource, token =>
            {
                metadataSource.Read(token, out row);

                metadataWriter.Write((byte)row.Type);
                metadataWriter.Write((byte)0);
                metadataWriter.WriteHasConstantIndex(row.Parent);
                metadataWriter.Write(row.ValueBlobIdx);
            });
        }
Exemplo n.º 2
0
        /// <summary>
        /// Writes the constant table.
        /// </summary>
        /// <param name="metadataSource">The metadata source.</param>
        /// <param name="metadataWriter">The metadata writer.</param>
        private static void WriteConstantTable(IMetadataProvider metadataSource, MetadataBuilderStage metadataWriter)
        {
            ConstantRow row;

            WriteTable(TokenTypes.Constant, metadataSource, token =>
            {
                metadataSource.Read(token, out row);

                metadataWriter.Write((byte)row.Type);
                metadataWriter.Write((byte)0);
                metadataWriter.WriteHasConstantIndex(row.Parent);
                metadataWriter.Write(row.ValueBlobIdx);
            });
        }