C# 클래스 Microsoft.Cci.SourceDocument

상속: ISourceDocument
파일 보기 프로젝트 열기: visualmutator/visualmutator 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
CopyTo ( int position, char destination, int destinationOffset, int length ) : int

Copies no more than the specified number of characters to the destination character array, starting at the specified position in the source document. Returns the actual number of characters that were copied. This number will be greater than zero as long as position is less than this.Length. The number will be precisely the number asked for unless there are not enough characters left in the document.

GetCorrespondingSourceLocation ( ISourceLocation sourceLocationInPreviousVersionOfDocument ) : ISourceLocation

Returns a source location in this document that corresponds to the given source location in a previous version of this document.

GetSourceLocation ( int position, int length ) : ISourceLocation

Obtains a source location instance that corresponds to the substring of the document specified by the given start position and length.

GetText ( ) : string

Returns the source text of the document in string form. Each call may do significant work, so be sure to cache this.

IsUpdatedVersionOf ( ISourceDocument sourceDocument ) : bool

Returns true if this source document has been created by editing the given source document (or a updated version of the given source document).

보호된 메소드들

메소드 설명
SourceDocument ( IName name ) : System

Allocates an object that represents a source document, such as a file, which is parsed according to the rules of a particular langauge, such as C#, to produce an object model.

SourceDocument ( SourceDocument previousVersion, int position, int oldLength, int newLength ) : System

Allocates an object that represents a source document that is derived from another source document by replacing one substring with another.

메소드 상세

CopyTo() 공개 추상적인 메소드

Copies no more than the specified number of characters to the destination character array, starting at the specified position in the source document. Returns the actual number of characters that were copied. This number will be greater than zero as long as position is less than this.Length. The number will be precisely the number asked for unless there are not enough characters left in the document.
public abstract CopyTo ( int position, char destination, int destinationOffset, int length ) : int
position int The starting index to copy from. Must be greater than or equal to zero and position+length must be less than or equal to this.Length;
destination char The destination array.
destinationOffset int The starting index where the characters must be copied to in the destination array.
length int The maximum number of characters to copy. Must be greater than 0 and less than or equal to the number elements of the destination array.
리턴 int

GetCorrespondingSourceLocation() 공개 메소드

Returns a source location in this document that corresponds to the given source location in a previous version of this document.
public GetCorrespondingSourceLocation ( ISourceLocation sourceLocationInPreviousVersionOfDocument ) : ISourceLocation
sourceLocationInPreviousVersionOfDocument ISourceLocation
리턴 ISourceLocation

GetSourceLocation() 공개 추상적인 메소드

Obtains a source location instance that corresponds to the substring of the document specified by the given start position and length.
public abstract GetSourceLocation ( int position, int length ) : ISourceLocation
position int
length int
리턴 ISourceLocation

GetText() 공개 추상적인 메소드

Returns the source text of the document in string form. Each call may do significant work, so be sure to cache this.
public abstract GetText ( ) : string
리턴 string

IsUpdatedVersionOf() 공개 메소드

Returns true if this source document has been created by editing the given source document (or a updated version of the given source document).
public IsUpdatedVersionOf ( ISourceDocument sourceDocument ) : bool
sourceDocument ISourceDocument
리턴 bool

SourceDocument() 보호된 메소드

Allocates an object that represents a source document, such as a file, which is parsed according to the rules of a particular langauge, such as C#, to produce an object model.
protected SourceDocument ( IName name ) : System
name IName The name of the document. Used to identify the document in user interaction.
리턴 System

SourceDocument() 보호된 메소드

Allocates an object that represents a source document that is derived from another source document by replacing one substring with another.
protected SourceDocument ( SourceDocument previousVersion, int position, int oldLength, int newLength ) : System
previousVersion SourceDocument The source document on which the newly allocated document will be based.
position int The first character in the previous version of the new document that will be changed in the new document.
oldLength int The number of characters in the previous verion of the new document that will be changed in the new document.
newLength int The number of replacement characters in the new document. /// (The length of the string that replaces the substring from position to position+length in the previous version of the new document.)
리턴 System