IClassificationTypeRegistryService.CreateClassificationType Method

Definition

Overloads

CreateClassificationType(String, IEnumerable<IClassificationType>)

Initializes a new instance of a IClassificationType and adds it to the registry.

C++
public:
 Microsoft::VisualStudio::Text::Classification::IClassificationType ^ CreateClassificationType(System::String ^ type, System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Text::Classification::IClassificationType ^> ^ baseTypes);

Parameters

type
String

The name of the classification type to create.

baseTypes
IEnumerable<IClassificationType>

The base types of the classification.

Returns

A new IClassificationType.

Exceptions

type is already in the registry.

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2015, 2017, 2019, 2022

CreateClassificationType(ClassificationLayer, String, IEnumerable<IClassificationType>)

Initializes a new instance of a IClassificationType and adds it to the registry.

C++
public:
 Microsoft::VisualStudio::Text::Classification::ILayeredClassificationType ^ CreateClassificationType(Microsoft::VisualStudio::Text::Classification::ClassificationLayer layer, System::String ^ type, System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Text::Classification::IClassificationType ^> ^ baseTypes);

Parameters

layer
ClassificationLayer

Specifies the layer to which this classification belongs. Layers are specializations of IClassificationTypes that can be used to make all classifications from one source supersede another.

type
String

The name of the classification type to create.

baseTypes
IEnumerable<IClassificationType>

The base types of the classification.

Returns

A new IClassificationType.

Exceptions

type is already in the registry.

Applies to

Visual Studio SDK 2022
Product Versions
Visual Studio SDK 2022