diff options
author | ET <48451158+etvorun@users.noreply.github.com> | 2021-11-03 20:08:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-03 20:08:55 +0300 |
commit | bb2e2214146ffd0d3185b3c5f838617bfdda1338 (patch) | |
tree | 84a6dc4bef9406f631adb56571b406689641ed0d /src/Editor/Text/Def/TextLogic/Classification/IClassificationTypeRegistryService.cs | |
parent | 838aee97b4e6e2e7f91c4e0ce83e03acd2f327a5 (diff) | |
parent | dcaa4dbd6b69045798aafe1ba86bc9e7ad71e0e5 (diff) |
Merge pull request #41 from microsoft/dev/evgenyt/implement_new_interfaces
Implement new interfaces
Diffstat (limited to 'src/Editor/Text/Def/TextLogic/Classification/IClassificationTypeRegistryService.cs')
-rw-r--r-- | src/Editor/Text/Def/TextLogic/Classification/IClassificationTypeRegistryService.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Editor/Text/Def/TextLogic/Classification/IClassificationTypeRegistryService.cs b/src/Editor/Text/Def/TextLogic/Classification/IClassificationTypeRegistryService.cs index 03a45bf..b7f2171 100644 --- a/src/Editor/Text/Def/TextLogic/Classification/IClassificationTypeRegistryService.cs +++ b/src/Editor/Text/Def/TextLogic/Classification/IClassificationTypeRegistryService.cs @@ -86,5 +86,35 @@ namespace Microsoft.VisualStudio.Text.Classification /// </para> /// </remarks> IClassificationType CreateTransientClassificationType(params IClassificationType[] baseTypes); + + /// <summary> + /// Gets the <see cref="IClassificationType"></see> object identified by the specified <paramref name="type"/>. + /// </summary> + /// <param name="layer"> + /// Specifies the layer to which this classification belongs. Layers are specializations + /// of <see cref="IClassificationType"/>s that can be used to make all classifications from + /// one source supersede another. + /// </param> + /// <param name="type"> + /// The name of the classification type. + /// </param> + /// <returns> + /// The classification type, <c>null</c> if there is no classification type of that name. + /// </returns> + ILayeredClassificationType GetClassificationType(ClassificationLayer layer, string type); + + /// <summary> + /// Initializes a new instance of a <see cref="IClassificationType"/> and adds it to the registry. + /// </summary> + /// <param name="layer"> + /// Specifies the layer to which this classification belongs. Layers are specializations + /// of <see cref="IClassificationType"/>s that can be used to make all classifications from + /// one source supersede another. + /// </param> + /// <param name="type">The name of the classification type to create.</param> + /// <param name="baseTypes">The base types of the classification.</param> + /// <returns>A new <see cref="IClassificationType"/>.</returns> + /// <exception cref="InvalidOperationException"><paramref name="type"/> is already in the registry.</exception> + ILayeredClassificationType CreateClassificationType(ClassificationLayer layer, string type, IEnumerable<IClassificationType> baseTypes); } } |