private void AddKeywordsToRequest() { if (!string.IsNullOrEmpty(_Keywords)) { _request.AddParameter("Keywords".ToLower(), _Keywords); } if (_BooleanOperator == BooleanOperator.OR) { _request.AddParameter("BooleanOperator".ToLower(), _BooleanOperator.ToString()); } }
public static string ToQueryForm(this BooleanOperator op) { switch (op) { case BooleanOperator.And: return("AND"); case BooleanOperator.Or: return("OR"); default: throw new NotImplementedException(op.ToString()); } }
public static string ToStatementString(this BooleanOperator Operator) { switch (Operator) { case BooleanOperator.And: return("&&"); case BooleanOperator.Or: return("||"); case BooleanOperator.none: return(""); default: throw new ApplicationException("unsupported enum " + Operator.ToString()); } }