private void initializeClient()
 {
     _client = new SwitchClient(new InstanceContext(this));
     try
     {
         _client.Open();
         (_client as ICommunicationObject).Faulted += CtiServiceController_Faulted;
     }
     catch (EndpointNotFoundException)
     {
         CtiServiceSwitch.Run(RightNowGlobalContext);
         initializeClient();
     }
 }
Beispiel #2
0
        private SwitchClient initializeClient()
        {
            var client = new SwitchClient(new InstanceContext(this));

            try {
                client.Open();
                (client as ICommunicationObject).Faulted += CtiServiceController_Faulted;
            }
            catch (EndpointNotFoundException) {
                CtiServiceSwitch.Run(_rightNowContext);
                client = initializeClient();
            }

            return(client);
        }