語言

IColorizeText.GetStateForText(String, SourceState) 方法

定義

當在類別中實作時,會掃描指定的原始碼中個別的程式碼單元,並識別指定程式碼的狀態(正常狀態、註解、字串)。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 Microsoft::JScript::SourceState GetStateForText(System::String ^ sourceCode, Microsoft::JScript::SourceState currentState);
public Microsoft.JScript.SourceState GetStateForText(string sourceCode, Microsoft.JScript.SourceState currentState);
abstract member GetStateForText : string * Microsoft.JScript.SourceState -> Microsoft.JScript.SourceState
Public Function GetStateForText (sourceCode As String, currentState As SourceState) As SourceState

參數

sourceCode
String

原始碼可以分析。

currentState
SourceState

原始碼目前的狀態(正常狀態、註解、字串)。

傳回

原始碼的狀態。

適用於

另請參閱