Microsoft.JScript.JSWrappedMethod.Construct C# (CSharp) Method

Construct() private method

private Construct ( Object args ) : Object
args Object
return Object
      internal override Object Construct(Object[] args){
        if (this.method is JSMethod)
          return ((JSMethod)(this.method)).Construct(args);
        if (this.method.GetParameters().Length == 0 && this.method.ReturnType == Typeob.Object){
          Object func = this.method.Invoke(this.obj, BindingFlags.SuppressChangeType, null, null, null);
          if (func is ScriptFunction)
            return ((ScriptFunction)func).Construct(args);
        }
        throw new JScriptException(JSError.NoConstructor);
      }