Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | None | 0 0
  1.     [JsonConverter(typeof(StringEnumConverter))]
  2.     public enum Comparison
  3.     {
  4.         Eq = 1,
  5.         Lt,
  6.         Lte,
  7.         Gt,
  8.         Gte
  9.     }
  10.  
  11.     public class Condition
  12.     {
  13.         public List<Condition> And { get; set; }
  14.         public List<Condition> Or { get; set; }
  15.         public Comparison? Comparison { get; set; }
  16.         public String ActivityId { get; set; }
  17.         public String ComparisonData { get; set; }
  18.     }
  19.  
  20.  
  21. {
  22.    "and":[
  23.       {
  24.          "comparison":"Eq",
  25.          "activityId":"b4bafd22-c55c-4801-9112-ac6edbe09200",
  26.          "comparisonData":"123546"
  27.       },
  28.       {
  29.          "or":[
  30.             {
  31.                "comparison":"Lte",
  32.                "activityId":"2727c916-8636-4c37-ae78-00df63984c2b",
  33.                "comparisonData":"2"
  34.             },
  35.             {
  36.                "comparison":"Gt",
  37.                "activityId":"ba44848b-99f1-4508-b443-fb46b936a106",
  38.                "comparisonData":"7"
  39.             }
  40.          ]
  41.       }
  42.    ]
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement