Esempio n. 1
0
        private void btnMulInterger_Click(object sender, EventArgs e)
        {
            switch (_selection)
            {
            case 0:
            {
                DumWcfServiceTcp.DumWcfServiceClient tcpClient = new DumWcfServiceTcp.DumWcfServiceClient("NetTcpBinding_IDumWcfService");
                lblMultiplication.Text = "Multiplication of 11 and 12 is : " + tcpClient.MultiplyTwoInteger(11, 12).ToString() + " from TcpClient";
            } break;

            case 1:
            {
                DumWcfServicePipe.DumWcfServiceClient pipeClient = new DumWcfServicePipe.DumWcfServiceClient("NetNamedPipeBinding_IDumWcfService");
                lblMultiplication.Text = "Multiplication of 11 and 12 is : " + pipeClient.MultiplyTwoInteger(11, 12).ToString() + " from pipeClient";
            } break;

            case 2:
            {
                DumWcfServiceHttp.DumWcfServiceClient httpClient = new DumWcfServiceHttp.DumWcfServiceClient("BasicHttpBinding_IDumWcfService");
                lblMultiplication.Text = "Multiplication of 11 and 12 is : " + httpClient.MultiplyTwoInteger(11, 12).ToString() + " from httpClient";
            } break;
            }
        }
Esempio n. 2
0
        private void btnGetText_Click(object sender, EventArgs e)
        {
            switch (_selection)
            {
            case 0:
            {
                DumWcfServiceTcp.DumWcfServiceClient tcpClient = new DumWcfServiceTcp.DumWcfServiceClient("NetTcpBinding_IDumWcfService");
                lblText.Text = tcpClient.GetText() + " from TcpClient";
            } break;

            case 1:
            {
                DumWcfServicePipe.DumWcfServiceClient pipeClient = new DumWcfServicePipe.DumWcfServiceClient("NetNamedPipeBinding_IDumWcfService");
                lblText.Text = pipeClient.GetText() + " from pipeClient";
            } break;

            case 2:
            {
                DumWcfServiceHttp.DumWcfServiceClient httpClient = new DumWcfServiceHttp.DumWcfServiceClient("BasicHttpBinding_IDumWcfService");
                lblText.Text = httpClient.GetText() + " from httpClient";
            } break;
            }
        }