private void AddField(QueryValidationInfo validationInfo, IFieldQueryNode node, IQueryVisitorContext context)
 {
     if (!String.IsNullOrEmpty(node.Field))
     {
         if (!node.Field.StartsWith("@"))
         {
             validationInfo.ReferencedFields.Add(node.Field);
         }
     }
     else
     {
         var fields = node.GetDefaultFields(context.DefaultFields);
         if (fields == null || fields.Length == 0)
         {
             validationInfo.ReferencedFields.Add("");
         }
         else
         {
             foreach (string defaultField in fields)
             {
                 validationInfo.ReferencedFields.Add(defaultField);
             }
         }
     }
 }
        private void AddOperation(QueryValidationInfo info, string operation, string field)
        {
            if (String.IsNullOrEmpty(operation))
            {
                return;
            }

            info.Operations.AddOrUpdate(operation,
                                        op => new HashSet <string>(StringComparer.OrdinalIgnoreCase)
            {
                field
            },
                                        (op, collection) => {
                collection.Add(field);
                return(collection);
            }
                                        );
        }