/// A separate V8 runtime is created for the new script engine instance.
/// </remarks>
publicV8ScriptEngine()
:this(null,null)
{
}
/// <summary>
/// Initializes a new V8 script engine instance with the specified name.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
/// </remarks>
publicV8ScriptEngine(stringname)
:this(name,null)
{
}
/// <summary>
/// Initializes a new V8 script engine instance with the specified resource constraints.
/// </summary>
/// <param name="constraints">Resource constraints for the V8 runtime (see remarks).</param>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
/// Initializes a new V8 script engine instance with the specified name and resource constraints.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="constraints">Resource constraints for the V8 runtime (see remarks).</param>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
/// Initializes a new V8 script engine instance with the specified name and options.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
/// Initializes a new V8 script engine instance with the specified name, options, and debug port.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="debugPort">A TCP port on which to listen for a debugger connection.</param>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
/// Initializes a new V8 script engine instance with the specified name, resource constraints, and options.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="constraints">Resource constraints for the V8 runtime (see remarks).</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
/// Initializes a new V8 script engine instance with the specified name, resource constraints, options, and debug port.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="constraints">Resource constraints for the V8 runtime (see remarks).</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="debugPort">A TCP port on which to listen for a debugger connection.</param>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
/// <param name="code">The script code to compile.</param>
/// <returns>A compiled script that can be executed multiple times without recompilation.</returns>
publicV8ScriptCompile(stringcode)
{
returnCompile(null,code);
}
/// <summary>
/// Creates a compiled script with an associated document name.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <returns>A compiled script that can be executed multiple times without recompilation.</returns>
/// Creates a compiled script with an associated document name, generating cache data for accelerated recompilation.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be generated.</param>
/// <param name="cacheBytes">Cache data for accelerated recompilation.</param>
/// <returns>A compiled script that can be executed multiple times without recompilation.</returns>
/// <remarks>
/// The generated cache data can be stored externally and is usable in other V8 script
/// engines and application processes.
/// </remarks>
/// <c><seealso cref="Compile(string, string, V8CacheKind, byte[], out bool)"/></c>
/// Creates a compiled script, consuming previously generated cache data.
/// </summary>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be consumed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
/// <param name="cacheAccepted"><c>True</c> if <paramref name="cacheBytes"/> was accepted and used to accelerate script compilation, <c>false</c> otherwise.</param>
/// <returns>A compiled script that can be executed multiple times without recompilation.</returns>
/// <remarks>
/// To be accepted, the cache data must have been generated for identical script code by
/// the same V8 build. Note that script compilation may be bypassed if a suitable compiled
/// script already exists in the V8 runtime's memory. In that case, the cache data is
/// ignored and <paramref name="cacheAccepted"/> is set to <c>false</c>.
/// </remarks>
/// <c><seealso cref="Compile(string, V8CacheKind, out byte[])"/></c>
/// Creates a compiled script with an associated document name, consuming previously generated cache data.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be consumed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
/// <param name="cacheAccepted"><c>True</c> if <paramref name="cacheBytes"/> was accepted and used to accelerate script compilation, <c>false</c> otherwise.</param>
/// <returns>A compiled script that can be executed multiple times without recompilation.</returns>
/// <remarks>
/// To be accepted, the cache data must have been generated for identical script code by
/// the same V8 build. Note that script compilation may be bypassed if a suitable compiled
/// script already exists in the V8 runtime's memory. In that case, the cache data is
/// ignored and <paramref name="cacheAccepted"/> is set to <c>false</c>.
/// </remarks>
/// <c><seealso cref="Compile(string, string, V8CacheKind, out byte[])"/></c>
/// Creates a compiled script with an associated document name, consuming previously generated cache data.
/// </summary>
/// <param name="documentInfo">A structure containing meta-information for the script document.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be consumed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
/// <param name="cacheAccepted"><c>True</c> if <paramref name="cacheBytes"/> was accepted and used to accelerate script compilation, <c>false</c> otherwise.</param>
/// <returns>A compiled script that can be executed multiple times without recompilation.</returns>
/// <remarks>
/// To be accepted, the cache data must have been generated for identical script code by
/// the same V8 build. Note that script compilation may be bypassed if a suitable compiled
/// script already exists in the V8 runtime's memory. In that case, the cache data is
/// ignored and <paramref name="cacheAccepted"/> is set to <c>false</c>.
/// </remarks>
/// <c><seealso cref="Compile(DocumentInfo, string, V8CacheKind, out byte[])"/></c>
/// Creates a compiled script with an associated document name, consuming previously generated cache data and updating it if necessary.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be processed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
/// <param name="cacheResult">The cache data processing result for the operation.</param>
/// <returns>A compiled script that can be executed multiple times without recompilation.</returns>
/// <remarks>
/// To be accepted, the cache data must have been generated for identical script code by
/// the same V8 build. If returned, the updated cache data can be stored externally and is
/// usable in other V8 script engines and application processes.
/// Loads and compiles a script document, consuming previously generated cache data.
/// </summary>
/// <param name="specifier">A string specifying the document to be loaded and compiled.</param>
/// <param name="cacheKind">The kind of cache data to be consumed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
/// <param name="cacheAccepted"><c>True</c> if <paramref name="cacheBytes"/> was accepted and used to accelerate script compilation, <c>false</c> otherwise.</param>
/// <returns>A compiled script that can be executed by multiple V8 script engine instances.</returns>
/// <remarks>
/// To be accepted, the cache data must have been generated for identical script code by
/// the same V8 build. Note that script compilation may be bypassed if a suitable compiled
/// script already exists in the V8 runtime's memory. In that case, the cache data is
/// ignored and <paramref name="cacheAccepted"/> is set to <c>false</c>.
/// Loads and compiles a document with the specified category, consuming previously generated cache data.
/// </summary>
/// <param name="specifier">A string specifying the document to be loaded and compiled.</param>
/// <param name="category">An optional category for the requested document.</param>
/// <param name="cacheKind">The kind of cache data to be consumed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
/// <param name="cacheAccepted"><c>True</c> if <paramref name="cacheBytes"/> was accepted and used to accelerate script compilation, <c>false</c> otherwise.</param>
/// <returns>A compiled script that can be executed by multiple V8 script engine instances.</returns>
/// <remarks>
/// To be accepted, the cache data must have been generated for identical script code by
/// the same V8 build. Note that script compilation may be bypassed if a suitable compiled
/// script already exists in the V8 runtime's memory. In that case, the cache data is
/// ignored and <paramref name="cacheAccepted"/> is set to <c>false</c>.
/// Loads and compiles a document with the specified category and context callback, consuming previously generated cache data.
/// </summary>
/// <param name="specifier">A string specifying the document to be loaded and compiled.</param>
/// <param name="category">An optional category for the requested document.</param>
/// <param name="contextCallback">An optional context callback for the requested document.</param>
/// <param name="cacheKind">The kind of cache data to be consumed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
/// <param name="cacheAccepted"><c>True</c> if <paramref name="cacheBytes"/> was accepted and used to accelerate script compilation, <c>false</c> otherwise.</param>
/// <returns>A compiled script that can be executed by multiple V8 script engine instances.</returns>
/// <remarks>
/// To be accepted, the cache data must have been generated for identical script code by
/// the same V8 build. Note that script compilation may be bypassed if a suitable compiled
/// script already exists in the V8 runtime's memory. In that case, the cache data is
/// ignored and <paramref name="cacheAccepted"/> is set to <c>false</c>.
/// Loads and compiles a document with the specified category and context callback, consuming previously generated cache data and updating it if necessary.
/// </summary>
/// <param name="specifier">A string specifying the document to be loaded and compiled.</param>
/// <param name="category">An optional category for the requested document.</param>
/// <param name="contextCallback">An optional context callback for the requested document.</param>
/// <param name="cacheKind">The kind of cache data to be processed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
/// <param name="cacheResult">The cache data processing result for the operation.</param>
/// <returns>A compiled script that can be executed by multiple V8 script engine instances.</returns>
/// <remarks>
/// To be accepted, the cache data must have been generated for identical script code by
/// the same V8 build. If returned, the updated cache data can be stored externally and is
/// usable in other V8 script engines and application processes.