コード例 #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;
        }
コード例 #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);
        }