public Delegate CreateDelegate(ICLS_Environment env, DeleFunction delefunc)
{
CLS_Content content = new CLS_Content(env);
DeleFunction _func = delefunc;
Action <T, T1, T2> dele = (T param0, T1 param1, T2 param2) =>
{
content.DepthAdd();
content.CallThis = _func.callthis;
content.CallType = _func.calltype;
content.function = _func.function;
var func = _func.calltype.functions[_func.function];
content.DefineAndSet(func._paramnames[0], func._paramtypes[0].type, param0);
content.DefineAndSet(func._paramnames[1], func._paramtypes[1].type, param1);
content.DefineAndSet(func._paramnames[2], func._paramtypes[2].type, param2);
func.expr_runtime.ComputeValue(content);
content.DepthRemove();
};
Delegate d = dele as Delegate;
if ((Type)this.type != typeof(Action <T, T1, T2>))
{
return(Delegate.CreateDelegate(this.type, d.Target, d.Method));
}
else
{
return(dele);
}
}