//the application is closing, shut down all the servers and stuff private void DXWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { //save grid layout using (StreamWriter file = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + "GridLayout.xml")) { InstrumentsGrid.SerializeLayout(file); } //shut down quartz _scheduler.Shutdown(true); //then take down the client, the servers, and the brokers _client.Disconnect(); _client.Dispose(); _realTimeServer.StopServer(); _realTimeServer.Dispose(); _historicalDataServer.StopServer(); _historicalDataServer.Dispose(); RealTimeBroker.Dispose(); HistoricalBroker.Dispose(); }
//the application is closing, shut down all the servers and stuff private void DXWindow_Closing(object sender, CancelEventArgs e) { //save grid layout using (var file = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + "GridLayout.xml")) { InstrumentsGrid.SerializeLayout(file); } //Dispose main viewmodel ViewModel.Dispose(); //then take down the client, the servers, and the brokers _client.Disconnect(); _client.Dispose(); }
//the application is closing, shut down all the servers and stuff private void DXWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { //save grid layout using (StreamWriter file = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + "GridLayout.xml")) { InstrumentsGrid.SerializeLayout(file); } //then take down the client, the servers, and the brokers ViewModel.Client.Dispose(); ViewModel.RealTimeServer.StopServer(); ViewModel.RealTimeServer.Dispose(); ViewModel.DataServer.StopServer(); ViewModel.DataServer.Dispose(); ViewModel.RealTimeBroker.Dispose(); ViewModel.HistoricalBroker.Dispose(); ViewModel.EquityUpdateServer.Dispose(); ViewModel.MessagesServer.Dispose(); }