Delen via


IImportScope Interface

Definition

Represents the set of symbols that are imported to a particular position in a source file. Each import has a reference to the location the import directive was declared at. For the IAliasSymbol import, the location can be found using either Locations or DeclaringSyntaxReferences on the IAliasSymbol itself. For Imports or XmlNamespaces the location is found through DeclaringSyntaxReference or DeclaringSyntaxReference respectively.

public interface IImportScope
type IImportScope = interface
Public Interface IImportScope

Remarks

Properties

Aliases

Aliases defined at this level of the chain. This corresponds to using X = TypeOrNamespace; in C# or Imports X = TypeOrNamespace in Visual Basic. This will include global aliases if present for both languages.

ExternAliases

Extern aliases defined at this level of the chain. This corresponds to extern alias X; in C#. It will be empty in Visual Basic.

Imports

Types or namespaces imported at this level of the chain. This corresponds to using Namespace; or using static Type; in C#, or Imports TypeOrNamespace in Visual Basic. This will include global namespace or type imports for both languages.

XmlNamespaces

Xml namespaces imported at this level of the chain. This corresponds to Imports <xmlns:prefix = "name"> in Visual Basic. It will be empty in C#.

Applies to