FunctionExpression.JScriptFunctionExpression 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
利用指定的資訊建立一個新的函式物件。
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。
public:
static Microsoft::JScript::FunctionObject ^ JScriptFunctionExpression(RuntimeTypeHandle handle, System::String ^ name, System::String ^ method_name, cli::array <System::String ^> ^ formal_params, cli::array <Microsoft::JScript::JSLocalField ^> ^ fields, bool must_save_stack_locals, bool hasArgumentsObject, System::String ^ text, Microsoft::JScript::Vsa::VsaEngine ^ engine);
public static Microsoft.JScript.FunctionObject JScriptFunctionExpression(RuntimeTypeHandle handle, string name, string method_name, string[] formal_params, Microsoft.JScript.JSLocalField[] fields, bool must_save_stack_locals, bool hasArgumentsObject, string text, Microsoft.JScript.Vsa.VsaEngine engine);
static member JScriptFunctionExpression : RuntimeTypeHandle * string * string * string[] * Microsoft.JScript.JSLocalField[] * bool * bool * string * Microsoft.JScript.Vsa.VsaEngine -> Microsoft.JScript.FunctionObject
Public Shared Function JScriptFunctionExpression (handle As RuntimeTypeHandle, name As String, method_name As String, formal_params As String(), fields As JSLocalField(), must_save_stack_locals As Boolean, hasArgumentsObject As Boolean, text As String, engine As VsaEngine) As FunctionObject
參數
- handle
- RuntimeTypeHandle
函式類型的handle。
- name
- String
函數的名稱。
- method_name
- String
函數的名稱。
- formal_params
- String[]
函數的參數。
- fields
- JSLocalField[]
函數的域。
- must_save_stack_locals
- Boolean
true 以儲存本地堆疊變數。 這對於存取其局部變數的巢狀函式,或 eval 是陳述式非常重要。
- hasArgumentsObject
- Boolean
true 如果函式有參數陣列。
- text
- String
函數宣告的文字。
- engine
- VsaEngine
這是對腳本引擎的參考。
傳回
一個新的函式物件。