Base class for Method Descriptors
Inheritance: Member
		internal ImplMap(ushort flag, Method implMeth, string iName, ModuleRef mScope) 
		{
			flags = flag;
			meth = implMeth;
			importName = iName;
			importScope = mScope;
			tabIx = MDTable.ImplMap;
			if (iName == null) flags |= NoMangle;
			//throw(new NotYetImplementedException("PInvoke "));
		}
		internal CustomAttribute(MetaDataElement paren, Method constrType, 
				Constant val) {
			parent = paren;
			type = constrType;
			cVal = val;
			tabIx = MDTable.CustomAttribute;
		}
		internal CustomAttribute(MetaDataElement paren, Method constrType,
				byte[] val) {
			parent = paren;
			type = constrType;
			tabIx = MDTable.CustomAttribute;
			byteVal = val;
		}
		/// <summary>
		/// Add a custom attribute to this item
		/// </summary>
		/// <param name="ctorMeth">the constructor method for this attribute</param>
		/// <param name="val">the byte value of the parameters</param>
		public void AddCustomAttribute(Method ctorMeth, byte[] val) 
		{
			if (customAttributes == null) {
				customAttributes = new ArrayList();
			} 
			customAttributes.Add(new CustomAttribute(this,ctorMeth,val));
		}
		/// <summary>
		/// Add a custom attribute to this item
		/// </summary>
		/// <param name="ctorMeth">the constructor method for this attribute</param>
		/// <param name="val">the constant values of the parameters</param>
		public void AddCustomAttribute(Method ctorMeth, Constant[] cVals) 
		{
			if (customAttributes == null) {
				customAttributes = new ArrayList();
			} 
			//      customAttributes.Add(new CustomAttribute(this,ctorMeth,cVals));
		}
		internal MethodImpl(ClassDef par, Method decl, Method bod)      
		{
			parent = par;
			header = decl;
			body = bod;
			tabIx = MDTable.MethodImpl;
		}
		/// <summary>
		/// Use a method as the implementation for another method (.override)
		/// </summary>
		/// <param name="decl">the method to be overridden</param>
		/// <param name="body">the implementation to be used</param>
		public void AddMethodOverride(Method decl, Method body) 
		{
			metaData.AddToTable(MDTable.MethodImpl,new MethodImpl(this,decl,body));
		}
示例#8
0
文件: Code.cs 项目: REALTOBIZ/mono
		/// <summary>
		/// Add an instruction with a method parameter
		/// </summary>
		/// <param name="inst">the CIL instruction</param>
		/// <param name="m">the method parameter</param>
		public void MethInst(MethodOp inst, Method m) 
		{
			AddToBuffer(new MethInstr((int)inst,m));
		}
		internal MethodSpec (Method meth, GenericMethodSig g_sig) : base ("")
		{
			this.meth = meth;
			this.g_sig = g_sig;
			tabIx = MDTable.MethodSpec;
		}
示例#10
0
文件: Code.cs 项目: REALTOBIZ/mono
		internal MethInstr(int inst, Method m) : base(inst) 
		{
			meth = m;
			size += 4;
		}
示例#11
0
 public void AddCustomAttribute (Method meth, byte [] data, MetaDataElement element)
 {
         metaData.AddCustomAttribute (new CustomAttribute (element, meth, data));
 }
示例#12
0
 public void AddMethodSpec (Method m, GenericMethodSig g_sig)
 {
         MethodSpec ms = new MethodSpec (m, g_sig);
         metaData.AddToTable (MDTable.MethodSpec, ms);
 }
示例#13
0
文件: PEAPI.cs 项目: Profit0004/mono
		public void AddCustomAttribute (Method meth, Constant constant, MetaDataElement element)
		{
			metaData.AddCustomAttribute (new CustomAttribute (element, meth, constant));
			element.HasCustomAttr = true;
		}
示例#14
0
文件: Metadata.cs 项目: psni/mono
		internal CustomAttribute(MetaDataElement paren, Method constrType, 
				Constant val) {
			parent = paren;
			type = constrType;
			cVal = val;
			tabIx = MDTable.CustomAttribute;

			var bac = val as ByteArrConst;
			if (bac != null)
				byteVal = bac.val;
		}