C# 클래스 StyleCopPlus.CodeHelper

Helper methods for analyzing code.
파일 보기 프로젝트 열기: shuruev/StyleCopPlus

공개 메소드들

메소드 설명
ExtractNamesToCheck ( string fullName, string settingName ) : string[]

Extracts names that should be checked.

ExtractPureName ( string nameToCheck, bool removeAt ) : string

Extracts pure name to check.

FindNextValueableNode ( Node target ) : Node

Finds next valuable node.

FindPreviousValueableNode ( Node target ) : Node

Finds previous valuable node.

GetElementByLine ( CsDocument document, int lineNumber ) : ICodeElement

Gets first code element at specified line number.

GetElementSizeByDeclaration ( CsElement element ) : int

Gets element size in line count.

GetExpressionByLine ( CsDocument document, int lineNumber ) : Expression

Gets first expression at specified line number.

GetLabels ( CsElement element ) : List

Gets labels.

GetLocalDeclarations ( CsElement element ) : List

Gets local declarations.

GetNameWithAt ( IEnumerable fullTokens, string fullName ) : string

Gets name with usage of @ character.

GetNodeByLine ( CsDocument document, int lineNumber ) : Node

Gets first node by specified line number.

GetParameters ( CsElement element ) : List

Gets a list of parameters for an element.

GetRootExpression ( Expression expression ) : Expression

Finds the root expression.

GetSummaryText ( CsElement element ) : string

Gets summary text for specified element.

GetTypeParameters ( CsElement element ) : List

Gets a list of type parameters for an element.

IsInternal ( CsElement element ) : bool

Checks whether specified element has internal access modifier.

IsOperator ( CsElement element ) : bool

Checks whether specified element is operator.

IsPartial ( CsElement element ) : bool

Checks whether specified element is partial.

IsPrivate ( CsElement element ) : bool

Checks whether specified element has private access modifier.

IsPrivateEventHandler ( CsElement element ) : bool

Checks whether specified element describes private event handler.

IsProtected ( CsElement element ) : bool

Checks whether specified element has protected access modifier.

IsProtectedEventHandler ( CsElement element ) : bool

Checks whether specified element describes protected event handler.

IsPublic ( CsElement element ) : bool

Checks whether specified element has public access modifier.

IsStatic ( CsElement element ) : bool

Checks whether specified element is static.

IsTestMethod ( CsElement element ) : bool

Checks whether specified element describes test method.

MakeXml ( string text ) : XmlDocument

Creates XML document from its inner text.

비공개 메소드들

메소드 설명
CheckEventHandlerMethod ( CsElement element ) : bool

Checks whether specified method could act as event handler.

CheckEventHandlerParameters ( StyleCop.CSharp.Method method ) : bool

Checks whether specified method has parameters suitable for being event handler.

ConvertParameters ( IEnumerable parameters ) : List

Converts native parameters to parameter items.

FindByLineElementVisitor ( CsElement element, CsElement parentElement, object context ) : bool

Tries to find code element by line.

FindByLineExpressionVisitor ( Expression expression, Expression parentExpression, Statement parentStatement, CsElement parentElement, object context ) : bool

Tries to find expression by line.

GetLabelsStatementVisitor ( Statement statement, Expression parentExpression, Statement parentStatement, CsElement parentElement, List result ) : bool

Analyzes statements for getting labels.

GetLocalDeclarationsStatementVisitor ( Statement statement, Expression parentExpression, Statement parentStatement, CsElement parentElement, List declarations ) : bool

Analyzes statements for getting local declarations.

GetParametersExpressionVisitor ( Expression expression, Expression parentExpression, Statement parentStatement, CsElement parentElement, List result ) : bool

Analyzes expression for getting parameters.

메소드 상세

ExtractNamesToCheck() 공개 정적인 메소드

Extracts names that should be checked.
public static ExtractNamesToCheck ( string fullName, string settingName ) : string[]
fullName string
settingName string
리턴 string[]

ExtractPureName() 공개 정적인 메소드

Extracts pure name to check.
public static ExtractPureName ( string nameToCheck, bool removeAt ) : string
nameToCheck string
removeAt bool
리턴 string

FindNextValueableNode() 공개 정적인 메소드

Finds next valuable node.
public static FindNextValueableNode ( Node target ) : Node
target Node
리턴 Node

FindPreviousValueableNode() 공개 정적인 메소드

Finds previous valuable node.
public static FindPreviousValueableNode ( Node target ) : Node
target Node
리턴 Node

GetElementByLine() 공개 정적인 메소드

Gets first code element at specified line number.
public static GetElementByLine ( CsDocument document, int lineNumber ) : ICodeElement
document CsDocument
lineNumber int
리턴 ICodeElement

GetElementSizeByDeclaration() 공개 정적인 메소드

Gets element size in line count.
public static GetElementSizeByDeclaration ( CsElement element ) : int
element CsElement
리턴 int

GetExpressionByLine() 공개 정적인 메소드

Gets first expression at specified line number.
public static GetExpressionByLine ( CsDocument document, int lineNumber ) : Expression
document CsDocument
lineNumber int
리턴 Expression

GetLabels() 공개 정적인 메소드

Gets labels.
public static GetLabels ( CsElement element ) : List
element CsElement
리턴 List

GetLocalDeclarations() 공개 정적인 메소드

Gets local declarations.
public static GetLocalDeclarations ( CsElement element ) : List
element CsElement
리턴 List

GetNameWithAt() 공개 정적인 메소드

Gets name with usage of @ character.
public static GetNameWithAt ( IEnumerable fullTokens, string fullName ) : string
fullTokens IEnumerable
fullName string
리턴 string

GetNodeByLine() 공개 정적인 메소드

Gets first node by specified line number.
public static GetNodeByLine ( CsDocument document, int lineNumber ) : Node
document CsDocument
lineNumber int
리턴 Node

GetParameters() 공개 정적인 메소드

Gets a list of parameters for an element.
public static GetParameters ( CsElement element ) : List
element CsElement
리턴 List

GetRootExpression() 공개 정적인 메소드

Finds the root expression.
public static GetRootExpression ( Expression expression ) : Expression
expression Expression
리턴 Expression

GetSummaryText() 공개 정적인 메소드

Gets summary text for specified element.
public static GetSummaryText ( CsElement element ) : string
element CsElement
리턴 string

GetTypeParameters() 공개 정적인 메소드

Gets a list of type parameters for an element.
public static GetTypeParameters ( CsElement element ) : List
element CsElement
리턴 List

IsInternal() 공개 정적인 메소드

Checks whether specified element has internal access modifier.
public static IsInternal ( CsElement element ) : bool
element CsElement
리턴 bool

IsOperator() 공개 정적인 메소드

Checks whether specified element is operator.
public static IsOperator ( CsElement element ) : bool
element CsElement
리턴 bool

IsPartial() 공개 정적인 메소드

Checks whether specified element is partial.
public static IsPartial ( CsElement element ) : bool
element CsElement
리턴 bool

IsPrivate() 공개 정적인 메소드

Checks whether specified element has private access modifier.
public static IsPrivate ( CsElement element ) : bool
element CsElement
리턴 bool

IsPrivateEventHandler() 공개 정적인 메소드

Checks whether specified element describes private event handler.
public static IsPrivateEventHandler ( CsElement element ) : bool
element CsElement
리턴 bool

IsProtected() 공개 정적인 메소드

Checks whether specified element has protected access modifier.
public static IsProtected ( CsElement element ) : bool
element CsElement
리턴 bool

IsProtectedEventHandler() 공개 정적인 메소드

Checks whether specified element describes protected event handler.
public static IsProtectedEventHandler ( CsElement element ) : bool
element CsElement
리턴 bool

IsPublic() 공개 정적인 메소드

Checks whether specified element has public access modifier.
public static IsPublic ( CsElement element ) : bool
element CsElement
리턴 bool

IsStatic() 공개 정적인 메소드

Checks whether specified element is static.
public static IsStatic ( CsElement element ) : bool
element CsElement
리턴 bool

IsTestMethod() 공개 정적인 메소드

Checks whether specified element describes test method.
public static IsTestMethod ( CsElement element ) : bool
element CsElement
리턴 bool

MakeXml() 공개 정적인 메소드

Creates XML document from its inner text.
public static MakeXml ( string text ) : XmlDocument
text string
리턴 System.Xml.XmlDocument