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; }
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; }
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; }
internal MethodDef (MetaData md, string name, Param ret_param, Param [] pars) : this (md, 0, 0, name, ret_param, pars) { }
/// <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; }
/// <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); }
/// <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); }
/// <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); }
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; }
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; }
/// <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; }
public MethodDef AddMethod(MethAttr mAtts, ImplAttr iAtts, string name, Type retType, Param[] pars) { return AddMethod (mAtts, iAtts, name, new Param (ParamAttr.Default, "", retType), pars); }
/// <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); }
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) { }
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; }
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; }