private static IList<CompletionSet> AugmentCompletionSession(string text, int triggerPosition, out ITextSnapshot snapshot)
 {
     var buffer = new FakeTextBuffer(text);
     var completionSession = new FakeCompletionSession { TriggerPosition = triggerPosition };
     using (var completionSource = new TemplateCompletionSource(buffer))
     {
         var completionSets = new List<CompletionSet>();
         completionSource.AugmentCompletionSession(completionSession, completionSets);
         snapshot = buffer.CurrentSnapshot;
         return completionSets;
     }
 }
예제 #2
0
        private static IList <CompletionSet> AugmentCompletionSession(string text, int triggerPosition, out ITextSnapshot snapshot)
        {
            var buffer            = new FakeTextBuffer(text);
            var completionSession = new FakeCompletionSession {
                TriggerPosition = triggerPosition
            };

            using (var completionSource = new TemplateCompletionSource(buffer))
            {
                var completionSets = new List <CompletionSet>();
                completionSource.AugmentCompletionSession(completionSession, completionSets);
                snapshot = buffer.CurrentSnapshot;
                return(completionSets);
            }
        }