Exemplo n.º 1
0
        private static Command getAllRates()
        {
            var cmd = new Command("--all", "Gets all currencies with base Euro.");

            cmd.Handler = CommandHandler.Create(() =>
            {
                NetworkHandler handler = new NetworkHandler();
                var response           = handler.GetRates();
                Console.WriteLine("All stored currencies with base Euro will follow.");
                foreach (var item in response.Result.Rates)
                {
                    Console.WriteLine(item);
                }
            });
            return(cmd);
        }
Exemplo n.º 2
0
 public async Task <SuccessResponse> GetAllRates()
 {
     return(await handler.GetRates());
 }
Exemplo n.º 3
0
            public async Task <bool> GetData()
            {
                var rates = await handler.GetRates();

                return(dbLogic.Insert(rates));
            }