// 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.Collections.Generic;
namespace ICSharpCode.Decompiler.TypeSystem
{
///
/// Represents an unresolved assembly.
///
public interface IUnresolvedAssembly : IAssemblyReference
{
///
/// Gets the assembly name (short name).
///
string AssemblyName { get; }
///
/// Gets the full assembly name (including public key token etc.)
///
string FullAssemblyName { get; }
///
/// Gets the path to the assembly location.
/// For projects it is the same as the output path.
///
string Location { get; }
///
/// Gets the list of all assembly attributes in the project.
///
IEnumerable AssemblyAttributes { get; }
///
/// Gets the list of all module attributes in the project.
///
IEnumerable ModuleAttributes { get; }
///
/// Gets all non-nested types in the assembly.
///
IEnumerable TopLevelTypeDefinitions { get; }
}
public interface IAssemblyReference
{
///
/// Resolves this assembly.
///
IAssembly Resolve(ITypeResolveContext context);
}
///
/// Represents an assembly.
///
public interface IAssembly : ICompilationProvider
{
///
/// Gets the original unresolved assembly.
///
IUnresolvedAssembly UnresolvedAssembly { get; }
///
/// Gets whether this assembly is the main assembly of the compilation.
///
bool IsMainAssembly { get; }
///
/// Gets the assembly name (short name).
///
string AssemblyName { get; }
///
/// Gets the full assembly name (including public key token etc.)
///
string FullAssemblyName { get; }
///
/// Gets the list of all assembly attributes in the project.
///
IReadOnlyList AssemblyAttributes { get; }
///
/// Gets the list of all module attributes in the project.
///
IReadOnlyList ModuleAttributes { get; }
///
/// Gets whether the internals of this assembly are visible in the specified assembly.
///
bool InternalsVisibleTo(IAssembly assembly);
///
/// Gets the root namespace for this assembly.
///
///
/// This always is the namespace without a name - it's unrelated to the 'root namespace' project setting.
///
INamespace RootNamespace { get; }
///
/// Gets the type definition for a top-level type.
///
/// This method uses ordinal name comparison, not the compilation's name comparer.
ITypeDefinition GetTypeDefinition(TopLevelTypeName topLevelTypeName);
///
/// Gets all non-nested types in the assembly.
///
IEnumerable TopLevelTypeDefinitions { get; }
}
}