} // DefaultValue // If this object has a method of the given name, call it, store the // return value in the result parameter, and return true. Otherwise // set result to null and return false. internal virtual bool CallMethodIfPresent( string name, out object result, params object[] args ) { result = null; object method = Get(name); if (method == null) return false; JObject methodObj = method as JFunctionObject; if (methodObj == null) return false; result = methodObj.Call(this, args); return true; } // CallMethodIfPresent