Ejemplo n.º 1
0
        private static async Task <bool> ApplyActionAsync(ProjectSystemReferenceUpdate referenceUpdate, AbstractReferenceHandler referenceHandler,
                                                          ConfiguredProject selectedConfiguredProject, CancellationToken cancellationToken)
        {
            bool wasUpdated = false;

            cancellationToken.ThrowIfCancellationRequested();

            if (referenceUpdate.Action == ProjectSystemUpdateAction.SetTreatAsUsed ||
                referenceUpdate.Action == ProjectSystemUpdateAction.UnsetTreatAsUsed)
            {
                wasUpdated =
                    await referenceHandler.UpdateReferenceAsync(selectedConfiguredProject, referenceUpdate, cancellationToken);
            }
            else
            {
                if (await referenceHandler.CanRemoveReferenceAsync(selectedConfiguredProject, referenceUpdate, cancellationToken))
                {
                    await referenceHandler.RemoveReferenceAsync(selectedConfiguredProject, referenceUpdate.ReferenceInfo);

                    wasUpdated = true;
                }
            }

            return(wasUpdated);
        }
Ejemplo n.º 2
0
        public async Task <bool> ApplyAsync(CancellationToken cancellationToken)
        {
            _projectPropertiesValues = await _referenceHandler.GetAttributesAsync(_selectedConfiguredProject, _itemSpecification);

            await _referenceHandler.RemoveReferenceAsync(_selectedConfiguredProject, _itemSpecification);

            return(true);
        }
Ejemplo n.º 3
0
        public async Task ExecuteAsync()
        {
            _projectPropertiesValues = await _referenceHandler.GetAttributesAsync(_selectedConfiguredProject, _itemSpecification);

            await _referenceHandler.RemoveReferenceAsync(_selectedConfiguredProject, _itemSpecification);
        }