protected virtual void Dispose(bool state)
 {
     if (state)
     {
         _client = null;
     }
     ShutdownAsync().Wait();
 }
    protected void Button1_Click(object sender, EventArgs e)
    {
        var client = new MultiplicationServiceClient("BasicHttpBinding_MultiplicationService");

        try
        {
            Response.Write(client.DivideInt(5, 0));
        }
        catch (FaultException <DivisionFault> exception)
        {
            Response.Write(exception.Message);
        }
    }
예제 #3
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        var client = new MultiplicationServiceClient("BasicHttpBinding_MultiplicationService1");

        Response.Write(client.Multiply(5, 5));
    }
 public MultiplicationClient(string host, int port)
 {
     _channel = new Channel(host, port, ChannelCredentials.Insecure);
     _client  = new MultiplicationServiceClient(_channel);
 }