예제 #1
0
 // IsOneWay = true
 // Operations in progress block clients. They are queued and executed one after the other.
 private void buttonRequestReplyOperation_Click(object sender, EventArgs e)
 {
     try
     {
         listBox1.Items.Add($"Request-Reply Operation Started @{DateTime.Now}");
         buttonRequestReplyOperation.Enabled = false;
         listBox1.Items.Add(client.RequestReplyOperation());
         buttonRequestReplyOperation.Enabled = true;
         listBox1.Items.Add($"Request-Reply Operation Completed @{DateTime.Now}");
         listBox1.Items.Add(string.Empty);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
파일: Form1.cs 프로젝트: mkejeiri/WCF
 private void BtnRequestReplyOperation_Click(object sender, EventArgs e)
 {
     try
     {
         listBox1.Items.Add("Request-Reply Operation Started @ " + DateTime.Now.ToString());
         BtnRequestReplyOperation.Enabled = false;
         listBox1.Items.Add(client.RequestReplyOperation());
         BtnRequestReplyOperation.Enabled = true;
         listBox1.Items.Add("Request-Reply Operation Completed @ " + DateTime.Now.ToString());
         listBox1.Items.Add("");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #3
0
        public ActionResult RequestReplyOperation()
        {
            string message;

            try
            {
                SampleServiceClient client = new SampleServiceClient();
                string processingTime      = client.RequestReplyOperation();
                message = $"Request-Reply Operation Completed @ {DateTime.Now} - {processingTime}";
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }


            return(PartialView("RequestReplyOperation", message));
        }