private void Initialize()
 {
     Logger.Info(new string('-', 42));
     ServiceCallback = new ServiceCallback(this);
     WcfContext = new InstanceContext(ServiceCallback);
     Binding = new NetTcpBinding("NetTcpBinding_IWCFConnection");
     WcfAddress = new EndpointAddress($"net.tcp://{ConnectionSettings.Host}:{ConnectionSettings.Port}/TradingService");
     WcfClient = new WCFConnectionClient(WcfContext, Binding, WcfAddress);
 }
        private void Deinitialize()
        {
            Logger.Trace("Deinitializing connector");
            StopHeartbeat();

            DisposeCommunicationObject(WcfClient, TimeSpan.FromSeconds(0));
            WcfClient = null;
            DisposeCommunicationObject(WcfContext, TimeSpan.FromSeconds(5));
            WcfContext = null;

            ServiceCallback?.Dispose();
            ServiceCallback = null;
        }