private void InitializeClient()
        {
            if (Proxy != null)
            {
                try
                {
                    Proxy.Close();
                }
                catch
                {
                    Proxy.Abort();
                }
            }

            var callback = new AgentCommunicationCallback();

            callback.ServiceCallbackEvent += HandleServiceCallbackEvent;

            var instanceContext = new InstanceContext(callback);
            var dualHttpBinding = new WSDualHttpBinding(WSDualHttpSecurityMode.None);
            var endpointAddress = new EndpointAddress(ServiceEndpointUri);

            Proxy = new AgentCommunicationServiceClient(instanceContext, dualHttpBinding, endpointAddress);
            Proxy.Open();
            Proxy.Connect(_id);
        }
        public override void Cleanup()
        {
            base.Cleanup();
            ViewModelLocator.Cleanup();

            if (Proxy != null)
            {
                try
                {
                    Proxy.Disconnect();
                    Proxy.Close();
                }
                catch
                {
                    Proxy.Abort();
                }
            }
        }