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

DeferCreationAttribute.cs « EditorOptions « TextLogic « Def « Text « src - github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 77bde55580e67e6158d5b0954ed945d8cc397bba (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
42
43
44
45
// ****************************************************************************
// Copyright (C) Microsoft Corporation.  All Rights Reserved.
// ****************************************************************************
using System;
using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Utilities;

namespace Microsoft.VisualStudio.Text.Editor
{
    /// <summary>
    /// Specifies optional deferred creation semantics.
    /// </summary>
    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Method | AttributeTargets.Field, AllowMultiple = false)]
    public sealed class DeferCreationAttribute : SingletonBaseMetadataAttribute
    {
        private string optionName = string.Empty;

        /// <summary>
        /// Instantiates a new instance of a <see cref="DeferCreationAttribute"/>.
        /// </summary>
        public DeferCreationAttribute()
        {
        }

        /// <summary>
        /// The optional OptionName that controls creation.
        /// </summary>
        public string OptionName
        {
            get
            {
                return this.optionName;
            }
            set
            {
                if (value == null)
                {
                    throw new ArgumentNullException("value");
                }
                this.optionName = value;
            }
        }
    }
}