Ejemplo n.º 1
0
        private void btnCall_Click(object sender, EventArgs e)
        {
            DateTime t1= DateTime.Now;
            TaoBaoWCFServiceClient client = null;
            try
            {
                client = new TaoBaoWCFServiceClient("BasicHttpBinding_ITaoBaoWCFService");
                DateTime t2 = DateTime.Now;
                MessageBox.Show((t2 - t1).ToString());

                string result = client.GetOrderData("2015-09-05");
                //MessageBox.Show(result);
                client.Close();
            }
            catch
            {

            }
            finally
            {
                client.Abort();
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            DateTime t1 = DateTime.Now;
            TaoBaoWCFServiceClient client = null;
            try
            {
                client = new TaoBaoWCFServiceClient("BasicHttpBinding_ITaoBaoWCFService");
                DateTime t2 = DateTime.Now;
                Console.WriteLine("Host Start Time: "+(t2 - t1).ToString());

                string result = client.GetOrderData("2015-09-05");
                //MessageBox.Show(result);
                Console.WriteLine(result);
            }
            catch
            {

            }
            finally
            {
                client.Abort();
            }
        }