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); }
public async Task <bool> ApplyAsync(CancellationToken cancellationToken) { _projectPropertiesValues = await _referenceHandler.GetAttributesAsync(_selectedConfiguredProject, _itemSpecification); await _referenceHandler.RemoveReferenceAsync(_selectedConfiguredProject, _itemSpecification); return(true); }
public async Task ExecuteAsync() { _projectPropertiesValues = await _referenceHandler.GetAttributesAsync(_selectedConfiguredProject, _itemSpecification); await _referenceHandler.RemoveReferenceAsync(_selectedConfiguredProject, _itemSpecification); }