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

ITextViewRoleSet.cs « Editor « TextUI « Def « Text « src - github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ae66092a5fe9fc8b24a5107f64e395d10d1ec54e (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
46
47
48
49
50
51
52
//
//  Copyright (c) Microsoft Corporation. All rights reserved.
//  Licensed under the MIT License. See License.txt in the project root for license information.
//
namespace Microsoft.VisualStudio.Text.Editor
{
    using System;
    using System.Collections.Generic;

#pragma warning disable CA1710 // Identifiers should have correct suffix
    /// <summary>
    /// Set of text view roles.
    /// </summary>
    public interface ITextViewRoleSet : IEnumerable<string>
#pragma warning restore CA1710 // Identifiers should have correct suffix
    {
        /// <summary>
        /// Compute whether the given text view role is a member of the set.
        /// </summary>
        /// <exception cref="ArgumentNullException"><paramref name="textViewRole"/> is null.</exception>
        bool Contains(string textViewRole);

        /// <summary>
        /// Compute whether the set contains all of the given text view roles.
        /// </summary>
        /// <exception cref="ArgumentNullException"> if <paramref name="textViewRoles"/> is null.</exception>
        /// <param name="textViewRoles">The list of roles to check for inclusion.</param>
        /// <remarks>
        /// Returns <b>true</b> if <paramref name="textViewRoles"/> contains no roles. Null values 
        /// in <paramref name="textViewRoles"/> are ignored.
        /// </remarks>
        bool ContainsAll(IEnumerable<string> textViewRoles);

        /// <summary>
        /// Compute whether the set contains at least one of the given text view roles. 
        /// </summary>
        /// <param name="textViewRoles">The list of roles to check for inclusion.</param>
        /// <exception cref="ArgumentNullException"> if <paramref name="textViewRoles"/> is null.</exception>
        /// <remarks>
        /// Returns <b>false</b> if <paramref name="textViewRoles"/> contains no roles. Null values 
        /// in <paramref name="textViewRoles"/> are ignored.
        /// </remarks>
        bool ContainsAny(IEnumerable<string> textViewRoles);

        /// <summary>
        /// Compute the union of the set and another text view role set.
        /// </summary>
        /// <param name="roleSet"></param>
        /// <exception cref="ArgumentNullException"> if <paramref name="roleSet"/> is null.</exception>
        ITextViewRoleSet UnionWith(ITextViewRoleSet roleSet);
    }
}