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

QuickInfoItem.cs « QuickInfo « Language « Def « Language « src - github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b890b7aae3fc1d04f54eb555822ab2abd61e6b52 (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
namespace Microsoft.VisualStudio.Language.Intellisense
{
    using System;
    using Microsoft.VisualStudio.Text;
    using Microsoft.VisualStudio.Text.Adornments;

    /// <summary>
    /// The result generated by an <see cref="IAsyncQuickInfoSource"/>.
    /// </summary>
    public sealed class QuickInfoItem
    {
        /// <summary>
        /// Constructs a new instance of <see cref="QuickInfoItem"/>.
        /// </summary>
        /// <exception cref="ArgumentNullException">Thrown if item is null.</exception>
        /// <param name="applicableToSpan">The span to which <paramref name="item"/> is applicable.</param>
        /// <param name="item">The Quick Info item.</param>
        public QuickInfoItem(ITrackingSpan applicableToSpan, object item)
        {
            this.ApplicableToSpan = applicableToSpan;
            this.Item = item ?? throw new ArgumentNullException(nameof(item));
        }

        /// <summary>
        /// The <see cref="ITrackingSpan"/> to which <see cref="Item"/> is applicable.
        /// </summary>
        /// <remarks>
        /// This parameter can be null.
        /// </remarks>
        public ITrackingSpan ApplicableToSpan { get; }

        /// <summary>
        /// The item to be displayed in the Quick Info <see cref="IToolTipPresenter"/>.
        /// </summary>
        public object Item { get; }
    }
}