C# Класс ReSharper.Exceptional.Utilities.CodeElementFactory

Provides services to create various code elements.
Показать файл Открыть проект

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

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

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

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

Initializes a new instance of the CodeElementFactory class.
public CodeElementFactory ( CSharpElementFactory factory ) : System
factory CSharpElementFactory The element factory.
Результат System

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

Creates an argument that may be passed to invocations.
public CreateArgument ( string value ) : ICSharpArgument
value string A value for an argument.
Результат ICSharpArgument

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

Creates a block with the content of the given node.
public CreateBlock ( ITreeNode node ) : IBlock
node ITreeNode The node which is used as content.
Результат IBlock

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

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

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

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

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

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