// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team // // Permission is hereby granted, free of charge, to any person obtaining a copy of this // software and associated documentation files (the "Software"), to deal in the Software // without restriction, including without limitation the rights to use, copy, modify, merge, // publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons // to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or // substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. using System; using System.Collections.Generic; using System.Diagnostics.Contracts; using ICSharpCode.NRefactory.Documentation; namespace ICSharpCode.NRefactory.TypeSystem { /// /// Represents an unresolved entity. /// public interface IUnresolvedEntity : INamedElement, IHasAccessibility { /// /// Gets the entity type. /// SymbolKind SymbolKind { get; } /// /// Gets the complete entity region (including header+body) /// DomRegion Region { get; } /// /// Gets the entity body region. /// DomRegion BodyRegion { get; } /// /// Gets the declaring class. /// For members, this is the class that contains the member. /// For nested classes, this is the outer class. For top-level entities, this property returns null. /// IUnresolvedTypeDefinition DeclaringTypeDefinition { get; } /// /// Gets the parsed file in which this entity is defined. /// Returns null if this entity wasn't parsed from source code (e.g. loaded from a .dll with CecilLoader). /// IUnresolvedFile UnresolvedFile { get; } /// /// Gets the attributes on this entity. /// IList Attributes { get; } /// /// Gets whether this entity is static. /// Returns true if either the 'static' or the 'const' modifier is set. /// bool IsStatic { get; } /// /// Returns whether this entity is abstract. /// /// Static classes also count as abstract classes. bool IsAbstract { get; } /// /// Returns whether this entity is sealed. /// /// Static classes also count as sealed classes. bool IsSealed { get; } /// /// Gets whether this member is declared to be shadowing another member with the same name. /// bool IsShadowing { get; } /// /// Gets whether this member is generated by a macro/compiler feature. /// bool IsSynthetic { get; } } /// /// Represents a resolved entity. /// public interface IEntity : ISymbol, ICompilationProvider, INamedElement, IHasAccessibility { /// /// Gets the entity type. /// [Obsolete("Use the SymbolKind property instead.")] EntityType EntityType { get; } /// /// Gets the short name of the entity. /// new string Name { get; } /// /// Gets the complete entity region (including header+body) /// DomRegion Region { get; } /// /// Gets the entity body region. /// DomRegion BodyRegion { get; } /// /// Gets the declaring class. /// For members, this is the class that contains the member. /// For nested classes, this is the outer class. For top-level entities, this property returns null. /// ITypeDefinition DeclaringTypeDefinition { get; } /// /// Gets/Sets the declaring type (incl. type arguments, if any). /// This property will return null for top-level entities. /// If this is not a specialized member, the value returned is equal to . /// IType DeclaringType { get; } /// /// The assembly in which this entity is defined. /// This property never returns null. /// IAssembly ParentAssembly { get; } /// /// Gets the attributes on this entity. /// IList Attributes { get; } /// /// Gets the documentation for this entity. /// DocumentationComment Documentation { get; } /// /// Gets whether this entity is static. /// Returns true if either the 'static' or the 'const' modifier is set. /// bool IsStatic { get; } /// /// Returns whether this entity is abstract. /// /// Static classes also count as abstract classes. bool IsAbstract { get; } /// /// Returns whether this entity is sealed. /// /// Static classes also count as sealed classes. bool IsSealed { get; } /// /// Gets whether this member is declared to be shadowing another member with the same name. /// (C# 'new' keyword) /// bool IsShadowing { get; } /// /// Gets whether this member is generated by a macro/compiler feature. /// bool IsSynthetic { get; } } }