public override object GetValue(ExecutionContext ctx) { string functionName = function.GetValue(ctx).ToString(); Functor f = ctx.GetFunction(functionName); ArrayList arguments = new ArrayList(); if (!emptyArgsList) { if (args.GetType() == typeof(Sequence<Expression>)) { Sequence<Expression> seq = (Sequence<Expression>)args; foreach (Expression ex in (Sequence<Expression>)args) { arguments.Add(ex.GetValue(ctx)); } } else { arguments.Add(((Expression)args).GetValue(ctx)); } } return f.Execute(arguments.ToArray(), ctx); }
public override object GetValue(ExecutionContext ctx) { string functionName = function.GetValue(ctx).ToString(); Functor f = ctx.GetFunction(functionName); ArrayList arguments = new ArrayList(); if (!emptyArgsList) { if (args.GetType() == typeof(Sequence <Expression>)) { Sequence <Expression> seq = (Sequence <Expression>)args; foreach (Expression ex in (Sequence <Expression>)args) { arguments.Add(ex.GetValue(ctx)); } } else { arguments.Add(((Expression)args).GetValue(ctx)); } } return(f.Execute(arguments.ToArray(), ctx)); }