This documentation is archived and is not being maintained.

IClassifierAggregatorService Interface

A service that returns an IClassifier that aggregates and normalizes all IClassifier contributions for a ITextBuffer.

Namespace:  Microsoft.VisualStudio.Text.Classification
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

public interface IClassifierAggregatorService

The IClassifierAggregatorService type exposes the following members.

Public methodGetClassifierGets the cached IClassifier for the given ITextBuffer.

This is a MEF component part, and should be imported as follows:

[Import] IClassifierAggregatorService aggregator = null;

The normalized classifications produced by this aggregator are sorted and do not overlap. If a span of text had multiple classifications based on the original classifier contributions, then in the normalized classification it has a transient classification that corresponds to all of the original classifications.

Classifier aggregators are cached for each ITextBuffer.

For more information about classification, see the section "Extending Classification Types and Classification Formats" in Editor Extension Points.