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


C# MDTable类代码示例

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


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

示例1: MethodRow

		public MethodRow(MDTable parent)
		{
			table = parent;
		}
开发者ID:emtees,项目名称:old-code,代码行数:4,代码来源:Rows.cs

示例2: AddToTable

		internal void AddToTable(MDTable tableIx, MetaDataElement elem) 
		{
			if (elem.Row > 0) {
				// Console.Out.WriteLine("ERROR - element already in table " + tableIx);
				return;
			}
			// updates Row field of the element
			// Console.WriteLine("Adding element to table " + (uint)tableIx);
			ArrayList table = GetTable(tableIx);
			elem.Row = (uint)table.Count + 1;
			table.Add(elem);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:12,代码来源:Metadata.cs

示例3: TableIndexSize

		internal uint TableIndexSize(MDTable tabIx) 
		{
			if (largeIx[(uint)tabIx]) return 4;
			return 2;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:5,代码来源:Metadata.cs

示例4: AddToList

 internal void AddToList(ArrayList list, MDTable tabIx)
 {
     Contract.Requires(list != null);
     switch (tabIx)
     {
         case (MDTable.Field): fields.AddRange(list); break;
         case (MDTable.Method): methods.AddRange(list); break;
         case (MDTable.TypeDef): nestedClasses.AddRange(list); break;
         default: throw new Exception("Unknown list type");
     }
 }
开发者ID:dbremner,项目名称:perwapi,代码行数:11,代码来源:MDClassElems.cs

示例5: MapElem

		internal MapElem(ClassDef par, uint elIx, MDTable elemTab) 
		{
			parent = par;
			elemIx = elIx;
			elemTable = elemTab;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:6,代码来源:Metadata.cs

示例6: AddToFeatureList

 internal void AddToFeatureList(ArrayList list, MDTable tabIx)
 {
     if (tabIx == MDTable.Event) {
         events.AddRange(list);
     } else {
         properties.AddRange(list);
     }
 }
开发者ID:nomit007,项目名称:f4,代码行数:8,代码来源:PERWAPI.cs

示例7: AddToTable

        internal void AddToTable(MDTable tableIx, MetaDataElement elem)
        {
            // Console.WriteLine("Adding element to table " + (uint)tableIx);

              ArrayList table = GetTable(tableIx);
              if (table.Contains(elem)) {
            Console.Out.WriteLine("ERROR - element already in table " + tableIx);
            return;
              }
              elem.Row = (uint)table.Count + 1;
              table.Add(elem);
        }
开发者ID:dbremner,项目名称:perwapi,代码行数:12,代码来源:MetaDataOut.cs

示例8: MapElem

 internal MapElem(ClassDef classDef, ClassDef paren, MDTable tableIx)
 {
     theClass = classDef;
     parent = paren;
     tabIx = tableIx;
     sortTable = tabIx == MDTable.NestedClass;
 }
开发者ID:nomit007,项目名称:f4,代码行数:7,代码来源:PERWAPI.cs

示例9: InsertInTable

 internal void InsertInTable(MDTable tabIx, uint ix, MetaDataElement elem)
 {
     Contract.Requires(elem != null);
     tables[(int)tabIx][ix - 1] = elem;
 }
开发者ID:dbremner,项目名称:perwapi,代码行数:5,代码来源:PEReader.cs

示例10: ReadColumn

		/// <summary>
		/// Reads a column
		/// </summary>
		/// <param name="table">The table</param>
		/// <param name="rid">Row ID</param>
		/// <param name="column">Column</param>
		/// <param name="value">Result is put here or 0 if we return <c>false</c></param>
		/// <returns><c>true</c> if we could read the column, <c>false</c> otherwise</returns>
		public bool ReadColumn(MDTable table, uint rid, ColumnInfo column, out uint value) {
			if (table == null || table.IsInvalidRID(rid)) {
				value = 0;
				return false;
			}
			if (columnReader != null && columnReader.ReadColumn(table, rid, column, out value))
				return true;
			var reader = table.ImageStream;
			reader.Position = (rid - 1) * table.TableInfo.RowSize + column.Offset;
			value = column.Read(reader);
			return true;
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:20,代码来源:TablesStream_Read.cs

示例11: ParamRow

		public ParamRow(MDTable parent)
		{
			table = parent;
		}
开发者ID:emtees,项目名称:old-code,代码行数:4,代码来源:Rows.cs

示例12: MakeCodedIndex

 internal uint MakeCodedIndex(CIx code, MDTable tab, uint ix)
 {
     ix <<= MetaData.CIxShiftMap[(uint)code];
     ix &= (uint)tab;
     return ix;
 }
开发者ID:nomit007,项目名称:f4,代码行数:6,代码来源:PERWAPI.cs

示例13: Read

 internal static void Read(PEReader buff, TableRow[] maps, MDTable tab)
 {
     if (tab == MDTable.NestedClass) {
         for (int i=0; i < maps.Length; i++) {
             //maps[i] = new MapElem(buff,tab);
             uint nestClassIx = buff.GetIndex(MDTable.TypeDef);
             uint enclClassIx = buff.GetIndex(MDTable.TypeDef);
             ClassDef parent = (ClassDef)buff.GetElement(MDTable.TypeDef,enclClassIx);
             ClassDef nestClass = ((ClassDef)buff.GetElement(MDTable.TypeDef,nestClassIx)).MakeNestedClass(parent);
             buff.InsertInTable(MDTable.TypeDef,nestClass.Row,nestClass);
         }
     } else { // event or property map
         MapElem prev = new MapElem(buff,tab);
         maps[0] = prev;
         for (int i=1; i < maps.Length; i++) {
             maps[i] = new MapElem(buff,tab);
             prev.endIx = ((MapElem)maps[i]).elemIx;
             prev = (MapElem)maps[i];
         }
         switch (tab) {
             case MDTable.PropertyMap:
                 prev.endIx = buff.GetTableSize(MDTable.Property) + 1;
                 break;
             case MDTable.EventMap:
                 prev.endIx = buff.GetTableSize(MDTable.Event) + 1;
                 break;
             default:
                 prev.endIx = buff.GetTableSize(tab)+1;
                 break;
         }
     }
 }
开发者ID:nomit007,项目名称:f4,代码行数:32,代码来源:PERWAPI.cs

示例14: SetElementPosition

 internal void SetElementPosition(MDTable tabIx, uint ix)
 {
     BaseStream.Position = tableStarts[(int)tabIx] + (md.elemSize[(int)tabIx] * (ix-1));
 }
开发者ID:nomit007,项目名称:f4,代码行数:4,代码来源:PERWAPI.cs

示例15: Size

 internal static uint Size(MetaData md, MDTable tabIx)
 {
     return md.TableIndexSize(MDTable.TypeDef) + md.TableIndexSize(tabIx);
 }
开发者ID:nomit007,项目名称:f4,代码行数:4,代码来源:PERWAPI.cs


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