当前位置: 首页>>代码示例>>C#>>正文


C# MD.MDTable类代码示例

本文整理汇总了C#中dnlib.DotNet.MD.MDTable的典型用法代码示例。如果您正苦于以下问题:C# MDTable类的具体用法?C# MDTable怎么用?C# MDTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MDTable类属于dnlib.DotNet.MD命名空间,在下文中一共展示了MDTable类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MDTableModel

		public MDTableModel(MDTableHeapModel parent, IMetaData metadata, TablesStream stream, MDTable table) {
			Parent = parent;
			MetaData = metadata;
			Tables = stream;
			MDTable = table;
			Text = string.Format("{0:x2}: {1} (0x{2:x})", (byte)table.Table, table.Name, table.Rows);
		}
开发者ID:mamingxiu,项目名称:dnExplorer,代码行数:7,代码来源:MDTableModel.cs

示例2: MetaDataTableNode

		public MetaDataTableNode(HexDocument doc, MDTable mdTable, IMetaData md)
			: base((ulong)mdTable.StartOffset, (ulong)mdTable.EndOffset - 1) {
			this.doc = doc;
			this.tableInfo = mdTable.TableInfo;
			this.tablesStreamVM = MetaDataTableVM.Create(this, doc, StartOffset, mdTable);
			this.tablesStreamVM.FindMetaDataTable = FindMetaDataTable;
			this.tablesStreamVM.InitializeHeapOffsets((ulong)md.StringsStream.StartOffset, (ulong)md.StringsStream.EndOffset - 1);
		}
开发者ID:GreenDamTan,项目名称:dnSpy,代码行数:8,代码来源:MetaDataTableNode.cs

示例3: GetTableReader

		/// <summary>
		/// Returns a reader positioned at a table row
		/// </summary>
		/// <param name="table">Table</param>
		/// <param name="rid">A valid row ID (i.e., &gt;= <c>1</c> and &lt;= number of rows)</param>
		/// <returns>The reader (owned by us) or <c>null</c> if the row isn't present</returns>
		public IImageStream GetTableReader(MDTable table, uint rid) {
			long offset;
			if (GetRowOffset(table, rid, out offset)) {
				fullStream.Position = offset;
				return fullStream;
			}

			return null;
		}
开发者ID:EmilZhou,项目名称:dnlib,代码行数:15,代码来源:HotTableStream.cs

示例4: MetaDataTableNode

		public MetaDataTableNode(HexBuffer buffer, MDTable mdTable, IMetaData md)
			: base(HexSpan.FromBounds((ulong)mdTable.StartOffset, (ulong)mdTable.EndOffset)) {
			Buffer = buffer;
			TableInfo = mdTable.TableInfo;
			var stringsHeapSpan = HexSpan.FromBounds((ulong)md.StringsStream.StartOffset, (ulong)md.StringsStream.EndOffset);
			var guidHeapSpan = HexSpan.FromBounds((ulong)md.GuidStream.StartOffset, (ulong)md.GuidStream.EndOffset);
			MetaDataTableVM = MetaDataTableVM.Create(this, buffer, Span.Start, mdTable, stringsHeapSpan, guidHeapSpan);
			MetaDataTableVM.FindMetaDataTable = FindMetaDataTable;
		}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:9,代码来源:MetaDataTableNode.cs

示例5: MetaDataTableVM

		protected MetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan) {
			this.buffer = buffer;
			this.stringsHeapSpan = stringsHeapSpan;
			this.guidHeapSpan = guidHeapSpan;
			Owner = owner;
			Span = new HexSpan(startOffset, (ulong)mdTable.Rows * mdTable.RowSize);
			Rows = mdTable.Rows;
			TableInfo = CreateTableInfo(mdTable.TableInfo);
			Collection = new VirtualizedList<MetaDataTableRecordVM>((int)Rows, CreateItem);
		}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:10,代码来源:MetaDataTableVM.cs

示例6: GetReader_NoLock

		IBinaryReader GetReader_NoLock(MDTable table, uint rid) {
			IBinaryReader reader;
			if (hotTableStream != null) {
				reader = hotTableStream.GetTableReader(table, rid);
				if (reader != null)
					return reader;
			}
			reader = table.ImageStream;
			reader.Position = (rid - 1) * table.TableInfo.RowSize;
			return reader;
		}
开发者ID:KitoHo,项目名称:Reflexil,代码行数:11,代码来源:TablesStream_Read.cs

示例7: BinarySearch_NoLock

        /// <inheritdoc/>
        protected override uint BinarySearch_NoLock(MDTable tableSource, int keyColIndex, uint key)
        {
            var keyColumn = tableSource.TableInfo.Columns[keyColIndex];
            uint ridLo = 1, ridHi = tableSource.Rows;
            while (ridLo <= ridHi) {
                uint rid = (ridLo + ridHi) / 2;
                uint key2;
                if (!tablesStream.ReadColumn_NoLock(tableSource, rid, keyColumn, out key2))
                    break;	// Never happens since rid is valid
                if (key == key2)
                    return rid;
                if (key2 > key)
                    ridHi = rid - 1;
                else
                    ridLo = rid + 1;
            }

            return 0;
        }
开发者ID:nufroftsuj,项目名称:dnlib,代码行数:20,代码来源:CompressedMetaData.cs

示例8: Write

		/// <summary>
		/// Writes a <c>AssemblyRefProcessor</c> table
		/// </summary>
		/// <param name="writer">Writer</param>
		/// <param name="table">Table</param>
		public static void Write(this BinaryWriter writer, MDTable<RawAssemblyRefProcessorRow> table) {
			var cols = table.TableInfo.Columns;
			foreach (var row in table) {
				writer.Write(row.Processor);
				cols[1].Write(writer, row.AssemblyRef);
			}
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:12,代码来源:MDTableWriter.cs


注:本文中的dnlib.DotNet.MD.MDTable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。