public static void _main() { WriteLine("Enter a currency pair like 'EURUSD' to get a quote, or 'q' to quit"); for (string input; (input = ReadLine().ToUpper()) != "Q";) { WriteLine(FxApi.GetRate(input).Map(Decimal.ToString) .Recover(ex => ex.Message).Result); // what to do in case of failure } }
public static void _main() { Retry(10, 100, () => FxApi.GetRate("GBPUSD")); }