Descriptor for a method defined in THIS assembly/module IL .method
Inheritance: Method
コード例 #1
0
		internal GenericParameter (MethodDef owner, MetaData metadata,
				short index, string name, GenericParamAttributes attr) : this (owner, metadata, index, name, attr, true)
		{
		}
コード例 #2
0
		/// <summary>
		/// Add a get method to this property
		/// </summary>
		/// <param name="getter">the get method</param>
		public void AddGetter(MethodDef getter) 
		{
			AddMethod(getter,MethodType.Getter);
			getterMeth = getter;
		}
コード例 #3
0
		/// <summary>
		/// Add another method to this property
		/// </summary>
		/// <param name="other">the method</param>
		public void AddOther(MethodDef other) 
		{
			AddMethod(other,MethodType.Other);
		}
コード例 #4
0
		/// <summary>
		/// Add the fire method to this event
		/// </summary>
		/// <param name="fire">the fire method</param>
		public void AddFire(MethodDef fire) 
		{
			AddMethod(fire,MethodType.Fire);
		}
コード例 #5
0
		/// <summary>
		/// Add a set method to this property
		/// </summary>
		/// <param name="setter">the set method</param>
		public void AddSetter(MethodDef setter) 
		{
			AddMethod(setter,MethodType.Setter);
		}
コード例 #6
0
		/// <summary>
		/// Add the addon method to this event
		/// </summary>
		/// <param name="addon">the addon method</param>
		public void AddAddon(MethodDef addon) 
		{
			AddMethod(addon,MethodType.AddOn);
		}
コード例 #7
0
		/// <summary>
		/// Add the removeon method to this event
		/// </summary>
		/// <param name="removeOn">the removeon method</param>
		public void AddRemoveOn(MethodDef removeOn) 
		{
			AddMethod(removeOn,MethodType.RemoveOn);
		}
コード例 #8
0
		internal void AddMethod(MethodDef meth, MethodType mType) 
		{
			if (tide >= methods.Length) { 
				int len = methods.Length;
				MethodSemantics[] mTmp = methods;
				methods = new MethodSemantics[len * 2];
				for (int i=0; i < len; i++) {
					methods[i] = mTmp[i];
				}
			}
			methods[tide++] = new MethodSemantics(mType,meth,this);
		}
コード例 #9
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;
		}
コード例 #10
0
		internal MethodSemantics(Feature.MethodType mType, MethodDef method, Feature feature) 
		{
			type = mType;
			meth = method;
			eventOrProp = feature;
			tabIx = MDTable.MethodSemantics;
		}
コード例 #11
0
 internal GenericParameter (MethodDef owner, MetaData metadata,
                 short index, string name) : this (owner, metadata, index, name, true)
 {
 }
コード例 #12
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;
 }