Table of Contents

Class UsingScope

Namespace
ICSharpCode.Decompiler.CSharp.TypeSystem
Assembly
ICSharpCode.Decompiler.dll

Represents a scope that contains "using" statements. This is either the file itself, or a namespace declaration.

public class UsingScope : AbstractFreezable, IFreezable
Inheritance
UsingScope
Implements
Inherited Members

Constructors

UsingScope()

Creates a new root using scope.

public UsingScope()

UsingScope(UsingScope, string)

Creates a new nested using scope.

public UsingScope(UsingScope parent, string shortName)

Parameters

parent UsingScope

The parent using scope.

shortName string

The short namespace name.

Properties

ExternAliases

public IList<string> ExternAliases { get; }

Property Value

IList<string>

NamespaceName

public string NamespaceName { get; }

Property Value

string

Parent

public UsingScope Parent { get; }

Property Value

UsingScope

ShortNamespaceName

public string ShortNamespaceName { get; }

Property Value

string

UsingAliases

public IList<KeyValuePair<string, TypeOrNamespaceReference>> UsingAliases { get; }

Property Value

IList<KeyValuePair<string, TypeOrNamespaceReference>>

Usings

public IList<TypeOrNamespaceReference> Usings { get; }

Property Value

IList<TypeOrNamespaceReference>

Methods

FreezeInternal()

protected override void FreezeInternal()

HasAlias(string)

Gets whether this using scope has an alias (either using or extern) with the specified name.

public bool HasAlias(string identifier)

Parameters

identifier string

Returns

bool

Resolve(ICompilation)

Resolves the namespace represented by this using scope.

public ResolvedUsingScope Resolve(ICompilation compilation)

Parameters

compilation ICompilation

Returns

ResolvedUsingScope