public Task <bool> HasSuggestedActionsAsync(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken) { if (MethodExtractor.CanExtract(_view) == true) { return(Task.FromResult(true)); } return(Task.FromResult(false)); }
private void Selection_SelectionChanged(object sender, EventArgs e) { var newValue = MethodExtractor.CanExtract(_view); if (newValue != _canExtract) { _canExtract = newValue; SuggestedActionsChanged?.Invoke(this, EventArgs.Empty); } }
public IEnumerable <SuggestedActionSet> GetSuggestedActions(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken) { if (MethodExtractor.CanExtract(_view) == true) { return(new SuggestedActionSet[] { new SuggestedActionSet( new [] { new SuggestedAction(_parent, _view) }, SuggestedActionSetPriority.High ) }); } return(Enumerable.Empty <SuggestedActionSet>()); }