C# Class Rhino.Ast.XmlRef

Base class for E4X XML attribute-access or property-get expressions.
Base class for E4X XML attribute-access or property-get expressions. Such expressions can take a variety of forms. The general syntax has three parts:

  1. optional: an @
  2. (specifying an attribute access)
  3. optional: a namespace (a Name ) and double-colon
  4. required: either a Name or a bracketed [expression]
The property-name expressions (examples: ns::name , @name ) are represented as XmlPropRef nodes. The bracketed-expression versions (examples: ns::[name] , @[name] ) become XmlElemRef nodes.

This node type (or more specifically, its subclasses) will sometimes be the right-hand child of a PropertyGet node or an XmlMemberGet node. The XmlRef node may also be a standalone primary expression with no explicit target, which is valid in certain expression contexts such as company..employee.(@id < 100) - in this case, the @id is an XmlRef that is part of an infix '<' expression whose parent is an XmlDotQuery node.

Inheritance: AstNode
Afficher le fichier Open project: hazzik/Rhino.Net Class Usage Examples

Protected Properties

Свойство Type Description
@namespace Name
atPos int
colonPos int

Méthodes publiques

Méthode Description
GetAtPos ( ) : int

Returns position of @ -token, or -1 if this is not an attribute-access expression.

GetColonPos ( ) : int

Returns position of :: token, or -1 if not present. It will only be present if the namespace node is non- null .

GetNamespace ( ) : Name

Return the namespace.

Return the namespace. May be @null .

IsAttributeAccess ( ) : bool

Returns true if this expression began with an @ -token.

SetAtPos ( int atPos ) : void

Sets position of @ -token, or -1

SetColonPos ( int colonPos ) : void

Sets position of :: token, or -1 if not present

SetNamespace ( Name @namespace ) : void

Sets namespace, and sets its parent to this node.

Sets namespace, and sets its parent to this node. Can be null .

XmlRef ( ) : Rhino.Ast
XmlRef ( int pos ) : Rhino.Ast
XmlRef ( int pos, int len ) : Rhino.Ast

Method Details

GetAtPos() public méthode

Returns position of @ -token, or -1 if this is not an attribute-access expression.
public GetAtPos ( ) : int
Résultat int

GetColonPos() public méthode

Returns position of :: token, or -1 if not present. It will only be present if the namespace node is non- null .
public GetColonPos ( ) : int
Résultat int

GetNamespace() public méthode

Return the namespace.
Return the namespace. May be @null .
public GetNamespace ( ) : Name
Résultat Name

IsAttributeAccess() public méthode

Returns true if this expression began with an @ -token.
public IsAttributeAccess ( ) : bool
Résultat bool

SetAtPos() public méthode

Sets position of @ -token, or -1
public SetAtPos ( int atPos ) : void
atPos int
Résultat void

SetColonPos() public méthode

Sets position of :: token, or -1 if not present
public SetColonPos ( int colonPos ) : void
colonPos int
Résultat void

SetNamespace() public méthode

Sets namespace, and sets its parent to this node.
Sets namespace, and sets its parent to this node. Can be null .
public SetNamespace ( Name @namespace ) : void
@namespace Name
Résultat void

XmlRef() public méthode

public XmlRef ( ) : Rhino.Ast
Résultat Rhino.Ast

XmlRef() public méthode

public XmlRef ( int pos ) : Rhino.Ast
pos int
Résultat Rhino.Ast

XmlRef() public méthode

public XmlRef ( int pos, int len ) : Rhino.Ast
pos int
len int
Résultat Rhino.Ast

Property Details

@namespace protected_oe property

protected Name,Rhino.Ast @namespace
Résultat Name

atPos protected_oe property

protected int atPos
Résultat int

colonPos protected_oe property

protected int colonPos
Résultat int