C# Класс 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.

Наследование: AstNode
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
@namespace Name
atPos int
colonPos int

Открытые методы

Метод Описание
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

Описание методов

GetAtPos() публичный Метод

Returns position of @ -token, or -1 if this is not an attribute-access expression.
public GetAtPos ( ) : int
Результат int

GetColonPos() публичный Метод

Returns position of :: token, or -1 if not present. It will only be present if the namespace node is non- null .
public GetColonPos ( ) : int
Результат int

GetNamespace() публичный Метод

Return the namespace.
Return the namespace. May be @null .
public GetNamespace ( ) : Name
Результат Name

IsAttributeAccess() публичный Метод

Returns true if this expression began with an @ -token.
public IsAttributeAccess ( ) : bool
Результат bool

SetAtPos() публичный Метод

Sets position of @ -token, or -1
public SetAtPos ( int atPos ) : void
atPos int
Результат void

SetColonPos() публичный Метод

Sets position of :: token, or -1 if not present
public SetColonPos ( int colonPos ) : void
colonPos int
Результат void

SetNamespace() публичный Метод

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
Результат void

XmlRef() публичный Метод

public XmlRef ( ) : Rhino.Ast
Результат Rhino.Ast

XmlRef() публичный Метод

public XmlRef ( int pos ) : Rhino.Ast
pos int
Результат Rhino.Ast

XmlRef() публичный Метод

public XmlRef ( int pos, int len ) : Rhino.Ast
pos int
len int
Результат Rhino.Ast

Описание свойств

@namespace защищенное свойство

protected Name,Rhino.Ast @namespace
Результат Name

atPos защищенное свойство

protected int atPos
Результат int

colonPos защищенное свойство

protected int colonPos
Результат int