CallOneOfTheMembers() private method

private CallOneOfTheMembers ( MemberInfo members, Object arguments, bool construct, Object thisob, Binder binder, CultureInfo culture, String namedParameters, VsaEngine engine ) : Object
members System.Reflection.MemberInfo
arguments Object
construct bool
thisob Object
binder Binder
culture CultureInfo
namedParameters String
engine Microsoft.JScript.Vsa.VsaEngine
return Object
コード例 #1
0
 public static object InvokeMethodInfo(MethodInfo m, object[] arguments, bool construct, object thisob, VsaEngine engine)
 {
     if (engine == null)
     {
         engine = VsaEngine.CreateEngine();
     }
     return(LateBinding.CallOneOfTheMembers(new MemberInfo[] { m }, arguments, construct, thisob, JSBinder.ob, null, null, engine));
 }
コード例 #2
0
ファイル: functionwrapper.cs プロジェクト: ydunk/masters
 internal override Object Call(Object[] args, Object thisob, Binder binder, CultureInfo culture)
 {
     if (thisob is GlobalScope || thisob == null)
     {
         thisob = this.obj;
     }
     else if ((!this.obj.GetType().IsInstanceOfType(thisob) && !(this.obj is ClassScope)))
     {
         if (this.members.Length == 1)
         {
             JSWrappedMethod wm = this.members[0] as JSWrappedMethod;
             if (wm != null && wm.DeclaringType == Typeob.Object)
             {
                 return(LateBinding.CallOneOfTheMembers(new MemberInfo[] { wm.method }, args, false, thisob, binder, culture, null, this.engine));
             }
         }
         throw new JScriptException(JSError.TypeMismatch);
     }
     return(LateBinding.CallOneOfTheMembers(this.members, args, false, thisob, binder, culture, null, this.engine));
 }
コード例 #3
0
        internal override object Call(object[] args, object thisob, Binder binder, CultureInfo culture)
        {
            MethodInfo info = this.members[0] as MethodInfo;

            if (((thisob is GlobalScope) || (thisob == null)) || ((info != null) && ((info.Attributes & MethodAttributes.Static) != MethodAttributes.PrivateScope)))
            {
                thisob = this.obj;
            }
            else if (!this.obj.GetType().IsInstanceOfType(thisob) && !(this.obj is ClassScope))
            {
                if (this.members.Length == 1)
                {
                    JSWrappedMethod method = this.members[0] as JSWrappedMethod;
                    if ((method != null) && (method.DeclaringType == Typeob.Object))
                    {
                        return(LateBinding.CallOneOfTheMembers(new MemberInfo[] { method.method }, args, false, thisob, binder, culture, null, base.engine));
                    }
                }
                throw new JScriptException(JSError.TypeMismatch);
            }
            return(LateBinding.CallOneOfTheMembers(this.members, args, false, thisob, binder, culture, null, base.engine));
        }