Example #1
0
 /// <summary>
 /// 数值解析
 /// </summary>
 /// <param name="jsonDeSerializer"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 private static bool tryDeSerializeNumber(JsonDeSerializer jsonDeSerializer, ref T value)
 {
     if (jsonDeSerializer.IsEnumNumberUnsigned())
     {
         ulong intValue = 0;
         jsonDeSerializer.CallSerialize(ref intValue);
         value = AutoCSer.Metadata.EnumGenericType <T, ulong> .FromInt(intValue);
     }
     else if (jsonDeSerializer.DeSerializeState == DeSerializeState.Success)
     {
         return(false);
     }
     return(true);
 }