Ejemplo n.º 1
0
        public T1 InvokeFunction <T0, T1>(string methodName, T0 arg0)
        {
            if (Instance == null)
            {
                throw new ScriptInvocationException($"Script '{Name}' is not initialized.");
            }

            try
            {
                return(ScriptInvoker <T0, T1> .Function(Instance, methodName, arg0));
            }
            catch (Exception e)
            {
                throw new ScriptInvocationException($"Function '{Name}::{methodName}({typeof(T0).FullName})' threw an exception.", e);
            }
        }
Ejemplo n.º 2
0
        public T0 InvokeFunction <T0>(string methodName)
        {
            if (Instance == null)
            {
                throw new ScriptInvocationException($"Script '{Name}' is not initialized.");
            }

            try
            {
                return(ScriptInvoker <T0> .Function(Instance, methodName));
            }
            catch (Exception e)
            {
                throw new ScriptInvocationException($"Function '{Name}::{methodName}()' threw an exception.", e);
            }
        }