コード例 #1
0
        public Strategy_t GetStrategyByName(string providerId, string name, bool resetStrategy)
        {
            Strategies_t strategies = _strategiesDictionary[providerId];

            Strategy_t strategy = strategies[name];

            if (resetStrategy)
            {
                strategy.Reset();
            }

            return(strategy);
        }
コード例 #2
0
        /// <remarks>This method does not throw exceptions as this causes issues with WPF data binding.  Instead it
        /// invokes the ExceptionOccurred event handler (if registered).</remarks>
        private void OnStrategyPropertyChanged(Strategy_t newStrategy)
        {
            try
            {
                if (newStrategy != null)
                {
                    _inputValuesSet = false;

                    if (Atdl4netConfiguration.Settings.Wpf.ResetStrategyOnAssignmentToControl)
                    {
                        newStrategy.Reset();
                    }

                    Render();

                    NotifyStrategyChanged(newStrategy.Name);
                }
            }
            catch (Exception ex)
            {
                NotifyExceptionOccurred(ex);
            }
        }