public IESObject New(ESContext context, IESObject[] args) { try { var objects = ESUtility.ToObjects(args, args.Length); var ctor = _value.GetConstructor(ESUtility.ConvertTo(objects, t => t.GetType())); return(ToVirtual(ctor.Invoke(objects))); } catch (Exception e) { throw new InvalidOperationException(string.Format(ToString() + " Arguments: {0}", args.Format()), e); } }
public static object[] ToObjects(IESObject[] objs, int count) { return(ESUtility.ToObjects(objs, count)); }