/// <summary> /// Calls the specified function. /// </summary> /// <param name="function">The Lua/MoonSharp function to be called </param> /// <param name="args">The arguments to pass to the function.</param> /// <returns></returns> /// <exception cref="System.ArgumentException">Thrown if function is not of DataType.Function</exception> public DynValue Call(object function, params object[] args) { return(Call(DynValue.FromObject(this, function), args)); }
/// <summary> /// Calls the specified function. /// </summary> /// <param name="function">The Lua/MoonSharp function to be called</param> /// <returns></returns> /// <exception cref="System.ArgumentException">Thrown if function is not of DataType.Function</exception> public DynValue Call(object function) { return(Call(DynValue.FromObject(this, function))); }
/// <summary> /// Creates a coroutine pointing at the specified function. /// </summary> /// <param name="function">The function.</param> /// <returns> /// The coroutine handle. /// </returns> /// <exception cref="System.ArgumentException">Thrown if function is not of DataType.Function or DataType.ClrFunction</exception> public DynValue CreateCoroutine(object function) { return(CreateCoroutine(DynValue.FromObject(this, function))); }
/// <summary> /// Asynchronously calls the specified function. /// /// This method is supported only on .NET 4.x and .NET 4.x PCL targets. /// </summary> /// <param name="ecToken">The execution control token to be associated with the execution of this function</param> /// <param name="function">The Lua/MoonSharp function to be called</param> /// <param name="args">The arguments to pass to the function.</param> /// <returns></returns> /// <exception cref="System.ArgumentException">Thrown if function is not of DataType.Function</exception> public Task <DynValue> CallAsync(ExecutionControlToken ecToken, object function, params object[] args) { return(CallAsync(ecToken, DynValue.FromObject(this, function), args)); }
public Task <DynValue> CallAsync(object function, params object[] args) { return(CallAsync(DynValue.FromObject(this, function), args)); }
public Task <DynValue> CallAsync(object function) { return(CallAsync(DynValue.FromObject(this, function))); }