Beispiel #1
0
 public CompletionSession(ITextView textView, ITrackingPoint triggerPoint, bool trackCaret, ICompletionPresenterService completionPresenterService, Lazy <ICompletionSourceProvider, IOrderableContentTypeMetadata>[] completionSourceProviders)
 {
     if (textView == null)
     {
         throw new ArgumentNullException(nameof(textView));
     }
     if (triggerPoint == null)
     {
         throw new ArgumentNullException(nameof(triggerPoint));
     }
     if (completionPresenterService == null)
     {
         throw new ArgumentNullException(nameof(completionPresenterService));
     }
     if (completionSourceProviders == null)
     {
         throw new ArgumentNullException(nameof(completionSourceProviders));
     }
     this.completionCollections = new ObservableCollection <CompletionCollection>();
     CompletionCollections      = new ReadOnlyObservableCollection <CompletionCollection>(this.completionCollections);
     Properties        = new PropertyCollection();
     TextView          = textView;
     this.triggerPoint = triggerPoint;
     this.completionPresenterService = completionPresenterService;
     this.completionSourceProviders  = completionSourceProviders;
     //TODO: Use trackCaret
     TextView.Closed += TextView_Closed;
 }