private IDisposable StartOperation(string operation, string packageId, string mainPackageVersion)
        {
            // If there's a pending operation, don't allow another one to start.
            // This is for the Reinstall case. Because Reinstall just means
            // uninstalling and installing, we don't want the child install operation
            // to override Reinstall value.
            if (_repositoryOperationPending)
            {
                return DisposableAction.NoOp;
            }

            _repositoryOperationPending = true;

            return DisposableAction.All(
                SourceRepository.StartOperation(operation, packageId, mainPackageVersion),
                new DisposableAction(() => _repositoryOperationPending = false));
        }
Ejemplo n.º 2
0
 protected IDisposable StartOperation(string operation)
 {
     return(DisposableAction.All(
                PackageManager.SourceRepository.StartOperation(operation),
                ProjectManager != null ? ProjectManager.SourceRepository.StartOperation(operation) : DisposableAction.NoOp));
 }