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

BaseDefinitionAttribute.cs « BaseUtility « Def « Core « src - github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 538f6bbf6793091a2c95cd54aaf065710d89cea8 (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
36
37
38
39
40
41
//
//  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.Utilities
{
    /// <summary>
    /// Represents a base definition of the current definition.
    /// </summary>
    public sealed class BaseDefinitionAttribute : MultipleBaseMetadataAttribute
    {
        private string baseDefinition;

        /// <summary>
        /// Initializes a new instance of <see cref="BaseDefinitionAttribute"/>.
        /// </summary>
        /// <param name="name">The base definition name. Definition names are case-insensitive.</param>
        /// <exception cref="ArgumentNullException"><paramref name="name"/>is null or an empty string.</exception>
        public BaseDefinitionAttribute(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }
            baseDefinition = name;
        }

        /// <summary>
        /// Gets the base definition name.
        /// </summary>
        public string BaseDefinition
        {
            get
            {
                return baseDefinition;
            }
        }
    }
}