コード例 #1
0
        /// <summary>
        /// Extended method invocation that can use . syntax to walk
        /// an object property hierarchy. Slower, but provides support
        /// for . and indexer [] syntax.
        /// </summary>
        /// <param name="method"></param>
        /// <returns></returns>
        public object InvokeEx(string method, params object[] parameters)
        {
            // Instance methods have to have a parameter to be found (arguments array)
            if (parameters == null)
            {
                parameters = new object[] { false }
            }
            ;

            return(ReflectionUtils.CallMethodExCom(Instance, method, parameters));
        }
コード例 #2
0
 public void Redo()
 {
     ReflectionUtils.CallMethodExCom(Instance, "editor.redo", false);
 }
コード例 #3
0
 /// <summary>
 /// Extended method invocation that can use . syntax to walk
 /// an object property hierarchy.
 /// </summary>
 /// <param name="instance"></param>
 /// <param name="method"></param>
 /// <param name="parameters">optional list of parameters. Leave blank if no parameters</param>
 /// <returns></returns>
 public object InvokeEx(object instance, string method, params object[] parameters)
 {
     return(ReflectionUtils.CallMethodExCom(instance, method, parameters));
 }