public override void Evaluate(IScriptContext context) { typeExpr.Evaluate(context); Type type = (Type)context.Result; callExpr.Evaluate(context); object[] arguments = (object[])context.Result; context.Result = RuntimeHost.Binder.BindToConstructor(type, arguments); }
private void CallClassMethod(object obj, string memeberInfo, ScriptFunctionCall scriptFunctionCall, Type[] genericArguments, IScriptContext context) { scriptFunctionCall.Evaluate(context); context.Result = CallAppropriateMethod(context, obj, memeberInfo, genericArguments, (object[])context.Result); }
private static object CallFunction(IInvokable functionDefinition, ScriptFunctionCall scriptFunctionCall, IScriptContext context) { scriptFunctionCall.Evaluate(context); return(functionDefinition.Invoke(context, (object[])context.Result)); }
private static object CallFunction(IInvokable functionDefinition, ScriptFunctionCall scriptFunctionCall, IScriptContext context) { scriptFunctionCall.Evaluate(context); return functionDefinition.Invoke(context, (object[])context.Result); }