/// <summary>
        /// Writes the event table.
        /// </summary>
        /// <param name="metadataSource">The metadata source.</param>
        /// <param name="metadataWriter">The metadata writer.</param>
        private static void WriteEventTable(IMetadataProvider metadataSource, MetadataBuilderStage metadataWriter)
        {
            WriteTable(TokenTypes.Event, metadataSource, token =>
            {
                EventRow row = metadataSource.ReadEventRow(token);

                metadataWriter.Write((ushort)row.Flags);
                metadataWriter.Write(row.NameStringIdx);
                metadataWriter.WriteTypeDefOrRefIndex(row.EventTypeTableIdx);
            });
        }