Free cookie consent management tool by TermsFeed Policy Generator

source: tags/3.3.11/HeuristicLab.ExtLibs/HeuristicLab.NRefactory/5.5.0/NRefactory-5.5.0/TypeSystem/Accessibility.cs @ 13398

Last change on this file since 13398 was 11700, checked in by jkarder, 9 years ago

#2077: created branch and added first version

File size: 3.9 KB
Line 
1// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
2//
3// Permission is hereby granted, free of charge, to any person obtaining a copy of this
4// software and associated documentation files (the "Software"), to deal in the Software
5// without restriction, including without limitation the rights to use, copy, modify, merge,
6// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
7// to whom the Software is furnished to do so, subject to the following conditions:
8//
9// The above copyright notice and this permission notice shall be included in all copies or
10// substantial portions of the Software.
11//
12// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
13// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
15// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
17// DEALINGS IN THE SOFTWARE.
18
19using System;
20
21namespace ICSharpCode.NRefactory.TypeSystem
22{
23  /// <summary>
24  /// Enum that describes the accessibility of an entity.
25  /// </summary>
26  public enum Accessibility : byte
27  {
28    // note: some code depends on the fact that these values are within the range 0-7
29   
30    /// <summary>
31    /// The entity is completely inaccessible. This is used for C# explicit interface implementations.
32    /// </summary>
33    None,
34    /// <summary>
35    /// The entity is only accessible within the same class.
36    /// </summary>
37    Private,
38    /// <summary>
39    /// The entity is accessible everywhere.
40    /// </summary>
41    Public,
42    /// <summary>
43    /// The entity is only accessible within the same class and in derived classes.
44    /// </summary>
45    Protected,
46    /// <summary>
47    /// The entity is accessible within the same project content.
48    /// </summary>
49    Internal,
50    /// <summary>
51    /// The entity is accessible both everywhere in the project content, and in all derived classes.
52    /// </summary>
53    /// <remarks>This corresponds to C# 'protected internal'.</remarks>
54    ProtectedOrInternal,
55    /// <summary>
56    /// The entity is accessible in derived classes within the same project content.
57    /// </summary>
58    /// <remarks>C# does not support this accessibility.</remarks>
59    ProtectedAndInternal,
60  }
61 
62  public interface IHasAccessibility
63  {
64    /// <summary>
65    /// Gets the accessibility of this entity.
66    /// </summary>
67    Accessibility Accessibility { get; }
68   
69    /// <summary>
70    /// Gets a value indicating whether this instance is private.
71    /// </summary>
72    /// <value>
73    /// <c>true</c> if this instance is private; otherwise, <c>false</c>.
74    /// </value>
75    bool IsPrivate { get; }
76   
77    /// <summary>
78    /// Gets a value indicating whether this instance is public.
79    /// </summary>
80    /// <value>
81    /// <c>true</c> if this instance is public; otherwise, <c>false</c>.
82    /// </value>
83    bool IsPublic { get; }
84   
85    /// <summary>
86    /// Gets a value indicating whether this instance is protected.
87    /// </summary>
88    /// <value>
89    /// <c>true</c> if this instance is protected; otherwise, <c>false</c>.
90    /// </value>
91    bool IsProtected { get; }
92   
93    /// <summary>
94    /// Gets a value indicating whether this instance is internal.
95    /// </summary>
96    /// <value>
97    /// <c>true</c> if this instance is internal; otherwise, <c>false</c>.
98    /// </value>
99    bool IsInternal { get; }
100   
101    /// <summary>
102    /// Gets a value indicating whether this instance is protected or internal.
103    /// </summary>
104    /// <value>
105    /// <c>true</c> if this instance is protected or internal; otherwise, <c>false</c>.
106    /// </value>
107    bool IsProtectedOrInternal { get; }
108   
109    /// <summary>
110    /// Gets a value indicating whether this instance is protected and internal.
111    /// </summary>
112    /// <value>
113    /// <c>true</c> if this instance is protected and internal; otherwise, <c>false</c>.
114    /// </value>
115    bool IsProtectedAndInternal { get; }
116  }
117}
Note: See TracBrowser for help on using the repository browser.