Example #1
0
        public void RowEnumerationTest()
        {
            var rawRow = new uint[]
            {
                0x0000, 0x0146, 0x0001, 0x0000, 0x0000
            };
            var row = new ModuleDefinitionRow((ushort)rawRow[0], rawRow[1], rawRow[2],
                                              rawRow[3], rawRow[4]);

            RowTestUtils.VerifyRowColumnEnumeration(rawRow, row);
        }
Example #2
0
        /// <summary>
        /// Adds a module metadata row to the buffer.
        /// </summary>
        /// <param name="module">The module to add.</param>
        /// <remarks>
        /// This method only adds the metadata row of the module definition to the module table buffer,
        /// it does not add any type definition to the buffer, nor does it add custom attributes or any
        /// other metadata model object related to this module to the buffer.
        /// </remarks>
        public void DefineModule(ModuleDefinition module)
        {
            var stringsStream = Metadata.StringsStream;
            var guidStream    = Metadata.GuidStream;

            var table = Metadata.TablesStream.GetTable <ModuleDefinitionRow>(TableIndex.Module);
            var row   = new ModuleDefinitionRow(
                module.Generation,
                stringsStream.GetStringIndex(module.Name),
                guidStream.GetGuidIndex(module.Mvid),
                guidStream.GetGuidIndex(module.EncId),
                guidStream.GetGuidIndex(module.EncBaseId));

            var token = table.Add(row);

            _tokenMapping.Register(module, token);
        }
 public ModuleDefinitionRowChangeEvent(ModuleDefinitionRow row, global::System.Data.DataRowAction action) {
     this.eventRow = row;
     this.eventAction = action;
 }
 public void RemoveModuleDefinitionRow(ModuleDefinitionRow row) {
     this.Rows.Remove(row);
 }
 public void AddModuleDefinitionRow(ModuleDefinitionRow row) {
     this.Rows.Add(row);
 }