public IClassifier GetClassifier(ITextBuffer textBuffer)
        {
            Debug.Assert(_classificationRegistry != null);
              Debug.Assert(_standardClassification != null);

              var classifierKey = typeof(TypeClassifier);
              TypeClassifier classifier;
              if (!textBuffer.Properties.TryGetProperty(classifierKey, out classifier))
              {
            classifier = new TypeClassifier(_standardClassification, _classificationRegistry, textBuffer);
            textBuffer.Properties.AddProperty(classifierKey, classifier);
              }
              return classifier;
        }
Exemple #2
0
        public IClassifier GetClassifier(ITextBuffer textBuffer)
        {
            Debug.Assert(_classificationRegistry != null);
            Debug.Assert(_standardClassification != null);

            var            classifierKey = typeof(TypeClassifier);
            TypeClassifier classifier;

            if (!textBuffer.Properties.TryGetProperty(classifierKey, out classifier))
            {
                classifier = new TypeClassifier(_standardClassification, _classificationRegistry, textBuffer);
                textBuffer.Properties.AddProperty(classifierKey, classifier);
            }
            return(classifier);
        }