/// <summary>
        /// Writes the decl security table.
        /// </summary>
        /// <param name="metadataSource">The metadata source.</param>
        /// <param name="metadataWriter">The metadata writer.</param>
        private static void WriteDeclSecurityTable(IMetadataProvider metadataSource, MetadataBuilderStage metadataWriter)
        {
            WriteTable(TokenTypes.DeclSecurity, metadataSource, token =>
            {
                DeclSecurityRow row = metadataSource.ReadDeclSecurityRow(token);

                metadataWriter.Write((ushort)row.Action);
                metadataWriter.WriteHasDeclSecurityIndex(row.ParentTableIdx);
                metadataWriter.Write(row.PermissionSetBlobIdx);
            });
        }