ExpandableStringExpressionAst Class

Definition

The ast that represents a double quoted string (here string or normal string) and can have nested variable references or sub-expressions, e.g. "Name: $name`nAge: $([DateTime]::Now.Year - $dob.Year)".

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

Constructors

ExpandableStringExpressionAst(IScriptExtent, String, StringConstantType)

Construct an expandable string. The value is scanned for nested variable references and expressions which are evaluated at runtime when this ast is compiled.

Properties

Extent

The extent in the source this ast represents.

(Inherited from Ast)
NestedExpressions

A non-empty collection of expressions contained within the string. The nested expressions are always either instances of VariableExpressionAst or SubExpressionAst.

Parent

The parent tree for this node.

(Inherited from Ast)
StaticType

The type of a StringConstantExpressionAst is always typeof(string).

StringConstantType

The type of string.

Value

The value of string, not including the quote characters and without any variables replaced. This property is never null.

Methods

Copy()

Copy the ExpandableStringExpressionAst instance.

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)
SafeGetValue(Boolean)

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