Ejemplo n.º 1
0
        public TokenCounter(ITextBuffer textBuffer, IBufferTagAggregatorFactoryService bufferTagAggregatorFactoryService, string tokenText)
        {
            _textBuffer           = textBuffer;
            _classifierAggregator = bufferTagAggregatorFactoryService.CreateTagAggregator <IClassificationTag>(textBuffer);
            _tokenText            = tokenText;
            _tree = new TokenCountTree(this, _textBuffer.CurrentSnapshot);

            _classifierAggregator.BatchedTagsChanged += HandleClassifierTagsChanged;
        }
Ejemplo n.º 2
0
        public TokenCounter(ITextBuffer textBuffer, IBufferTagAggregatorFactoryService bufferTagAggregatorFactoryService, string tokenText)
        {
            _textBuffer = textBuffer;
            _classifierAggregator = bufferTagAggregatorFactoryService.CreateTagAggregator<IClassificationTag>(textBuffer);
            _tokenText = tokenText;
            _tree = new TokenCountTree(this, _textBuffer.CurrentSnapshot);

            _classifierAggregator.BatchedTagsChanged += HandleClassifierTagsChanged;
        }