1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
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:
9
// The above copyright notice and this permission notice shall be included in all copies or
10
// substantial portions of the Software.
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.
20
using System.Collections.Generic;
22
namespace ICSharpCode.NRefactory.TypeSystem
25
/// Represents an unresolved assembly.
27
public interface IUnresolvedAssembly : IAssemblyReference
30
/// Gets the assembly name (short name).
32
string AssemblyName { get; }
34
string Location { get; set; }
37
/// Gets the list of all assembly attributes in the project.
39
IEnumerable<IUnresolvedAttribute> AssemblyAttributes { get; }
42
/// Gets the list of all module attributes in the project.
44
IEnumerable<IUnresolvedAttribute> ModuleAttributes { get; }
47
/// Gets all non-nested types in the assembly.
49
IEnumerable<IUnresolvedTypeDefinition> TopLevelTypeDefinitions { get; }
52
public interface IAssemblyReference
55
/// Resolves this assembly.
57
IAssembly Resolve(ITypeResolveContext context);
61
/// Represents an assembly.
63
public interface IAssembly : IResolved
66
/// Gets the original unresolved assembly.
68
IUnresolvedAssembly UnresolvedAssembly { get; }
71
/// Gets whether this assembly is the main assembly of the compilation.
73
bool IsMainAssembly { get; }
76
/// Gets the assembly name (short name).
78
string AssemblyName { get; }
81
/// Gets the list of all assembly attributes in the project.
83
IList<IAttribute> AssemblyAttributes { get; }
86
/// Gets the list of all module attributes in the project.
88
IList<IAttribute> ModuleAttributes { get; }
91
/// Gets whether the internals of this assembly are visible in the specified assembly.
93
bool InternalsVisibleTo(IAssembly assembly);
96
/// Gets the root namespace for this assembly.
98
INamespace RootNamespace { get; }
101
/// Gets the type definition for a top-level type.
103
/// <remarks>This method uses ordinal name comparison, not the compilation's name comparer.</remarks>
104
ITypeDefinition GetTypeDefinition(string ns, string name, int typeParameterCount);
107
/// Gets all non-nested types in the assembly.
109
IEnumerable<ITypeDefinition> TopLevelTypeDefinitions { get; }