Example #1
0
File: Func.cs Project: nomit007/f4
 public override object callOn(object obj, List args)
 {
     int origSize = [email protected]().sz();
     object[] temp = new object[origSize];
     m_bound.copyInto(temp, 0, m_bound.sz());
     temp[m_bound.sz()] = obj;
     args.copyInto(temp, m_bound.sz()+1, temp.Length-m_bound.sz()-1);
     return m_orig.callList(new List(Sys.ObjType, temp));
 }
Example #2
0
File: Func.cs Project: nomit007/f4
            public override object callList(List args)
            {
                int origReq  = [email protected]().sz();
                int haveSize = m_bound.sz() + args.sz();
                Method m = m_orig.method();
                if (m != null)
                {
                  origReq = m.minParams();
                  if (haveSize > origReq) origReq = haveSize;
                }
                if (origReq <= m_bound.sz()) return m_orig.callList(m_bound);

                object[] temp = new object[haveSize];
                m_bound.copyInto(temp, 0, m_bound.sz());
                args.copyInto(temp, m_bound.sz(), temp.Length-m_bound.sz());
                return m_orig.callList(new List(Sys.ObjType, temp));
            }