FunctionExpression.JScriptFunctionExpression(RuntimeTypeHandle, String, String, String[], JSLocalField[], Boolean, Boolean, String, VsaEngine) 方法

定义

使用指定信息创建一个新的函数对象。Creates a new function object, using the specified information.

此 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

函数类型的句柄。A handle to the type of the function.

name
String

函数名。The name of the function.

method_name
String

函数名。The name of the function.

formal_params
String[]

函数的参数。The parameters of the function.

fields
JSLocalField[]

函数的字段。The fields of the function.

must_save_stack_locals
Boolean

如果为 true,则保存局部堆栈变量。true to save local stack variables. 这一点对于访问其中一个局部变量的嵌套函数或 eval 语句而言非常重要。This is important for a nested function that accesses one of its local variables, or for an eval statement.

hasArgumentsObject
Boolean

如果函数具有参数数组,则为 truetrue if the function has a parameter array.

text
String

函数声明的文本。The text of the function declaration.

engine
VsaEngine

对脚本引擎的引用。A reference to the scripting engine.

返回

FunctionObject

一个新的函数对象。A new function object.

适用于