示例#1
0
        public static APIData Parse(this CachedSession oSession)
        {
            svdata _svdata = null;
            var    reader  = new StringReader(oSession.JsonResponse);

            using (var jreader = new JsonTextReader(reader))
                _svdata = JSerializer.Deserialize <svdata>(jreader);
            return(new APIData(_svdata, oSession.Request));
        }
示例#2
0
 public static bool TryParse <T>(this CachedSession oSession, out APIData <T> result)
 {
     try
     {
         result = oSession.Parse <T>();
         return(result.IsSuccess);
     }
     catch
     {
         result = null;
         return(false);
     }
 }
示例#3
0
        public static APIData <T> Parse <T>(this CachedSession oSession)
        {
            var reader = new StringReader(oSession.JsonResponse);

            return(new APIData <T>(Parse <T>(reader), oSession.Request));
        }