Ejemplo n.º 1
0
        public virtual void SelectAnotherAlgo(IAlgo newAlgo)
        {
            var oldAlgo = Algo;
            AlgoChanging?.Invoke(this, oldAlgo, newAlgo);

            Entities = new NiceBindingList<T>();
            Algo = newAlgo;

            AlgoChanged?.Invoke(this, oldAlgo, newAlgo);
        }
Ejemplo n.º 2
0
        public DataStorage(IAlgo algo, int frequencyQueryMilliseconds, Dispatcher currentDispatcher = null)
        {
            _currentDispatcher = currentDispatcher;
            _frequencyQueryMilliseconds = frequencyQueryMilliseconds;

            Algo = algo;

            Entities = new NiceBindingList<T>();

            ApiClient = new ApiClient();

            _timer = new Timer(TimerOnElapsed, null, 0, _frequencyQueryMilliseconds);
        }
Ejemplo n.º 3
0
        protected DataStorage(IAlgo algo, int frequencyQueryMilliseconds)
        {
            _syncContext = SynchronizationContext.Current;
            _frequencyQueryMilliseconds = frequencyQueryMilliseconds;

            Algo = algo;

            Entities = new NiceBindingList <T>();

            ApiClient = new ApiClient();

            _timer = new Timer(TimerOnElapsed, null, 0, _frequencyQueryMilliseconds);
        }