private void useUnnamedGroupedSuggestion(List <Suggestion> results, Scope scope, Suggestion toReplace) { if (!(toReplace is UnNamedGroupedSuggestionDecorator)) { UnNamedGroupedSuggestionDecorator groupedSug = new UnNamedGroupedSuggestionDecorator(toReplace, scope); for (int i = 0; i < results.Count; i++) { if (results[i] == toReplace) { results.Remove(toReplace); results.Insert(i, groupedSug); } return; } } }
private void useUnnamedGroupedSuggestion(List<Suggestion> results, Scope scope, Suggestion toReplace) { if (!(toReplace is UnNamedGroupedSuggestionDecorator)) { UnNamedGroupedSuggestionDecorator groupedSug = new UnNamedGroupedSuggestionDecorator(toReplace, scope); for (int i = 0; i < results.Count; i++) { if (results[i] == toReplace) { results.Remove(toReplace); results.Insert(i, groupedSug); } return; } } }