/// <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)
        {
            WriteTable(TokenTypes.Constant, metadataSource, token =>
            {
                ConstantRow row = metadataSource.ReadConstantRow(token);

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