UsingStatementAst Class

Definition

The ast representing a using statement.

public ref class UsingStatementAst : System::Management::Automation::Language::StatementAst
public class UsingStatementAst : System.Management.Automation.Language.StatementAst
type UsingStatementAst = class
    inherit StatementAst
Public Class UsingStatementAst
Inherits StatementAst
Inheritance
UsingStatementAst

Constructors

UsingStatementAst(IScriptExtent, HashtableAst)

Construct a simple (one that is not a form of an alias) using module statement with module specification as hashtable.

UsingStatementAst(IScriptExtent, StringConstantExpressionAst, HashtableAst)

Construct a using module statement that aliases an item with module specification as hashtable.

UsingStatementAst(IScriptExtent, UsingStatementKind, StringConstantExpressionAst)

Construct a simple using statement (one that is not a form of an alias).

UsingStatementAst(IScriptExtent, UsingStatementKind, StringConstantExpressionAst, StringConstantExpressionAst)

Construct a using statement that aliases an item.

Properties

Alias

The name of the item being aliased. This property is mutually exclusive with ModuleSpecification property.

Extent

The extent in the source this ast represents.

(Inherited from Ast)
ModuleSpecification

Hashtable that can be converted to ModuleSpecification. Only for 'using module' case, otherwise null. This property is mutually exclusive with Alias property.

Name

When Alias is null or ModuleSpecification is null, the item being used, otherwise the alias name.

Parent

The parent tree for this node.

(Inherited from Ast)
UsingStatementKind

The kind of using statement.

Methods

Copy()

Copy the UsingStatementAst

Find(Func<Ast,Boolean>, Boolean)

Traverse the entire Ast, returning the first node in the tree for which predicate returns true.

(Inherited from Ast)
FindAll(Func<Ast,Boolean>, Boolean)

Traverse the entire Ast, returning all nodes in the tree for which predicate returns true.

(Inherited from Ast)
SafeGetValue()

Constructs the resultant object from the AST and returns it if it is safe.

(Inherited from Ast)
ToString()

Formats the ast and returns a string.

(Inherited from Ast)
Visit(AstVisitor)

Visit each node in the Ast, calling the methods in astVisitor for each node in the ast.

(Inherited from Ast)
Visit(ICustomAstVisitor)

Visit the Ast using a visitor that can choose how the tree traversal is performed. This visit method is for advanced uses of the visitor pattern where an AstVisitor is insufficient.

(Inherited from Ast)

Applies to