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


C# PEAPI.Class类代码示例

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


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

示例1: IsEnum

		public static bool IsEnum (Class type)
		{
			return IsEnum (type.nameSpace, type.name);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:4,代码来源:Metadata.cs

示例2: AddNestedClass

		/// <summary>
		/// Add a nested class to this class
		/// </summary>
		/// <param name="attrSet">attributes for this nested class</param>
		/// <param name="nsName">nested name space name</param>
		/// <param name="name">nested class name</param>
		/// <param name="sType">super type of this nested class</param>
		/// <returns>a descriptor for this new nested class</returns>
		public ClassDef AddNestedClass(TypeAttr attrSet, string nsName, 
				string name, Class sType) {
			ClassDef nClass = AddNestedClass (attrSet, nsName, name);
			nClass.SetSuper(sType);
			if (ClassDef.IsValueType (sType))
				nClass.MakeValueClass (ValueClass.ValueType);
			else
				if (ClassDef.IsEnum (sType))
					nClass.MakeValueClass (ValueClass.Enum);

			if (ClassDef.IsValueType (sType) || ClassDef.IsEnum (sType))
				nClass.SetTypeIndex (PrimitiveType.ValueType.GetTypeIndex ());

			nClass.typeIndexChecked = true;
			return (nClass);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:24,代码来源:Metadata.cs

示例3: AddImplementedInterface

		/// <summary>
		/// Add an interface that is implemented by this class
		/// </summary>
		/// <param name="iFace">the interface that is implemented</param>
		public void AddImplementedInterface(Class iFace) 
		{
			metaData.AddToTable(MDTable.InterfaceImpl,new InterfaceImpl(this,iFace));
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:8,代码来源:Metadata.cs

示例4: IsValueType

		public static bool IsValueType (Class type)
		{
			return IsValueType (type.nameSpace, type.name);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:4,代码来源:Metadata.cs

示例5: ClassDef

 internal ClassDef(TypeAttr attrSet, string nsName, string name, 
                   MetaData md) : base(nsName, name, md) {
                     metaData = md;
   superType = metaData.mscorlib.GetSpecialSystemClass(PrimitiveType.Object);
   flags = (uint)attrSet;
   tabIx = MDTable.TypeDef;
 }
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:PEAPI.cs

示例6: ClassDef

		internal ClassDef(TypeAttr attrSet, string nsName, string name, 
				MetaData md) : base(nsName, name, md) 
		{
			metaData = md;
			if (! ((nsName == "" && name == "<Module>") || (nsName == "System" && name == "Object")) ) {
				superType = metaData.mscorlib.GetSpecialSystemClass(PrimitiveType.Object);
			}
			flags = (uint)attrSet;
			tabIx = MDTable.TypeDef;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:10,代码来源:Metadata.cs

示例7: CustomModifiedType

		/// <summary>
		/// Create a new custom modifier for a type
		/// </summary>
		/// <param name="type">the type to be modified</param>
		/// <param name="cmod">the modifier</param>
		/// <param name="cmodType">the type reference to be associated with the type</param>
		public CustomModifiedType(Type type, CustomModifier cmod, Class cmodType)
			: base((byte)cmod) 
		{
			this.type = type;
			this.cmodType = cmodType;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:12,代码来源:Metadata.cs

示例8: EndCatchBlock

		/// <summary>
		/// Mark this position as the end of the last started block and
		/// make it a catch block.  This catch block is associated with the
		/// specified try block.
		/// </summary>
		/// <param name="exceptType">the exception type to be caught</param>
		/// <param name="tryBlock">the try block associated with this catch block</param>
		public void EndCatchBlock(Class exceptType, TryBlock tryBlock) 
		{
			Catch catchBlock = new Catch(exceptType,(CILLabel)blockStack[0],
					NewCodedLabel());
			tryBlock.AddHandler(catchBlock);
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:13,代码来源:Code.cs

示例9: InterfaceImpl

		internal InterfaceImpl(ClassDef theClass, Class theInterface) 
		{
			this.theClass = theClass;
			this.theInterface = theInterface;
			tabIx = MDTable.InterfaceImpl;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:6,代码来源:Metadata.cs

示例10: Catch

		/// <summary>
		/// Create a new catch clause
		/// </summary>
		/// <param name="except">the exception to be caught</param>
		/// <param name="handlerStart">start of the handler code</param>
		/// <param name="handlerEnd">end of the handler code</param>
		public Catch(Class except, CILLabel handlerStart, CILLabel handlerEnd)
			: base(handlerStart, handlerEnd)
		{
			exceptType = except;
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:11,代码来源:Code.cs

示例11: AddClass

 /// <summary>
 /// Add a class to this module
 /// </summary>
 /// <param name="attrSet">attributes of this class</param>
 /// <param name="nsName">name space name</param>
 /// <param name="name">class name</param>
 /// <param name="superType">super type of this class (extends)</param>
 /// <returns>a descriptor for this new class</returns>
 public ClassDef AddClass(TypeAttr attrSet, string nsName, string name, Class superType) {
   ClassDef aClass = new ClassDef(attrSet,nsName,name,metaData);
   aClass.SetSuper(superType);
   metaData.AddToTable(MDTable.TypeDef,aClass);
   return aClass;
 }
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:14,代码来源:PEAPI.cs

示例12: SetSuper

 internal void SetSuper(Class sClass) {
   superType = sClass;
   if (sClass is ClassRef)
     typeIndex = superType.GetTypeIndex();
   else
     typeIndexChecked = false;
 }
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:PEAPI.cs

示例13: BuildTables

		internal sealed override void BuildTables(MetaData md) 
		{
			if (done) return;
			if ((flags & (uint)TypeAttr.Interface) != 0) { superType = null; }
			// Console.WriteLine("Building tables for " + name);
			if (layout != null) md.AddToTable(MDTable.ClassLayout,layout);
			// Console.WriteLine("adding methods " + methods.Count);
			methodIx = md.TableIndex(MDTable.Method);
			for (int i=0; i < methods.Count; i++) {
				md.AddToTable(MDTable.Method,(MetaDataElement)methods[i]);
				((MethodDef)methods[i]).BuildTables(md);
			}
			// Console.WriteLine("adding fields");
			fieldIx = md.TableIndex(MDTable.Field);
			for (int i=0; i < fields.Count; i++) {
				md.AddToTable(MDTable.Field,(MetaDataElement)fields[i]);
				((FieldDef)fields[i]).BuildTables(md);
			}
			// Console.WriteLine("adding events and properties");
			if (events != null) { 
				for (int i=0; i < events.Count; i++) {
					md.AddToTable(MDTable.Event,(Event)events[i]);
					((Event)events[i]).BuildTables(md);
				}
				md.AddToTable(MDTable.EventMap,
						new MapElem(this,((Event)events[0]).Row,MDTable.Event));
			}
			if (properties != null) { 
				for (int i=0; i < properties.Count; i++) {
					md.AddToTable(MDTable.Property,(Property)properties[i]);
					((Property)properties[i]).BuildTables(md);
				}
				md.AddToTable(MDTable.PropertyMap,new MapElem(this,
							((Property)properties[0]).Row,MDTable.Property));
			}
			// Console.WriteLine("End of building tables");
			done = true;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:38,代码来源:Metadata.cs

示例14: SetSuper

		internal void SetSuper(Class sClass) 
		{
			superType = sClass;
			if (! (sClass is GenericTypeInst))
				typeIndexChecked = false;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:6,代码来源:Metadata.cs

示例15: ClassType

		public ClassType(Class classDesc) 
		{
			desc = classDesc;
			type = PrimitiveType.ClassType;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:5,代码来源:Metadata.cs


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