Partager via


MemberExpressionAst Class

Definition

The ast that represents accessing a member as a property, e.g. $x.Length or [int]::MaxValue. Most often this is a simple property access, but methods can also be access in this manner, returning an object that supports invoking that member.

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

Constructors

MemberExpressionAst(IScriptExtent, ExpressionAst, CommandElementAst, Boolean, Boolean)

Initializes a new instance of the MemberExpressionAst class.

MemberExpressionAst(IScriptExtent, ExpressionAst, CommandElementAst, Boolean)

Initializes a new instance of the MemberExpressionAst class.

Properties

Expression

The expression that produces the value to retrieve the member from. This property is never null.

Extent

The extent in the source this ast represents.

(Inherited from Ast)
Member

The name of the member to retrieve. This property is never null.

NullConditional

Gets a value indicating true if the operator used is ?. or ?[].

Parent

The parent tree for this node.

(Inherited from Ast)
Static

True if the member to return is static, false if the member is an instance member.

StaticType

By default, the static type of an expression is unknown and hence we assume typeof(object).

(Inherited from ExpressionAst)

Methods

Copy()

Copy the MemberExpressionAst 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