Param represents one parameter definition of a Func (or Method).
Inheritance: FanObj
Ejemplo n.º 1
0
        /// <summary>
        /// Constructor used by GenericType and we are given the generic
        /// method that is being parameterized.
        /// </summary>
        public Method(Type parent, string name, int flags, Facets facets, int lineNum, Type returns, Type inheritedReturns, List pars, Method generic)
            : base(parent, name, flags, facets, lineNum)
        {
            List fparams = pars.ro();
              if ((flags & (FConst.Static|FConst.Ctor)) == 0)
              {
            object[] temp = new object[pars.sz()+1];
            temp[0] = new Param("this", parent, 0);
            pars.copyInto(temp, 1, pars.sz());
            fparams = new List(Sys.ParamType, temp);
              }

              this.m_func = new MethodFunc(this, returns, fparams);
              this.m_params = pars;
              this.m_inheritedReturns = inheritedReturns;
              this.m_mask = (generic != null) ? 0 : toMask(parent, returns, pars);
              this.m_generic = generic;
        }
Ejemplo n.º 2
0
 //////////////////////////////////////////////////////////////////////////
 // Method Support
 //////////////////////////////////////////////////////////////////////////
 internal List toMethodParams()
 {
     Param[] p = new Param[m_params.Length];
       for (int i=0; i<p.Length; ++i)
     p[i] = new Param(FanStr.m_ascii['a'+i], m_params[i], 0);
       return new List(Sys.ParamType, p);
 }