C# Класс ICSharpCode.NRefactory.CSharp.Refactoring.PatternHelper

Helper class for constructing pattern ASTs.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AnyType ( bool doesMatchNullTypes = false ) : AstType

Matches any type

AnyType ( string groupName, bool doesMatchNullTypes = false ) : AstType

Matches any type

CommutativeOperator ( Expression expr1, BinaryOperatorType op, Expression expr2 ) : Expression

Produces a choice pattern for expr1 op expr2 or expr2 op expr1.

CommutativeOperatorWithOptionalParentheses ( Expression expr1, BinaryOperatorType op, Expression expr2 ) : Expression
EmbeddedStatement ( Statement statement ) : Statement

Optionally allow a block around the given statement;

NamedParameter ( string groupName ) : ParameterDeclaration

Allows to give parameter declaration group names.

NamedParameter ( string groupName, AstType type, string name, ParameterModifier modifier = ParameterModifier.None ) : ParameterDeclaration

Allows to give parameter declaration group names.

OptionalParentheses ( Expression expr ) : Expression

Optionally allows parentheses around the given expression.

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

AnyType() публичный статический Метод

Matches any type
public static AnyType ( bool doesMatchNullTypes = false ) : AstType
doesMatchNullTypes bool
Результат AstType

AnyType() публичный статический Метод

Matches any type
public static AnyType ( string groupName, bool doesMatchNullTypes = false ) : AstType
groupName string
doesMatchNullTypes bool
Результат AstType

CommutativeOperator() публичный статический Метод

Produces a choice pattern for expr1 op expr2 or expr2 op expr1.
public static CommutativeOperator ( Expression expr1, BinaryOperatorType op, Expression expr2 ) : Expression
expr1 Expression
op BinaryOperatorType
expr2 Expression
Результат Expression

CommutativeOperatorWithOptionalParentheses() публичный статический Метод

public static CommutativeOperatorWithOptionalParentheses ( Expression expr1, BinaryOperatorType op, Expression expr2 ) : Expression
expr1 Expression
op BinaryOperatorType
expr2 Expression
Результат Expression

EmbeddedStatement() публичный статический Метод

Optionally allow a block around the given statement;
public static EmbeddedStatement ( Statement statement ) : Statement
statement Statement
Результат Statement

NamedParameter() публичный статический Метод

Allows to give parameter declaration group names.
public static NamedParameter ( string groupName ) : ParameterDeclaration
groupName string
Результат ParameterDeclaration

NamedParameter() публичный статический Метод

Allows to give parameter declaration group names.
public static NamedParameter ( string groupName, AstType type, string name, ParameterModifier modifier = ParameterModifier.None ) : ParameterDeclaration
groupName string
type AstType
name string
modifier ParameterModifier
Результат ParameterDeclaration

OptionalParentheses() публичный статический Метод

Optionally allows parentheses around the given expression.
public static OptionalParentheses ( Expression expr ) : Expression
expr Expression
Результат Expression