C# Класс Rhino.Commonjs.Module.RequireBuilder

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateRequire ( Context cx, Scriptable globalScope ) : Require

Creates a new require() function.

Creates a new require() function. You are still responsible for invoking either Require.Install(Rhino.Scriptable) or Require.RequireMain(Rhino.Context, string) to effectively make it available to its JavaScript program.

SetModuleScriptProvider ( ModuleScriptProvider moduleScriptProvider ) : RequireBuilder

Sets the ModuleScriptProvider for the Require instances that this builder builds.

SetPostExec ( Script postExec ) : RequireBuilder

Sets the script that should execute in every module's scope after the module's own script has executed.

Sets the script that should execute in every module's scope after the module's own script has executed.

SetPreExec ( Script preExec ) : RequireBuilder

Sets the script that should execute in every module's scope before the module's own script has executed.

Sets the script that should execute in every module's scope before the module's own script has executed.

SetSandboxed ( bool sandboxed ) : RequireBuilder

Sets whether the created require() instances will be sandboxed.

Sets whether the created require() instances will be sandboxed. See Require.Require(Rhino.Context, Rhino.Scriptable, ModuleScriptProvider, Rhino.Script, Rhino.Script, bool) for explanation.

Описание методов

CreateRequire() публичный Метод

Creates a new require() function.
Creates a new require() function. You are still responsible for invoking either Require.Install(Rhino.Scriptable) or Require.RequireMain(Rhino.Context, string) to effectively make it available to its JavaScript program.
public CreateRequire ( Context cx, Scriptable globalScope ) : Require
cx Rhino.Context the current context
globalScope Scriptable the global scope containing the JS standard natives.
Результат Require

SetModuleScriptProvider() публичный Метод

Sets the ModuleScriptProvider for the Require instances that this builder builds.
public SetModuleScriptProvider ( ModuleScriptProvider moduleScriptProvider ) : RequireBuilder
moduleScriptProvider ModuleScriptProvider /// the module script provider for the /// Require /// instances that this builder builds. ///
Результат RequireBuilder

SetPostExec() публичный Метод

Sets the script that should execute in every module's scope after the module's own script has executed.
Sets the script that should execute in every module's scope after the module's own script has executed.
public SetPostExec ( Script postExec ) : RequireBuilder
postExec Script the post-exec script.
Результат RequireBuilder

SetPreExec() публичный Метод

Sets the script that should execute in every module's scope before the module's own script has executed.
Sets the script that should execute in every module's scope before the module's own script has executed.
public SetPreExec ( Script preExec ) : RequireBuilder
preExec Script the pre-exec script.
Результат RequireBuilder

SetSandboxed() публичный Метод

Sets whether the created require() instances will be sandboxed.
Sets whether the created require() instances will be sandboxed. See Require.Require(Rhino.Context, Rhino.Scriptable, ModuleScriptProvider, Rhino.Script, Rhino.Script, bool) for explanation.
public SetSandboxed ( bool sandboxed ) : RequireBuilder
sandboxed bool /// true if the created require() instances will be /// sandboxed. ///
Результат RequireBuilder