internal GenericParameter (MethodDef owner, MetaData metadata, short index, string name, GenericParamAttributes attr) : this (owner, metadata, index, name, attr, true) { }
/// <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; }
/// <summary> /// Add another method to this property /// </summary> /// <param name="other">the method</param> public void AddOther(MethodDef other) { AddMethod(other,MethodType.Other); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
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); }
/// <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; }
internal MethodSemantics(Feature.MethodType mType, MethodDef method, Feature feature) { type = mType; meth = method; eventOrProp = feature; tabIx = MDTable.MethodSemantics; }
internal GenericParameter (MethodDef owner, MetaData metadata, short index, string name) : this (owner, metadata, index, name, true) { }
/// <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; }