Exemplo n.º 1
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;
        }
Exemplo n.º 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);
        }