Esempio n. 1
0
 /// <summary>
 /// 数值解析
 /// </summary>
 /// <param name="xmlDeSerializer"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 private static bool tryDeSerializeNumber(XmlDeSerializer xmlDeSerializer, ref T value)
 {
     if (xmlDeSerializer.IsEnumNumberUnsigned())
     {
         ulong intValue = 0;
         xmlDeSerializer.DeSerializeNumber(ref intValue);
         value = AutoCSer.Metadata.EnumGenericType <T, ulong> .FromInt(intValue);
     }
     else if (xmlDeSerializer.State == DeSerializeState.Success)
     {
         return(false);
     }
     return(true);
 }