public OperationController(RunningOperation operation, LocLocalizer localizer, Action statusChanged)
 {
     _operation = operation;
     _localizer = localizer;
     if (_operation.Operation == OperationStatus.Running)
     {
         _statusChanged = statusChanged;
     }
 }
 public OperationController(RunningOperation operation, LocLocalizer localizer, Action statusChanged,
                            IObserver <RunningOperation> failing)
 {
     _operation = operation;
     _localizer = localizer;
     _failing   = failing;
     if (_operation.Operation == OperationStatus.Running)
     {
         _statusChanged = statusChanged;
     }
 }
Exemple #3
0
        public OperationController StartOperation(string name)
        {
            return(_dispatcher.Invoke(() =>
            {
                var op = new RunningOperation(Guid.NewGuid().ToString(), name)
                {
                    Status = _localizer.OperationControllerRunning
                };
                if (_operations.Count > 15)
                {
                    Clear();
                }

                _operations.Add(op);
                return new OperationController(op, _localizer, OperationChanged);
            }));
        }