예제 #1
0
        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;
                }
            }
        }
예제 #2
0
        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;
                }
            }
        }