C# Class ICSharpCode.NRefactory.CSharp.Refactoring.PatternHelper

Helper class for constructing pattern ASTs.
Datei anzeigen Open project: 0xd4d/NRefactory Class Usage Examples

Public Methods

Method Description
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.

Method Details

AnyType() public static method

Matches any type
public static AnyType ( bool doesMatchNullTypes = false ) : AstType
doesMatchNullTypes bool
return AstType

AnyType() public static method

Matches any type
public static AnyType ( string groupName, bool doesMatchNullTypes = false ) : AstType
groupName string
doesMatchNullTypes bool
return AstType

CommutativeOperator() public static method

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
return Expression

CommutativeOperatorWithOptionalParentheses() public static method

public static CommutativeOperatorWithOptionalParentheses ( Expression expr1, BinaryOperatorType op, Expression expr2 ) : Expression
expr1 Expression
op BinaryOperatorType
expr2 Expression
return Expression

EmbeddedStatement() public static method

Optionally allow a block around the given statement;
public static EmbeddedStatement ( Statement statement ) : Statement
statement Statement
return Statement

NamedParameter() public static method

Allows to give parameter declaration group names.
public static NamedParameter ( string groupName ) : ParameterDeclaration
groupName string
return ParameterDeclaration

NamedParameter() public static method

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
return ParameterDeclaration

OptionalParentheses() public static method

Optionally allows parentheses around the given expression.
public static OptionalParentheses ( Expression expr ) : Expression
expr Expression
return Expression