Exemplo n.º 1
0
        /*
         * private void Log(string log)
         * {
         *
         * }*/

        public int Add(int start, int amount)
        {
            try { _diagnostic.Log($"Calculating {start} + {amount}"); }
            catch { }

            return(start + amount);
        }
Exemplo n.º 2
0
        public int Add(int start, int amount)
        {
            string input = start + "," + amount;

            //Send to web server via HttpClient
            string connection = _host + "/add/" + input;

            try { _diagnostic.Log($"Calculating {start} + {amount} using web API."); }
            catch { }

            return(GetRequest(connection));
        }