static void PrintExchangeRate(CurrencyRequestType requestType, string fromCurr, string toCurr, CurrencyExchangeRate rate) { if (rate == null) { Console.WriteLine("Failed to get rate for {0} to {1}", fromCurr, toCurr); return; } Console.WriteLine(rate); }
public void Add(CurrencyRequestType requestType, string fromCurr, string toCurr, Action <CurrencyRequestType, string, string, CurrencyExchangeRate> action) { _requests.Enqueue(new CurrencyRequestData(requestType, fromCurr, toCurr, action)); }