Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.ExtLibs/HeuristicLab.NRefactory/5.5.0/NRefactory-5.5.0/TypeSystem/ISymbol.cs @ 15682

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

#2077: created branch and added first version

File size: 3.1 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  public enum SymbolKind : byte
24  {
25    None,
26    /// <seealso cref="ITypeDefinition"/>
27    TypeDefinition,
28    /// <seealso cref="IField"/>
29    Field,
30    /// <summary>
31    /// The symbol is a property, but not an indexer.
32    /// </summary>
33    /// <seealso cref="IProperty"/>
34    Property,
35    /// <summary>
36    /// The symbol is an indexer, not a regular property.
37    /// </summary>
38    /// <seealso cref="IProperty"/>
39    Indexer,
40    /// <seealso cref="IEvent"/>
41    Event,
42    /// <summary>
43    /// The symbol is a method which is not an operator/constructor/destructor or accessor.
44    /// </summary>
45    /// <seealso cref="IMethod"/>
46    Method,
47    /// <summary>
48    /// The symbol is a user-defined operator.
49    /// </summary>
50    /// <seealso cref="IMethod"/>
51    Operator,
52    /// <seealso cref="IMethod"/>
53    Constructor,
54    /// <seealso cref="IMethod"/>
55    Destructor,
56    /// <summary>
57    /// The accessor method for a property getter/setter or event add/remove.
58    /// </summary>
59    /// <seealso cref="IMethod"/>
60    Accessor,
61    /// <seealso cref="INamespace"/>
62    Namespace,
63    /// <summary>
64    /// The symbol is a variable, but not a parameter.
65    /// </summary>
66    /// <seealso cref="IVariable"/>
67    Variable,
68    /// <seealso cref="IParameter"/>
69    Parameter,
70    /// <seealso cref="ITypeParameter"/>
71    TypeParameter,
72  }
73 
74  /// <summary>
75  /// Interface for type system symbols.
76  /// </summary>
77  public interface ISymbol
78  {
79    /// <summary>
80    /// This property returns an enum specifying which kind of symbol this is
81    /// (which derived interfaces of ISymbol are implemented)
82    /// </summary>
83    SymbolKind SymbolKind { get; }
84   
85    /// <summary>
86    /// Gets the short name of the symbol.
87    /// </summary>
88    string Name { get; }
89   
90    /// <summary>
91    /// Creates a symbol reference that can be used to rediscover this symbol in another compilation.
92    /// </summary>
93    ISymbolReference ToReference();
94  }
95 
96  public interface ISymbolReference
97  {
98    ISymbol Resolve(ITypeResolveContext context);
99  }
100}
Note: See TracBrowser for help on using the repository browser.