C# 클래스 Microsoft.CodeAnalysis.Sarif.NewLineIndex

An index of newline start locations in a string in order to relatively cheaply turn a given offset into a line / column number.
파일 보기 프로젝트 열기: Microsoft/sarif-sdk 1 사용 예제들

공개 메소드들

메소드 설명
GetLineInfoForLine ( int lineNumber ) : LineInfo

Gets a LineInfo for the line at the specified index.

GetLineInfoForOffset ( int offset ) : LineInfo

Gets line information for the line containing the character at the specified offset.

GetOffsetInfoForOffset ( int offset ) : OffsetInfo

Gets information for a given offset, such as the line and column numbers.

비공개 메소드들

메소드 설명
NewLineIndex ( string textToIndex ) : System

메소드 상세

GetLineInfoForLine() 공개 메소드

Gets a LineInfo for the line at the specified index.
Thrown when is not /// a valid line number; e.g. if it is zero, negative, or greater than the maximum line count in /// the file.
public GetLineInfoForLine ( int lineNumber ) : LineInfo
lineNumber int The line number.
리턴 LineInfo

GetLineInfoForOffset() 공개 메소드

Gets line information for the line containing the character at the specified offset.
Thrown when is negative.
public GetLineInfoForOffset ( int offset ) : LineInfo
offset int The offset.
리턴 LineInfo

GetOffsetInfoForOffset() 공개 메소드

Gets information for a given offset, such as the line and column numbers.
Thrown when is negative.
public GetOffsetInfoForOffset ( int offset ) : OffsetInfo
offset int The offset for which information shall be obtained.
리턴 OffsetInfo