public override string Jsonize()
        {
            string jsonizedCond = null;

            switch (TupleType)
            {
            case TupleType.Two:
                jsonizedCond = String.Format("{{\"{0}\":\"{1}\"}},", Name, Value);
                break;

            case TupleType.Three:
                jsonizedCond = String.Format("[\"eq\",\"${0}\",\"{1}\"],", Name, Value);
                break;

            default:
                throw new InvalidEnumArgumentException("Invalid tuple type " + TupleType.ToString());
            }
            return(jsonizedCond);
        }
Exemplo n.º 2
0
 /// <inheritdoc/>
 public override IType VisitTupleType(TupleType type)
 {
     Formatter.Append("*** Unknow type ");
     Formatter.Append(type.ToString());
     return(base.VisitTupleType(type));
 }