private StatusEngineResponse ExecuteGetStatus(string processGUID) { using (ChannelFactory <IPatternsProcessorMessages> factory = CreateChannelFactory(processGUID)) { IPatternsProcessorMessages channel = factory.CreateChannel(); try { StatusEngineResponse response = channel.GetStatus(); if (response.ResponseCode != EngineResponseCode.Success) { throw new Exception(response.ErrorMessage); } return(response); } catch (Exception ex) { throw ex; } finally { CloseChannel((ICommunicationObject)channel); } } }