Esempio n. 1
0
 public Calculation(ICalculator calculator, IRestCalculationClient client)
 {
     _calculator         = calculator;
     _cancellationSource = new CancellationTokenSource();
     _client             = client;
     _id        = -1;
     _completed = 0;
     Task.Factory.StartNew(async() => await Initialize());
 }
Esempio n. 2
0
 public CalculationManager(ICalculator calculator, IRestCalculationClient calculationClient)
 {
     _calculations         = new ObservableCollection <Calculation>();
     _readOnlyCalculations = new ReadOnlyObservableCollection <Calculation>(_calculations);
     _lock              = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
     _calculator        = calculator;
     _calculationClient = calculationClient;
     Status             = CalculatorStatus.NotStarted;
 }