C# Class ReSharper.Exceptional.Utilities.CodeElementFactory

Provides services to create various code elements.
Afficher le fichier Open project: CSharpAnalyzers/ExceptionalReSharper

Méthodes publiques

Méthode Description
CodeElementFactory ( CSharpElementFactory factory ) : System

Initializes a new instance of the CodeElementFactory class.

CreateArgument ( string value ) : ICSharpArgument

Creates an argument that may be passed to invocations.

CreateBlock ( ITreeNode node ) : IBlock

Creates a block with the content of the given node.

CreateCatchVariableDeclarationNode ( IDeclaredType exceptionType, ITreeNode context ) : ICatchVariableDeclaration

Creates a variable declaration for catch clause.

CreateSpecificCatchClause ( IDeclaredType exceptionType, IBlock catchBody, string variableName ) : ISpecificCatchClause

Creates a specific catch clause with given exceptionType and catchBody.

CreateTryStatement ( IDeclaredType exceptionType, string exceptionVariableName, ITreeNode context ) : ITryStatement

Creates a try statement for the given exception type and variable name.

Method Details

CodeElementFactory() public méthode

Initializes a new instance of the CodeElementFactory class.
public CodeElementFactory ( CSharpElementFactory factory ) : System
factory CSharpElementFactory The element factory.
Résultat System

CreateArgument() public méthode

Creates an argument that may be passed to invocations.
public CreateArgument ( string value ) : ICSharpArgument
value string A value for an argument.
Résultat ICSharpArgument

CreateBlock() public méthode

Creates a block with the content of the given node.
public CreateBlock ( ITreeNode node ) : IBlock
node ITreeNode The node which is used as content.
Résultat IBlock

CreateCatchVariableDeclarationNode() public méthode

Creates a variable declaration for catch clause.
public CreateCatchVariableDeclarationNode ( IDeclaredType exceptionType, ITreeNode context ) : ICatchVariableDeclaration
exceptionType IDeclaredType The type of a created variable.
context ITreeNode The context.
Résultat ICatchVariableDeclaration

CreateSpecificCatchClause() public méthode

Creates a specific catch clause with given exceptionType and catchBody.
public CreateSpecificCatchClause ( IDeclaredType exceptionType, IBlock catchBody, string variableName ) : ISpecificCatchClause
exceptionType IDeclaredType Type of the exception to catch.
catchBody IBlock Body of the created catch.
variableName string A name for catch variable.
Résultat ISpecificCatchClause

CreateTryStatement() public méthode

Creates a try statement for the given exception type and variable name.
public CreateTryStatement ( IDeclaredType exceptionType, string exceptionVariableName, ITreeNode context ) : ITryStatement
exceptionType IDeclaredType The exception type.
exceptionVariableName string The exception variable name.
context ITreeNode The context.
Résultat ITryStatement