Esempio n. 1
0
        public void TestRestoreConnection()
        {
            WSWebService.WorkstationWebServiceClient webService = ServerConnection.Instance.GetWorkstationWebService();
            webService.Close();
            webService = ServerConnection.Instance.RestoreConnection();
            Assert.NotNull(webService, "ServerConnectionTest:TestRestoreConnection() #01");
            Assert.AreEqual(System.ServiceModel.CommunicationState.Created, webService.State, "ServerConnectionTest:TestRestoreConnection() #02");

            webService.Open();
            Assert.AreEqual(System.ServiceModel.CommunicationState.Opened, webService.State, "ServerConnectionTest:TestRestoreConnection() #03");
        }
Esempio n. 2
0
 private ServerConnection()
 {
     // Build the connection to the WorkstationWebService
     webService = new WSWebService.WorkstationWebServiceClient("BasicHttpBinding_IWorkstationWebService");
 }
Esempio n. 3
0
 public WSWebService.WorkstationWebServiceClient RestoreConnection()
 {
     // Restore the connection.
     webService = new WSWebService.WorkstationWebServiceClient("BasicHttpBinding_IWorkstationWebService");
     return(webService);
 }