public static new bool TryParse(
     JObject jObject,
     JsonSerializer serializer,
     out FeedRangeInternal feedRangeInternal)
 {
     try
     {
         feedRangeInternal = FeedRangeEPKConverter.ReadJObject(jObject, serializer);
         return(true);
     }
     catch (JsonReaderException)
     {
         DefaultTrace.TraceError("Unable to parse FeedRange for EPK");
         feedRangeInternal = null;
         return(false);
     }
 }
Ejemplo n.º 2
0
        public override object ReadJson(
            JsonReader reader,
            Type objectType,
            object existingValue,
            JsonSerializer serializer)
        {
            if (reader.TokenType == JsonToken.Null)
            {
                return(null);
            }

            if (reader.TokenType != JsonToken.StartObject)
            {
                throw new JsonReaderException();
            }

            JObject jObject = JObject.Load(reader);

            return(FeedRangeEPKConverter.ReadJObject(jObject, serializer));
        }