示例#1
0
 private void UpdateCompletions(IEnumerable <CompletionItem> items)
 {
     WritableCompletions.BeginBulkOperation();
     try
     {
         WritableCompletions.Clear();
         WritableCompletions.AddRange(ToCompletions(items));
     }
     finally
     {
         WritableCompletions.EndBulkOperation();
     }
 }
示例#2
0
        private void CreateNormalCompletionListItems(IList <RoslynCompletionItem> completionItems)
        {
            try
            {
                WritableCompletions.BeginBulkOperation();
                WritableCompletions.Clear();

                foreach (var item in completionItems)
                {
                    var completionItem = GetVSCompletion(item);
                    WritableCompletions.Add(completionItem);
                }
            }
            finally
            {
                WritableCompletions.EndBulkOperation();
            }
        }