FunctionDeclaration.JScriptFunctionDeclaration 方法

定義

利用指定資訊建立新的閉包函數。

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

public:
 static Microsoft::JScript::Closure ^ JScriptFunctionDeclaration(RuntimeTypeHandle handle, System::String ^ name, System::String ^ method_name, cli::array <System::String ^> ^ formal_parameters, cli::array <Microsoft::JScript::JSLocalField ^> ^ fields, bool must_save_stack_locals, bool hasArgumentsObject, System::String ^ text, System::Object ^ declaringObject, Microsoft::JScript::Vsa::VsaEngine ^ engine);
public static Microsoft.JScript.Closure JScriptFunctionDeclaration(RuntimeTypeHandle handle, string name, string method_name, string[] formal_parameters, Microsoft.JScript.JSLocalField[] fields, bool must_save_stack_locals, bool hasArgumentsObject, string text, object declaringObject, Microsoft.JScript.Vsa.VsaEngine engine);
static member JScriptFunctionDeclaration : RuntimeTypeHandle * string * string * string[] * Microsoft.JScript.JSLocalField[] * bool * bool * string * obj * Microsoft.JScript.Vsa.VsaEngine -> Microsoft.JScript.Closure
Public Shared Function JScriptFunctionDeclaration (handle As RuntimeTypeHandle, name As String, method_name As String, formal_parameters As String(), fields As JSLocalField(), must_save_stack_locals As Boolean, hasArgumentsObject As Boolean, text As String, declaringObject As Object, engine As VsaEngine) As Closure

參數

handle
RuntimeTypeHandle

函式類型的handle。

name
String

函數的名稱。

method_name
String

函數的名稱。

formal_parameters
String[]

函數的參數。

fields
JSLocalField[]

函數的域。

must_save_stack_locals
Boolean

true 以儲存本地堆疊變數。 這對於存取其局部變數之一的巢狀函式或 eval 陳述式非常重要。

hasArgumentsObject
Boolean

true 如果函式有參數陣列。

text
String

函數宣告的文字。

declaringObject
Object

取得宣告此方法的型別。

engine
VsaEngine

這是對腳本引擎的參考。

傳回

一個新的閉包函式,代表函式宣告。

適用於

另請參閱