// 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 ICSharpCode.NRefactory.Utils; namespace ICSharpCode.NRefactory.TypeSystem { public interface ICompilation { /// /// Gets the current assembly. /// IAssembly MainAssembly { get; } /// /// Gets the type resolve context that specifies this compilation and no current assembly or entity. /// ITypeResolveContext TypeResolveContext { get; } /// /// Gets the list of all assemblies in the compilation. /// /// /// This main assembly is the first entry in the list. /// IList Assemblies { get; } /// /// Gets the referenced assemblies. /// This list does not include the main assembly. /// IList ReferencedAssemblies { get; } /// /// Gets the root namespace of this compilation. /// This is a merged version of the root namespaces of all assemblies. /// /// /// This always is the namespace without a name - it's unrelated to the 'root namespace' project setting. /// INamespace RootNamespace { get; } /// /// Gets the root namespace for a given extern alias. /// /// /// If is null or an empty string, this method /// returns the global root namespace. /// If no alias with the specified name exists, this method returns null. /// INamespace GetNamespaceForExternAlias(string alias); IType FindType(KnownTypeCode typeCode); /// /// Gets the name comparer for the language being compiled. /// This is the string comparer used for the INamespace.GetTypeDefinition method. /// StringComparer NameComparer { get; } ISolutionSnapshot SolutionSnapshot { get; } CacheManager CacheManager { get; } } public interface ICompilationProvider { /// /// Gets the parent compilation. /// This property never returns null. /// ICompilation Compilation { get; } } }