IScanner.SetSource(String, Int32) Method

Definition

Used to (re)initialize the scanner before scanning a small portion of text, such as single source line for syntax coloring purposes

public:
 void SetSource(System::String ^ source, int offset);
public:
 void SetSource(Platform::String ^ source, int offset);
void SetSource(std::wstring const & source, int offset);
public void SetSource (string source, int offset);
abstract member SetSource : string * int -> unit
Public Sub SetSource (source As String, offset As Integer)

Parameters

source
String

The source text portion to be scanned

offset
Int32

The index of the first character to be scanned

Remarks

Language service scanning is always done on a line-by-line basis. This method is called to set the line to be parsed by subsequent calls to the ScanTokenAndProvideInfoAboutIt method.

Applies to