ReadContentAsDecimal() public method

public ReadContentAsDecimal ( ) : decimal
return decimal
 public override decimal ReadContentAsDecimal()
 {
     CheckAsync();
     return(_coreReader.ReadContentAsDecimal());
 }
Esempio n. 2
0
 private bool ReadinDate(XmlReader reader, Dictionary<DateTime, List<exRateDate>> theDates, DateTime LastReadDate)
 {
     DateTime rateDate = reader.ReadContentAsDateTime();
     if (LastReadDate.CompareTo(rateDate) < 0)
     {
         List<exRateDate> theRates = new List<exRateDate>();
         exRateDate newKey;
         Decimal theRate = 0m;
         while (reader.Read() && reader.HasAttributes)
         {
             if (reader.MoveToAttribute("currency"))
             {
                 newKey = new exRateDate(rateDate, reader.ReadContentAsString());
                 if (reader.MoveToAttribute("rate"))
                 {
                     try
                     {
                         theRate = reader.ReadContentAsDecimal();
                     }
                     catch
                     {
                         theRate = 0m;
                     }
                 }
                 newKey.rate = theRate;
                 theRates.Add(newKey);
             }
         }
         theDates.Add(rateDate, theRates);
         return true;
     }
     else return false;
 }