Ejemplo n.º 1
0
 public void Dispose()
 {
     if (_tagger != null)
     {
         _tagger.TagsChanged -= OnTagsChanged;
         _tagger.Release();
         _tagger = null;
     }
 }
Ejemplo n.º 2
0
        public ITagger <T> CreateTagger <T>(ITextBuffer buffer) where T : ITag
        {
            if (typeof(T) == typeof(ISemanticBlockTag))
            {
                GenericBlockTagger tagger = buffer.Properties.GetOrCreateSingletonProperty <GenericBlockTagger>(typeof(VbBlockTaggerProvider), delegate
                {
                    return(new GenericBlockTagger(buffer, new VbParser()));
                });

                return(new DisposableTagger(tagger) as ITagger <T>);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 3
0
 public DisposableTagger(GenericBlockTagger tagger)
 {
     _tagger = tagger;
     _tagger.AddRef();
     _tagger.TagsChanged += OnTagsChanged;
 }