Descriptor for a parameter of a method defined in this assembly/module
상속: MetaDataElement
예제 #1
0
파일: MethodTable.cs 프로젝트: nobled/mono
		public MethodDefinedEventArgs (string signature, string name, 
			TypeRef return_type, Param[] param_list, bool is_in_table, MethAttr method_attr, 
			ImplAttr impl_attr, CallConv call_conv) : base (signature, name, 
			return_type, param_list, is_in_table)
		{
			MethodAttributes = method_attr;
			ImplAttributes = impl_attr;
			CallConv = call_conv;
		}
예제 #2
0
파일: MethodTable.cs 프로젝트: nobled/mono
		public MethodEventArgs (string signature, string name,
			TypeRef return_type, Param[] param_list, bool is_in_table) 
		{
			Signature = signature;
			Name = name;
			ReturnType = return_type;
			ParamList = param_list;
			IsInTable = is_in_table;
		}
예제 #3
0
		internal MethodDef (MetaData md, MethAttr mAttrSet, ImplAttr iAttrSet, string name, 
				Param ret_param, Param [] pars) 
			: base (name)
		{
			methFlags = (ushort)mAttrSet;
			implFlags = (ushort)iAttrSet;
			this.ret_param = ret_param;
			metaData = md;
			parList = pars;
			if (parList != null) 
				numPars = parList.Length;
			tabIx = MDTable.Method;
		}
예제 #4
0
		internal MethodDef (MetaData md, string name, Param ret_param, Param [] pars)
			: this (md, 0, 0, name, ret_param, pars)
		{
		}
예제 #5
0
		/// <summary>
		/// Add a method to this class
		/// </summary>
		/// <param name="mAtts">attributes for this method</param>
		/// <param name="iAtts">implementation attributes for this method</param>
		/// <param name="name">method name</param>
		/// <param name="retType">return type</param>
		/// <param name="pars">parameters</param>
		/// <returns>a descriptor for this new method</returns>
		public MethodDef AddMethod(MethAttr mAtts, ImplAttr iAtts, string name, 
				Param ret_param, Param [] pars) {
			// Console.WriteLine("Adding method " + name + " to class " + this.name);
			MethodDef meth = new MethodDef (metaData, mAtts, iAtts, name, ret_param, pars);
			methods.Add(meth);
			return meth;
		}
예제 #6
0
		/// <summary>
		/// Add a method to this class
		/// </summary>
		/// <param name="name">method name</param>
		/// <param name="retType">return type</param>
		/// <param name="pars">parameters</param>
		/// <returns>a descriptor for this new method</returns>
		public MethodDef AddMethod(string name, Type retType, Param[] pars) 
		{
			return AddMethod (name, new Param (ParamAttr.Default, "", retType), pars);
		}
예제 #7
0
 /// <summary>
 /// Add a "global" method to this module
 /// </summary>
 /// <param name="mAtts">method attributes</param>
 /// <param name="iAtts">method implementation attributes</param>
 /// <param name="name">method name</param>
 /// <param name="retType">return type</param>
 /// <param name="pars">method parameters</param>
 /// <returns>a descriptor for this new "global" method</returns>
 public MethodDef AddMethod(MethAttr mAtts, ImplAttr iAtts, string name, Type retType, Param[] pars) {
   return moduleClass.AddMethod(mAtts,iAtts,name,retType,pars);
 }
예제 #8
0
 /// <summary>
 /// Add a "global" method to this module
 /// </summary>
 /// <param name="name">method name</param>
 /// <param name="retType">return type</param>
 /// <param name="pars">method parameters</param>
 /// <returns>a descriptor for this new "global" method</returns>
 public MethodDef AddMethod(string name, Type retType, Param[] pars) {
   return moduleClass.AddMethod(name,retType,pars);
 }
예제 #9
0
 internal MethodDef(MetaData md, MethAttr mAttrSet, ImplAttr iAttrSet, string name, Type retType, Param[] pars) : base(name,retType) {
   metaData = md;
                     parList = pars;
                     if (parList != null) numPars = parList.Length;
   // Console.WriteLine("Creating method " + name + " with " + numPars + " parameters");
                     methFlags = (ushort)mAttrSet;
   implFlags = (ushort)iAttrSet;
   tabIx = MDTable.Method;
 }
예제 #10
0
           internal MethodDef(MetaData md, string name, Type retType, Param[] pars) : base(name,retType) {
 metaData = md;
                   parList = pars;
                   if (parList != null) numPars = parList.Length;
 tabIx = MDTable.Method;
           }
예제 #11
0
 /// <summary>
 /// Add a method to this class
 /// </summary>
 /// <param name="name">method name</param>
 /// <param name="retType">return type</param>
 /// <param name="pars">parameters</param>
 /// <returns>a descriptor for this new method</returns>
 public MethodDef AddMethod(string name, Type retType, Param[] pars) {
   // Console.WriteLine("Adding method " + name + " to class " + this.name);
   MethodDef meth = new MethodDef(metaData,name,retType, pars);
   methods.Add(meth);
   return meth;
 }
예제 #12
0
		public MethodDef AddMethod(MethAttr mAtts, ImplAttr iAtts, string name, Type retType, Param[] pars) 
		{
			return AddMethod (mAtts, iAtts, name, new Param (ParamAttr.Default, "", retType), pars);
		}
예제 #13
0
		/// <summary>
		/// Add a "global" method to this module
		/// </summary>
		/// <param name="name">method name</param>
		/// <param name="retType">return type</param>
		/// <param name="pars">method parameters</param>
		/// <returns>a descriptor for this new "global" method</returns>
		public MethodDef AddMethod (string name, Param ret_param, Param [] pars) 
		{
			return moduleClass.AddMethod (name, ret_param, pars);
		}
예제 #14
0
파일: MethodTable.cs 프로젝트: nobled/mono
		public MethodReferencedEventArgs (string signature, string name, 
			TypeRef return_type, Param[] param_list, bool is_in_table) : base (signature, name, 
			return_type, param_list, is_in_table)
		{

		}
예제 #15
0
파일: MethodTable.cs 프로젝트: nobled/mono
		public MethodDef AddDefinition (MethAttr method_attr, ImplAttr impl_attr, CallConv call_conv, 
			string name, TypeRef return_type, Param[] param_list, 
			TypeRef[] param_type_list, Location location) 
		{
			string signature = GetSignature (name, return_type, param_type_list);

			if (MethodDefinedEvent != null)
				MethodDefinedEvent (this, new MethodDefinedEventArgs (signature, name,
					return_type, param_list, table.Contains (signature), method_attr, 
					impl_attr, call_conv));

			MethodTableItem item = (MethodTableItem) table[signature];
			
			if (item == null) {
				MethodDef method = parent_class.AddMethod (method_attr, impl_attr, name, 
					return_type.Type, param_list);
				method.AddCallConv (call_conv);
				AddDefined (signature, method, location);
				return method;
			}
			
			item.Method.AddMethAttribute (method_attr);
			item.Method.AddImplAttribute (impl_attr);
			item.Method.AddCallConv (call_conv);
			item.Defined = true;
		
			return item.Method;
		}
예제 #16
0
파일: MethodTable.cs 프로젝트: nobled/mono
		public Method GetReference (string name, TypeRef return_type, 
			Param[] param_list, TypeRef[] param_type_list, Location location)
		{
			string signature = GetSignature (name, return_type, param_type_list);

			if (MethodReferencedEvent != null)
				MethodReferencedEvent (this, new MethodReferencedEventArgs (signature, name,
					return_type, param_list, table.Contains (signature)));

			MethodTableItem item = table[signature] as MethodTableItem;
			
			if (item != null) {
				item.LocationList.Add (location);
				return item.Method;
			}
			
			MethodDef method = parent_class.AddMethod (name, return_type.Type,
				param_list);
			
			AddReferenced (signature, method, location);

			return method;
		}