Ejemplo n.º 1
0
        internal static BaseJsonDumper GetWrapperFor(BaseJsonDumper parent, JToken instance, int depth, DumpOptions options)
        {
            switch (instance)
            {
            case JObject jObject when jObject.Count == 0:
                return(new JEmptyObjectDumper(parent, jObject, depth, options));

            case JObject jObject:
                return(new JObjectDumper(parent, jObject, depth, options));

            case JArray jArray when jArray.Count == 0:
                return(new JEmptyArrayDumper(parent, jArray, depth, options));

            case JArray jArray:
                return(new JArrayDumper(parent, jArray, depth, options));

            case JValue jValue:
                return(new JTokenDumper(parent, jValue, depth, options));

            default:
                return(new JTokenDumper(parent, instance, depth, options));
            }
        }
Ejemplo n.º 2
0
 public JObjectDumper(BaseJsonDumper parent, JObject instance, int depth, DumpOptions options)
     : base(parent, instance, depth, options)
 {
 }
Ejemplo n.º 3
0
 public JArrayDumper(BaseJsonDumper parent, JArray instance, int depth, DumpOptions options)
     : base(parent, instance, depth, options)
 {
 }
 public BaseJsonDumper(BaseJsonDumper parent, T jsonValue, int depth, DumpOptions options)
     : base(parent, depth, options)
 {
     JsonValue = jsonValue;
 }
Ejemplo n.º 5
0
 public JTokenDumper(BaseJsonDumper parent, JToken instance, int depth, DumpOptions options)
     : base(parent, instance, depth, options)
 {
 }
Ejemplo n.º 6
0
 protected BaseJsonDumper(BaseJsonDumper parent, int depth, DumpOptions options)
 {
     Parent  = parent;
     Depth   = depth;
     Options = options;
 }