C# Класс Rhino.Ast.TryStatement

Try/catch/finally statement.
Try/catch/finally statement. Node type is Rhino.Token.TRY .

TryStatement : try Block Catch try Block Finally try Block Catch Finally Catch : catch ( Identifier ) Block Finally : finally Block
Наследование: AstNode
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddCatchClause ( CatchClause clause ) : void

Add a catch-clause to the end of the list, and sets its parent to this node.

Add a catch-clause to the end of the list, and sets its parent to this node.

GetCatchClauses ( ) : IList

Returns list of CatchClause nodes. If there are no catch clauses, returns an immutable empty list.

GetFinallyBlock ( ) : AstNode

Returns finally block, or null if not present

GetFinallyPosition ( ) : int

Returns position of finally keyword, if present, or -1

GetTryBlock ( ) : AstNode
SetCatchClauses ( IList catchClauses ) : void

Sets list of CatchClause nodes. Also sets their parents to this node. May be null . Replaces any existing catch clauses for this node.

SetFinallyBlock ( AstNode finallyBlock ) : void

Sets finally block, and sets its parent to this node.

Sets finally block, and sets its parent to this node. May be null .

SetFinallyPosition ( int finallyPosition ) : void

Sets position of finally keyword, if present, or -1

SetTryBlock ( AstNode tryBlock ) : void

Sets try block.

Sets try block. Also sets its parent to this node.

ToSource ( int depth ) : string
TryStatement ( ) : System.Collections.Generic
TryStatement ( int pos ) : System.Collections.Generic
TryStatement ( int pos, int len ) : System.Collections.Generic
Visit ( NodeVisitor v ) : void

Visits this node, then the try-block, then any catch clauses, and then any finally block.

Visits this node, then the try-block, then any catch clauses, and then any finally block.

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

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

Add a catch-clause to the end of the list, and sets its parent to this node.
Add a catch-clause to the end of the list, and sets its parent to this node.
/// } if /// clause /// is /// null ///
public AddCatchClause ( CatchClause clause ) : void
clause CatchClause
Результат void

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

Returns list of CatchClause nodes. If there are no catch clauses, returns an immutable empty list.
public GetCatchClauses ( ) : IList
Результат IList

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

Returns finally block, or null if not present
public GetFinallyBlock ( ) : AstNode
Результат AstNode

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

Returns position of finally keyword, if present, or -1
public GetFinallyPosition ( ) : int
Результат int

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

public GetTryBlock ( ) : AstNode
Результат AstNode

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

Sets list of CatchClause nodes. Also sets their parents to this node. May be null . Replaces any existing catch clauses for this node.
public SetCatchClauses ( IList catchClauses ) : void
catchClauses IList
Результат void

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

Sets finally block, and sets its parent to this node.
Sets finally block, and sets its parent to this node. May be null .
public SetFinallyBlock ( AstNode finallyBlock ) : void
finallyBlock AstNode
Результат void

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

Sets position of finally keyword, if present, or -1
public SetFinallyPosition ( int finallyPosition ) : void
finallyPosition int
Результат void

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

Sets try block.
Sets try block. Also sets its parent to this node.
/// } if /// tryBlock /// is /// null ///
public SetTryBlock ( AstNode tryBlock ) : void
tryBlock AstNode
Результат void

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

public ToSource ( int depth ) : string
depth int
Результат string

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

public TryStatement ( ) : System.Collections.Generic
Результат System.Collections.Generic

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

public TryStatement ( int pos ) : System.Collections.Generic
pos int
Результат System.Collections.Generic

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

public TryStatement ( int pos, int len ) : System.Collections.Generic
pos int
len int
Результат System.Collections.Generic

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

Visits this node, then the try-block, then any catch clauses, and then any finally block.
Visits this node, then the try-block, then any catch clauses, and then any finally block.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Результат void