Beispiel #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);
        }
Beispiel #2
0
        public async Task <bool> ApplyAsync(CancellationToken cancellationToken)
        {
            _projectPropertiesValues = await _referenceHandler.GetAttributesAsync(_selectedConfiguredProject, _itemSpecification);

            await _referenceHandler.RemoveReferenceAsync(_selectedConfiguredProject, _itemSpecification);

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

            await _referenceHandler.RemoveReferenceAsync(_selectedConfiguredProject, _itemSpecification);
        }