Exemple #1
0
        /// <summary>
        /// Writes the manifest resource table.
        /// </summary>
        /// <param name="metadataSource">The metadata source.</param>
        /// <param name="metadataWriter">The metadata writer.</param>
        private static void WriteManifestResourceTable(IMetadataProvider metadataSource, MetadataBuilderStage metadataWriter)
        {
            ManifestResourceRow row;

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

                metadataWriter.Write(row.Offset);
                metadataWriter.Write((uint)row.Flags);
                metadataWriter.Write(row.NameStringIdx);
                metadataWriter.WriteImplementationIndex(row.ImplementationTableIdx);
            });
        }
Exemple #2
0
        /// <summary>
        /// Writes the exported type table.
        /// </summary>
        /// <param name="metadataSource">The metadata source.</param>
        /// <param name="metadataWriter">The metadata writer.</param>
        private static void WriteExportedTypeTable(IMetadataProvider metadataSource, MetadataBuilderStage metadataWriter)
        {
            ExportedTypeRow row;

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

                metadataWriter.Write((uint)row.Flags);
                metadataWriter.Write(row.TypeDefTableIdx);
                metadataWriter.Write(row.TypeNameStringIdx);
                metadataWriter.Write(row.TypeNamespaceStringIdx);
                metadataWriter.WriteImplementationIndex(row.ImplementationTableIdx);
            });
        }
        /// <summary>
        /// Writes the manifest resource table.
        /// </summary>
        /// <param name="metadataSource">The metadata source.</param>
        /// <param name="metadataWriter">The metadata writer.</param>
        private static void WriteManifestResourceTable(IMetadataProvider metadataSource, MetadataBuilderStage metadataWriter)
        {
            ManifestResourceRow row;

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

                metadataWriter.Write(row.Offset);
                metadataWriter.Write((uint)row.Flags);
                metadataWriter.Write(row.NameStringIdx);
                metadataWriter.WriteImplementationIndex(row.ImplementationTableIdx);
            });
        }
        /// <summary>
        /// Writes the exported type table.
        /// </summary>
        /// <param name="metadataSource">The metadata source.</param>
        /// <param name="metadataWriter">The metadata writer.</param>
        private static void WriteExportedTypeTable(IMetadataProvider metadataSource, MetadataBuilderStage metadataWriter)
        {
            ExportedTypeRow row;

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

                metadataWriter.Write((uint)row.Flags);
                metadataWriter.Write(row.TypeDefTableIdx);
                metadataWriter.Write(row.TypeNameStringIdx);
                metadataWriter.Write(row.TypeNamespaceStringIdx);
                metadataWriter.WriteImplementationIndex(row.ImplementationTableIdx);
            });
        }