C# 클래스 ReSharper.Exceptional.Utilities.CodeElementFactory

Provides services to create various code elements.
파일 보기 프로젝트 열기: CSharpAnalyzers/ExceptionalReSharper

공개 메소드들

메소드 설명
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