private ExchangeRateTicket ParseYearExchangeRateData(string[] section, List <ICurrencyMetada> currencyInfos) { ExchangeRateTicket ticket = new ExchangeRateTicket(); for (int i = 1; i < section.Length; i++) { float buy = float.Parse(section[i], CultureInfo.GetCultureInfo("cs-CZ")); ICurrencyMetada metada = currencyInfos[i - 1]; ERDataBase data = new ERDataBase(metada, buy, null); ticket.AddExchangeRateData(data); } return(ticket); }
private void ParseDayTicketBody(string[] body, ref ExchangeRateTicket ticket) { foreach (string line in body) { string[] sections = line.Split('|', StringSplitOptions.RemoveEmptyEntries); string country = sections[0]; string name = sections[1]; int quantity = int.Parse(sections[2]); string isoName = sections[3]; float buy = float.Parse(sections[4], CultureInfo.GetCultureInfo("cs-CZ")); ICurrencyData data = new ERDataBase(isoName, name, country, quantity, buy, null); ticket.AddExchangeRateData(data); } }