예제 #1
0
        protected async override void OnDisposing()
        {
            if (disposed)
            {
                return;
            }

            await DisconnectSocketAsync(false).ConfigureAwait(true);

            symbolsSubscription.Dispose();
            accountSubscription.Dispose();
            parametersSubscription.Dispose();

            AccountViewModel.Dispose();
            SymbolsViewModel.Dispose();
            StrategyParametersViewModel.Dispose();
            serverMonitorCacheSubscription.Dispose();

            if (StrategyDisplayViewModel != null)
            {
                strategySubscription.Dispose();
                StrategyDisplayViewModel.Dispose();
            }

            strategyAssemblyManager.Dispose();

            commandVisibilitySemaphoreSlim.Dispose();

            disposed = true;
        }
예제 #2
0
        protected async override void OnDisposing()
        {
            if (disposed)
            {
                return;
            }

            await DisconnectSocketAsync(false);

            symbolsSubscription.Dispose();
            accountSubscription.Dispose();
            ordersSubscription.Dispose();
            parametersSubscription.Dispose();

            AccountViewModel.Dispose();
            SymbolsViewModel.Dispose();
            OrdersViewModel.Dispose();
            StrategyParametersViewModel.Dispose();
            strategyAssemblyManager.Dispose();
            serverMonitorCacheSubscription.Dispose();

            if (StrategyDisplayViewModel != null)
            {
                strategySubscription.Dispose();
                StrategyDisplayViewModel.Dispose();
            }

            disposed = true;
        }