Beispiel #1
0
        /// <summary>
        /// Invokes the method with the provided 'this' reference and parameters.
        /// <para>An <see cref="InvalidOperationException"/> is thrown if the Invoke fails</para>
        /// </summary>
        /// <param name="obj">The 'this' reference to call the method on.
        /// If this <see cref="IL2CPP_Method"/> is of a static method, provide a null for this parameter</param>
        /// <param name="paramtbl">Parameters to supply to this method. Includes the generic parameters (if there are any)</param>
        /// <returns>The resultant object from the Invoke</returns>
        /// <exception cref="InvalidOperationException"></exception>
        public IL2CPP_Object Invoke(IntPtr obj, params IntPtr[] paramtbl)
        {
            IntPtr returnval = IL2CPP.InvokeMethod(Ptr, obj, paramtbl);

            if (returnval == IntPtr.Zero)
            {
                return(null);
            }
            return(new IL2CPP_Object(returnval, GetReturnType()));
        }