Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ClassificationTag.cs « Tags « TextLogic « Def « Text « src - github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 32994ab6b160e18d8b90bd10d543afcb01a66eb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
//  Copyright (c) Microsoft Corporation. All rights reserved.
//  Licensed under the MIT License. See License.txt in the project root for license information.
//
using System;

namespace Microsoft.VisualStudio.Text.Tagging
{
    using Microsoft.VisualStudio.Text.Classification;

    /// <summary>
    /// An implementation of <see cref="IClassificationTag" />.
    /// </summary>
    public class ClassificationTag : IClassificationTag
    {
        /// <summary>
        /// Create a new tag associated with the given type of
        /// classification.
        /// </summary>
        /// <param name="type">The type of classification</param>
        /// <exception cref="ArgumentNullException">If the type is passed in as null</exception>
        public ClassificationTag(IClassificationType type)
        {
            if (type == null)
                throw new ArgumentNullException(nameof(type));

            ClassificationType = type;
        }

        /// <summary>
        /// The classification type associated with this tag.
        /// </summary>
        public IClassificationType ClassificationType { get; private set; }
    }
}