Ejemplo n.º 1
0
 public static void CheckUserParamsZero(TotemFunction function, object sequence)
 {
     var t = sequence.GetType();
     if (typeof(IList).IsAssignableFrom(t))
         throw ValueError("Not a list type");
     IList l = (IList)sequence;
     if (l.Count != 0)
     {
         throw function.BadArgumentError(l.Count + function.NormalArgumentCount);
     }
 }
Ejemplo n.º 2
0
        public static object ExtractParamsArgument(TotemFunction function, int argCnt, TotemArray list)
        {
            if (list.Count != 0)
                return list.Shift();

            throw function.BadArgumentError(argCnt);
        }
Ejemplo n.º 3
0
 public static void CheckParamsZero(TotemFunction function, List<object> extraArgs)
 {
     if (extraArgs.Count != 0)
     {
         throw function.BadArgumentError(extraArgs.Count + function.NormalArgumentCount);
     }
 }
Ejemplo n.º 4
0
 public static Exception FunctionBadArgumentError(TotemFunction function, int count)
 {
     return function.BadArgumentError(count);
 }