public DefaultTextPointPrimitive( TextBuffer textBuffer, int position, ITextSearchService findLogic, IEditorOptions editorOptions, ITextStructureNavigator textStructureNavigator, IBufferPrimitivesFactoryService bufferPrimitivesFactory) { if ((position < 0) || (position > textBuffer.AdvancedTextBuffer.CurrentSnapshot.Length)) { throw new ArgumentOutOfRangeException(nameof(position)); } _textBuffer = textBuffer; _trackingPoint = _textBuffer.AdvancedTextBuffer.CurrentSnapshot.CreateTrackingPoint(0, PointTrackingMode.Positive); _editorOptions = editorOptions; _textStructureNavigator = textStructureNavigator; _findLogic = findLogic; _bufferPrimitivesFactory = bufferPrimitivesFactory; MoveTo(position); }
public DefaultBufferPrimitive(ITextBuffer textBuffer, IBufferPrimitivesFactoryService bufferPrimitivesFactory) { _textBuffer = textBuffer; _bufferPrimitivesFactory = bufferPrimitivesFactory; }
public BufferPrimitives(ITextBuffer textBuffer, IBufferPrimitivesFactoryService bufferPrimitivesFactory) { _textBuffer = bufferPrimitivesFactory.CreateTextBuffer(textBuffer); }
internal DefaultTextViewPrimitive(ITextView textView, IViewPrimitivesFactoryService viewPrimitivesFactory, IBufferPrimitivesFactoryService bufferPrimitivesFactory) { _textView = textView; _viewPrimitivesFactory = viewPrimitivesFactory; _textBuffer = bufferPrimitivesFactory.CreateTextBuffer(textView.TextBuffer); _caret = _viewPrimitivesFactory.CreateCaret(this); _selection = _viewPrimitivesFactory.CreateSelection(this); }