示例#1
0
        public static JSONResult ToJSONResult(JSONDocument document)
        {
            JSONResult result = new JSONResult();

            result.Key     = document.Key;
            result._values = document.ToDictionary();
            return(result);
        }
示例#2
0
 public override int CompareTo(object obj)
 {
     if (obj is JSONResult)
     {
         if (SortField != null)
         {
             JSONResult target = (JSONResult)obj;
             return(SortField.CompareTo(target.SortField));
         }
         throw new ArgumentException();
     }
     throw new ArgumentException();
 }
示例#3
0
 public override bool Equals(object obj)
 {
     if (obj is JSONResult)
     {
         if (SortField != null)
         {
             JSONResult target = (JSONResult)obj;
             return(SortField.Equals(target.SortField));
         }
         return(base.Equals(obj));
     }
     return(false);
 }