IColorizeText.GetStateForText(String, SourceState) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當在類別中實作時,會掃描指定的原始碼中個別的程式碼單元,並識別指定程式碼的狀態(正常狀態、註解、字串)。
此 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
原始碼目前的狀態(正常狀態、註解、字串)。
傳回
原始碼的狀態。