RAGECOOP-V/Libs/Release/scripts/ClearScript.Core.xml
EntenKoeniq cfca7ad412 Added ClearScript for upcoming clientside
Example code for "test.js": ```script.SendMessage('test message');```
2022-03-25 19:53:48 +01:00

4251 lines
245 KiB
XML

<?xml version="1.0"?>
<doc>
<assembly>
<name>ClearScript.Core</name>
</assembly>
<members>
<member name="T:Microsoft.ClearScript.ContinuationCallback">
<summary>
Represents a method that specifies to a script engine whether script execution should continue.
</summary>
<returns><c>True</c> to continue script execution, <c>false</c> to interrupt it.</returns>
<seealso cref="P:Microsoft.ClearScript.ScriptEngine.ContinuationCallback"/>
</member>
<member name="T:Microsoft.ClearScript.DefaultScriptUsageAttribute">
<summary>
Specifies defaults for how type members are to be exposed to script code.
</summary>
<remarks>
This attribute is applicable to classes, enums, interfaces, structs, and assemblies. Use
<see cref="T:Microsoft.ClearScript.ScriptUsageAttribute"/>, <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/>, or
<see cref="T:Microsoft.ClearScript.NoScriptAccessAttribute"/> to override it for individual type members.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DefaultScriptUsageAttribute.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.DefaultScriptUsageAttribute"/> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DefaultScriptUsageAttribute.#ctor(Microsoft.ClearScript.ScriptAccess)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.DefaultScriptUsageAttribute"/> instance with the specified default script access setting.
</summary>
<param name="access">The default script access setting for type members.</param>
</member>
<member name="P:Microsoft.ClearScript.DefaultScriptUsageAttribute.Access">
<summary>
Gets the default script access setting for type members.
</summary>
</member>
<member name="T:Microsoft.ClearScript.Document">
<summary>
Provides an abstract representation of a document.
</summary>
</member>
<member name="M:Microsoft.ClearScript.Document.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.Document"/> instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.Document.Info">
<summary>
Gets a structure containing meta-information for the document.
</summary>
</member>
<member name="P:Microsoft.ClearScript.Document.Contents">
<summary>
Gets a stream that provides read access to the document.
</summary>
</member>
<member name="P:Microsoft.ClearScript.Document.Encoding">
<summary>
Gets the document's character encoding.
</summary>
<remarks>
This property returns <c>null</c> if the document contains binary data or if its
character encoding is unknown.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.DocumentAccessFlags">
<summary>
Defines document access options.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.None">
<summary>
Specifies that no options are selected.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.EnableFileLoading">
<summary>
Specifies that documents may be loaded from the file system.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.EnableWebLoading">
<summary>
Specifies that documents may be downloaded from the Web.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.EnableAllLoading">
<summary>
Specifies that documents may be loaded from any location.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.EnforceRelativePrefix">
<summary>
Specifies that a document path must begin with a segment of "." or ".." to be
considered a relative path. By default, any path that is not explicitly a top-level
or root path is eligible.
</summary>
</member>
<member name="T:Microsoft.ClearScript.DocumentCategory">
<summary>
Represents a document category.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentCategory.MaxCacheSize">
<summary>
Gets or sets the maximum cache size for the document category.
</summary>
<remarks>
<para>
This property specifies the maximum number of prepared or compiled documents of the
current category to be cached by script engines. Its initial value is 1024.
</para>
<para>
Each script engine or runtime maintains private caches for supported document
categories. These are distinct from the caches used by document loaders.
</para>
</remarks>
<seealso cref="P:Microsoft.ClearScript.DocumentLoader.MaxCacheSize"/>
</member>
<member name="P:Microsoft.ClearScript.DocumentCategory.Script">
<summary>
Gets the document category for normal scripts.
</summary>
</member>
<member name="T:Microsoft.ClearScript.DocumentContextCallback">
<summary>
Represents a method that retrieves context information for a document.
</summary>
<param name="info">A structure containing meta-information for the document.</param>
<returns>A property collection containing context information for the document.</returns>
</member>
<member name="T:Microsoft.ClearScript.DocumentFlags">
<summary>
Defines document attributes.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentFlags.None">
<summary>
Indicates that no attributes are present.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentFlags.IsTransient">
<summary>
Indicates that the document is temporary and can be discarded after use. Only Windows
Script engines honor this attribute.
</summary>
</member>
<member name="T:Microsoft.ClearScript.DocumentInfo">
<summary>
Contains meta-information for a document.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DocumentInfo.#ctor(System.String)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.DocumentInfo"/> structure with the specified document name.
</summary>
<param name="name">The document name.</param>
</member>
<member name="M:Microsoft.ClearScript.DocumentInfo.#ctor(System.Uri)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.DocumentInfo"/> structure with the specified document URI.
</summary>
<param name="uri">The document URI.</param>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.Name">
<summary>
Gets the document's name.
</summary>
<remarks>
This property always returns a non-blank string. If a null or blank document name was
specified at instantiation time, this property returns a default document name.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.Uri">
<summary>
Gets the document's URI.
</summary>
<remarks>
This property returns <c>null</c> if a URI was not specified at instantiation time.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.SourceMapUri">
<summary>
Gets or sets an optional source map URI for the document.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.Category">
<summary>
Gets or sets the document's category.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.Flags">
<summary>
Gets or sets optional document attributes.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.ContextCallback">
<summary>
Gets or sets an optional context callback for the document.
</summary>
<remarks>
<para>
This property currently applies only to modules. If specified, the callback is invoked
the first time the module attempts to retrieve its context information. The properties
it returns are made available to the module implementation. This mechanism can be used
to expose host resources selectively, securely, and without polluting the script
engine's global namespace.
</para>
<para>
Use
<c><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta">import.meta</see></c>
to access the context information of a <see cref="P:Microsoft.ClearScript.JavaScript.ModuleCategory.Standard"/> JavaScript
module. In a <see cref="P:Microsoft.ClearScript.JavaScript.ModuleCategory.CommonJS"/> module, use <c>module.meta</c>.
</para>
</remarks>
</member>
<member name="T:Microsoft.ClearScript.DocumentLoadCallback">
<summary>
Represents a method to be called when a document is loaded.
</summary>
<param name="info">A structure containing meta-information for the document.</param>
<remarks>
The callback can modify the document meta-information by specifying or overriding any of
its mutable properties.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.DocumentLoader">
<summary>
Represents a document loader.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.DocumentLoader"/> instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentLoader.Default">
<summary>
Gets the default document loader.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentLoader.MaxCacheSize">
<summary>
Gets or sets the maximum size of the document loader's cache.
</summary>
<remarks>
This property specifies the maximum number of documents to be cached by the document
loader. For the default document loader, its initial value is 1024.
</remarks>
<seealso cref="P:Microsoft.ClearScript.DocumentLoader.Default"/>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.LoadDocument(Microsoft.ClearScript.DocumentSettings,System.Nullable{Microsoft.ClearScript.DocumentInfo},System.String,Microsoft.ClearScript.DocumentCategory,Microsoft.ClearScript.DocumentContextCallback)">
<summary>
Loads a document.
</summary>
<param name="settings">Document access settings for the operation.</param>
<param name="sourceInfo">An optional structure containing meta-information for the requesting document.</param>
<param name="specifier">A string specifying the document to be loaded.</param>
<param name="category">An optional category for the requested document.</param>
<param name="contextCallback">An optional context callback for the requested document.</param>
<returns>A <see cref="T:Microsoft.ClearScript.Document"/> instance that represents the loaded document.</returns>
<remarks>
A loaded document must have an absolute <see cref="P:Microsoft.ClearScript.DocumentInfo.Uri">URI</see>. Once a
load operation has completed successfully, subsequent requests that resolve to the same
URI are expected to return the same <see cref="T:Microsoft.ClearScript.Document"/> reference, although loaders
are not required to manage document caches of unlimited size.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.LoadDocumentAsync(Microsoft.ClearScript.DocumentSettings,System.Nullable{Microsoft.ClearScript.DocumentInfo},System.String,Microsoft.ClearScript.DocumentCategory,Microsoft.ClearScript.DocumentContextCallback)">
<summary>
Loads a document asynchronously.
</summary>
<param name="settings">Document access settings for the operation.</param>
<param name="sourceInfo">An optional structure containing meta-information for the requesting document.</param>
<param name="specifier">A string specifying the document to be loaded.</param>
<param name="category">An optional category for the requested document.</param>
<param name="contextCallback">An optional context callback for the requested document.</param>
<returns>A task that represents the asynchronous operation. Upon completion, the task's result is a <see cref="T:Microsoft.ClearScript.Document"/> instance that represents the loaded document.</returns>
<remarks>
A loaded document must have an absolute <see cref="P:Microsoft.ClearScript.DocumentInfo.Uri">URI</see>. Once a
load operation has completed successfully, subsequent requests that resolve to the same
URI are expected to return the same <see cref="T:Microsoft.ClearScript.Document"/> reference, although loaders
are not required to manage document caches of unlimited size.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.GetCachedDocument(System.Uri)">
<summary>
Searches for a cached document by <see cref="P:Microsoft.ClearScript.DocumentInfo.Uri">URI</see>.
</summary>
<param name="uri">The document URI for which to search.</param>
<returns>The cached document if it was found, <c>null</c> otherwise.</returns>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.CacheDocument(Microsoft.ClearScript.Document,System.Boolean)">
<summary>
Stores a document in the cache.
</summary>
<param name="document">The document to store in the cache.</param>
<param name="replace"><c>True</c> to replace any existing document with the same URI, <c>false</c> otherwise.</param>
<returns>The cached document, which may be different from <paramref name="document"/> if <paramref name="replace"/> is <c>false</c>.</returns>
<remarks>
A cached document must have an absolute <see cref="P:Microsoft.ClearScript.DocumentInfo.Uri">URI</see>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.DiscardCachedDocuments">
<summary>
Discards all cached documents.
</summary>
</member>
<member name="T:Microsoft.ClearScript.DocumentSettings">
<summary>
Represents a document access configuration.
</summary>
<remarks>
This class can be extended to accommodate custom document loaders.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.DocumentSettings"/> instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.Loader">
<summary>
Gets or sets a document loader.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.AccessFlags">
<summary>
Gets or sets document access options.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.SearchPath">
<summary>
Gets or sets a semicolon-delimited list of directory URLs or paths to search for documents.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.FileNameExtensions">
<summary>
Gets or sets a semicolon-delimited list of supported file name extensions.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.LoadCallback">
<summary>
Gets or set an optional method to be called when a document is loaded.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.ContextCallback">
<summary>
Gets or sets an optional document context callback.
</summary>
<remarks>
<para>
This property is used as an alternative to <see cref="P:Microsoft.ClearScript.DocumentInfo.ContextCallback"/>.
If specified, the callback is invoked the first time a module attempts to retrieve its
context information. The properties it returns are made available to the module
implementation. This mechanism can be used to expose host resources selectively,
securely, and without polluting the script engine's global namespace.
</para>
<para>
Use
<c><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta">import.meta</see></c>
to access the context information of a <see cref="P:Microsoft.ClearScript.JavaScript.ModuleCategory.Standard"/> JavaScript
module. In a <see cref="P:Microsoft.ClearScript.JavaScript.ModuleCategory.CommonJS"/> module, use <c>module.meta</c>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.AddSystemDocument(System.String,System.String)">
<summary>
Adds a system document to the configuration.
</summary>
<param name="identifier">An identifier for the document.</param>
<param name="contents">A string containing the document's contents.</param>
<remarks>
System documents take precedence over loaded documents. Once this method is invoked,
document access using this configuration will always map the combination of
<paramref name="identifier"/> and <see cref="P:Microsoft.ClearScript.DocumentCategory.Script"/> to the
specified document, bypassing the configuration's document loader.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.AddSystemDocument(System.String,Microsoft.ClearScript.DocumentCategory,System.String)">
<summary>
Adds a system document with the specified category to the configuration.
</summary>
<param name="identifier">An identifier for the document.</param>
<param name="category">An optional category for the document.</param>
<param name="contents">A string containing the document's contents.</param>
<remarks>
System documents take precedence over loaded documents. Once this method is invoked,
document access using this configuration will always map the combination of
<paramref name="identifier"/> and <paramref name="category"/> to the specified
document, bypassing the configuration's document loader.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.AddSystemDocument(System.String,Microsoft.ClearScript.DocumentCategory,System.String,Microsoft.ClearScript.DocumentContextCallback)">
<summary>
Adds a system document with the specified category and context callback to the configuration.
</summary>
<param name="identifier">An identifier for the document.</param>
<param name="category">An optional category for the document.</param>
<param name="contents">A string containing the document's contents.</param>
<param name="contextCallback">An optional context callback for the document.</param>
<remarks>
System documents take precedence over loaded documents. Once this method is invoked,
document access using this configuration will always map the combination of
<paramref name="identifier"/> and <paramref name="category"/> to the specified
document, bypassing the configuration's document loader.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.AddSystemDocument(System.String,Microsoft.ClearScript.Document)">
<summary>
Adds the specified document as a system document to the configuration.
</summary>
<param name="identifier">An identifier for the document.</param>
<param name="document">The document to be added as a system document.</param>
<remarks>
System documents take precedence over loaded documents. Once this method is invoked,
document access using this configuration will always map the combination of
<paramref name="identifier"/> and the specified document's category to the specified
document, bypassing the configuration's document loader.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.DynamicHostObject">
<summary>
Extends <see cref="T:System.Dynamic.DynamicObject"/> for enhanced behavior and performance in a scripting environment.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DynamicHostObject.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.DynamicHostObject"/> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DynamicHostObject.HasMember(System.String,System.Boolean)">
<summary>
Determines whether the object has the specified named member.
</summary>
<param name="name">The member name for which to search.</param>
<param name="ignoreCase"><c>True</c> to perform a case-insensitive search, <c>false</c> otherwise.</param>
<returns><c>True</c> if the named member was found, <c>false</c> otherwise.</returns>
</member>
<member name="T:Microsoft.ClearScript.Extensions">
<summary>
Defines extension methods for use with all script engines.
</summary>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToHostType(System.Type)">
<summary>
Converts a type to a host type for use with script code currently running on the
calling thread.
</summary>
<param name="type">The type to convert to a host type.</param>
<returns>A host type for use with script code.</returns>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToHostType(System.Type,Microsoft.ClearScript.ScriptEngine)">
<summary>
Converts a type to a host type for use with script code running in the specified
script engine.
</summary>
<param name="type">The type to convert to a host type.</param>
<param name="engine">The script engine in which the host type will be used.</param>
<returns>A host type for use with script code.</returns>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToRestrictedHostObject``1(``0)">
<summary>
Converts an object to a host object with the specified type restriction, for use with
script code currently running on the calling thread.
</summary>
<typeparam name="T">The type whose members are to be made accessible from script code.</typeparam>
<param name="target">The object to convert to a host object for use with script code.</param>
<returns>A host object with the specified type restriction.</returns>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToRestrictedHostObject``1(``0,Microsoft.ClearScript.ScriptEngine)">
<summary>
Converts an object to a host object with the specified type restriction, for use with
script code running in the specified script engine.
</summary>
<typeparam name="T">The type whose members are to be made accessible from script code.</typeparam>
<param name="target">The object to convert to a host object for use with script code.</param>
<param name="engine">The script engine in which the host object will be used.</param>
<returns>A host object with the specified type restriction.</returns>
</member>
<member name="T:Microsoft.ClearScript.EventSource`1">
<summary>
Represents a host event source.
</summary>
<typeparam name="T">The event handler delegate type.</typeparam>
</member>
<member name="M:Microsoft.ClearScript.EventSource`1.connect(System.Object)">
<summary>
Connects the host event source to the specified script handler function.
</summary>
<param name="scriptFunc">The script function that will handle the event.</param>
<returns>An <see cref="T:Microsoft.ClearScript.EventConnection`1"/> that represents the connection.</returns>
</member>
<member name="T:Microsoft.ClearScript.EventConnection`1">
<summary>
Represents a connection between a host event source and a script handler function.
</summary>
<typeparam name="T">The event handler delegate type.</typeparam>
</member>
<member name="M:Microsoft.ClearScript.EventConnection`1.disconnect">
<summary>
Disconnects the host event source from the script handler function.
</summary>
</member>
<member name="T:Microsoft.ClearScript.HostFunctions">
<summary>
Provides optional script-callable utility functions.
</summary>
<remarks>
Use <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see> to expose a
<c>HostFunctions</c> instance to script code. Each instance can only be exposed in one
script engine.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.HostFunctions"/> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newObj">
<summary>
Creates an empty host object.
</summary>
<returns>A new empty host object.</returns>
<remarks>
This function is provided for script languages that do not support external
instantiation. It creates an object that supports dynamic property addition and
removal. The host can manipulate it via the <see cref="T:Microsoft.ClearScript.IPropertyBag"/> interface.
</remarks>
<example>
The following code creates an empty host object and adds several properties to it.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.HostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var item = host.newObj();
item.label = "Widget";
item.weight = 123.45;
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newObj``1(System.Object[])">
<summary>
Creates a host object of the specified type. This version is invoked if the specified
type can be used as a type argument.
</summary>
<typeparam name="T">The type of object to create.</typeparam>
<param name="args">Optional constructor arguments.</param>
<returns>A new host object of the specified type.</returns>
<remarks>
<para>
This function is provided for script languages that do not support external
instantiation. It is overloaded with <see cref="M:Microsoft.ClearScript.HostFunctions.newObj(System.Object,System.Object[])"/> and
selected at runtime if <typeparamref name="T"/> can be used as a type argument.
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see>.
</para>
</remarks>
<example>
The following code imports the <see cref="T:System.Random"/> class, creates an
instance using the
<see href="https://docs.microsoft.com/en-us/dotnet/api/system.random.-ctor#System_Random__ctor_System_Int32_">Random(Int32)</see>
constructor, and calls the <see cref="M:System.Random.NextDouble"/> method.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var RandomT = host.type("System.Random");
var random = host.newObj(RandomT, 100);
var value = random.NextDouble();
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newObj(System.Object,System.Object[])">
<summary>
Creates a host object of the specified type. This version is invoked if the specified
type cannot be used as a type argument.
</summary>
<param name="type">The type of object to create.</param>
<param name="args">Optional constructor arguments.</param>
<returns>A new host object of the specified type.</returns>
<remarks>
<para>
This function is provided for script languages that do not support external
instantiation. It is overloaded with <see cref="M:Microsoft.ClearScript.HostFunctions.newObj``1(System.Object[])"/> and selected at runtime if
<paramref name="type"/> cannot be used as a type argument. Note that this applies
to some host types that support instantiation, such as certain COM/ActiveX types.
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newObj(System.Dynamic.IDynamicMetaObjectProvider,System.Object[])">
<summary>
Performs dynamic instantiation.
</summary>
<param name="target">The dynamic host object that provides the instantiation operation to perform.</param>
<param name="args">Optional instantiation arguments.</param>
<returns>The result of the operation, which is usually a new dynamic host object.</returns>
<remarks>
This function is provided for script languages that do not support external
instantiation.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newArr``1(System.Int32[])">
<summary>
Creates a host array with the specified element type.
</summary>
<typeparam name="T">The element type of the array to create.</typeparam>
<param name="lengths">One or more integers representing the array dimension lengths.</param>
<returns>A new host array with the specified element type.</returns>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see>.
</remarks>
<example>
The following code creates a 5x3 host array of strings.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var StringT = host.type("System.String");
var array = host.newArr(StringT, 5, 3);
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.HostFunctions.newArr(System.Int32[])"/>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newArr(System.Int32[])">
<summary>
Creates a host array with <see cref="T:System.Object"/> as the element type.
</summary>
<param name="lengths">One or more integers representing the array dimension lengths.</param>
<returns>A new host array with <see cref="T:System.Object"/> as the element type.</returns>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see>.
</remarks>
<seealso cref="M:Microsoft.ClearScript.HostFunctions.newArr``1(System.Int32[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newVar``1(``0)">
<summary>
Creates a host variable of the specified type.
</summary>
<typeparam name="T">The type of variable to create.</typeparam>
<param name="initValue">An optional initial value for the variable.</param>
<returns>A new host variable of the specified type.</returns>
<remarks>
<para>
A host variable is a strongly typed object that holds a value of the specified type.
Host variables are useful for passing method arguments by reference. In addition to
being generally interchangeable with their stored values, host variables support the
following properties:
</para>
<para>
<list type="table">
<listheader>
<term>Property</term>
<term>Access</term>
<description>Description</description>
</listheader>
<item>
<term><c>value</c></term>
<term>read-write</term>
<description>The current value of the host variable.</description>
</item>
<item>
<term><c>out</c></term>
<term>read-only</term>
<description>A reference to the host variable that can be passed as an <c><see href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/out-parameter-modifier">out</see></c> argument.</description>
</item>
<item>
<term><c>ref</c></term>
<term>read-only</term>
<description>A reference to the host variable that can be passed as a <c><see href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/ref">ref</see></c> argument.</description>
</item>
</list>
</para>
</remarks>
<example>
The following code demonstrates using a host variable to invoke a method with an
<c>out</c> parameter.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import a dictionary type
var StringT = host.type("System.String");
var StringDictT = host.type("System.Collections.Generic.Dictionary", StringT, StringT);
// create and populate a dictionary
var dict = host.newObj(StringDictT);
dict.Add("foo", "bar");
dict.Add("baz", "qux");
// look up a dictionary entry
var result = host.newVar(StringT);
var found = dict.TryGetValue("baz", result.out);
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.del``1(System.Object)">
<summary>
Creates a delegate that invokes a script function.
</summary>
<typeparam name="T">The type of delegate to create.</typeparam>
<param name="scriptFunc">The script function for which to create a delegate.</param>
<returns>A new delegate that invokes the specified script function.</returns>
<remarks>
If the delegate signature includes parameters passed by reference, the corresponding
arguments to the script function will be <see cref="M:Microsoft.ClearScript.HostFunctions.newVar``1(``0)">host variables</see>.
The script function can set the value of an output argument by assigning the
corresponding host variable's <c>value</c> property.
</remarks>
<example>
The following code demonstrates delegating a callback to a script function.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// create and populate an array of integers
var EnumerableT = host.type("System.Linq.Enumerable", "System.Core");
var array = EnumerableT.Range(1, 5).ToArray();
// import the callback type required to call Array.ForEach
var Int32T = host.type("System.Int32");
var CallbackT = host.type("System.Action", Int32T);
// use Array.ForEach to calculate a sum
var sum = 0;
var ArrayT = host.type("System.Array");
ArrayT.ForEach(array, host.del(CallbackT, function (value) { sum += value; }));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.String,System.Object[])"/>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.proc(System.Int32,System.Object)">
<summary>
Creates a delegate that invokes a script function and returns no value.
</summary>
<param name="argCount">The number of arguments to pass to the script function.</param>
<param name="scriptFunc">The script function for which to create a delegate.</param>
<returns>A new delegate that invokes the specified script function and returns no value.</returns>
<remarks>
This function creates a delegate that accepts <paramref name="argCount"/> arguments and
returns no value. The type of all parameters is <see cref="T:System.Object"/>. Such a
delegate is often useful in strongly typed contexts because of
<see href="https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/covariance-contravariance/">contravariance</see>.
</remarks>
<example>
The following code demonstrates delegating a callback to a script function.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// create and populate an array of strings
var StringT = host.type("System.String");
var array = host.newArr(StringT, 3);
array.SetValue("first", 0);
array.SetValue("second", 1);
array.SetValue("third", 2);
// use Array.ForEach to generate console output
var ArrayT = host.type("System.Array");
var ConsoleT = host.type("System.Console");
ArrayT.ForEach(array, host.proc(1, function (value) { ConsoleT.WriteLine(value); }));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
<seealso cref="M:Microsoft.ClearScript.HostFunctions.newArr``1(System.Int32[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.func``1(System.Int32,System.Object)">
<summary>
Creates a delegate that invokes a script function and returns a value of the specified type.
</summary>
<typeparam name="T">The return value type.</typeparam>
<param name="argCount">The number of arguments to pass to the script function.</param>
<param name="scriptFunc">The script function for which to create a delegate.</param>
<returns>A new delegate that invokes the specified script function and returns a value of the specified type.</returns>
<remarks>
This function creates a delegate that accepts <paramref name="argCount"/> arguments and
returns a value of the specified type. The type of all parameters is
<see cref="T:System.Object"/>. Such a delegate is often useful in strongly typed contexts
because of
<see href="https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/covariance-contravariance/">contravariance</see>.
</remarks>
<example>
The following code demonstrates delegating a callback to a script function.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// create and populate an array of strings
var StringT = host.type("System.String");
var array = host.newArr(StringT, 3);
array.SetValue("first", 0);
array.SetValue("second", 1);
array.SetValue("third", 2);
// import LINQ extensions
var EnumerableT = host.type("System.Linq.Enumerable", "System.Core");
// use LINQ to create an array of modified strings
var selector = host.func(StringT, 1, function (value) { return value.toUpperCase(); });
array = array.Select(selector).ToArray();
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.HostFunctions.func(System.Int32,System.Object)"/>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.func(System.Int32,System.Object)">
<summary>
Creates a delegate that invokes a script function and returns its result value.
</summary>
<param name="argCount">The number of arguments to pass to the script function.</param>
<param name="scriptFunc">The script function for which to create a delegate.</param>
<returns>A new delegate that invokes the specified script function and returns its result value.</returns>
<remarks>
<para>
This function creates a delegate that accepts <paramref name="argCount"/> arguments and
returns the result of invoking <paramref name="scriptFunc"/>. The type of all
parameters and the return value is <see cref="T:System.Object"/>. Such a delegate is
often useful in strongly typed contexts because of
<see href="https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/covariance-contravariance/">contravariance</see>.
</para>
<para>
For information about the types of result values that script code can return, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.Boolean,System.String)"/>.
</para>
</remarks>
<seealso cref="M:Microsoft.ClearScript.HostFunctions.func``1(System.Int32,System.Object)"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.typeOf``1">
<summary>
Gets the <see cref="T:System.Type"/> for the specified host type. This version is invoked
if the specified object can be used as a type argument.
</summary>
<typeparam name="T">The host type for which to get the <see cref="T:System.Type"/>.</typeparam>
<returns>The <see cref="T:System.Type"/> for the specified host type.</returns>
<remarks>
<para>
This function is similar to C#'s
<c><see href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/typeof">typeof</see></c>
operator. It is overloaded with <see cref="M:Microsoft.ClearScript.HostFunctions.typeOf(System.Object)"/> and selected at runtime if
<typeparamref name="T"/> can be used as a type argument.
</para>
<para>
This function throws an exception if the script engine's
<see cref="P:Microsoft.ClearScript.ScriptEngine.AllowReflection"/> property is set to <c>false</c>.
</para>
</remarks>
<example>
The following code retrieves the assembly-qualified name of a host type.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var StringT = host.type("System.String");
var name = host.typeOf(StringT).AssemblyQualifiedName;
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.typeOf(System.Object)">
<summary>
Gets the <see cref="T:System.Type"/> for the specified host type. This version is invoked
if the specified object cannot be used as a type argument.
</summary>
<param name="value">The host type for which to get the <see cref="T:System.Type"/>.</param>
<returns>The <see cref="T:System.Type"/> for the specified host type.</returns>
<remarks>
<para>
This function is similar to C#'s
<c><see href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/typeof">typeof</see></c>
operator. It is overloaded with <see cref="M:Microsoft.ClearScript.HostFunctions.typeOf``1"/> and selected at runtime if
<paramref name="value"/> cannot be used as a type argument. Note that this applies to
some host types; examples are static types and overloaded generic type groups.
</para>
<para>
This function throws an exception if the script engine's
<see cref="P:Microsoft.ClearScript.ScriptEngine.AllowReflection"/> property is set to <c>false</c>.
</para>
</remarks>
<example>
The following code retrieves the assembly-qualified name of a host type.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var ConsoleT = host.type("System.Console");
var name = host.typeOf(ConsoleT).AssemblyQualifiedName;
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.isType``1(System.Object)">
<summary>
Determines whether an object is compatible with the specified host type.
</summary>
<typeparam name="T">The host type with which to test <paramref name="value"/> for compatibility.</typeparam>
<param name="value">The object to test for compatibility with the specified host type.</param>
<returns><c>True</c> if <paramref name="value"/> is compatible with the specified type, <c>false</c> otherwise.</returns>
<remarks>
This function is similar to C#'s
<c><see href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/is">is</see></c>
operator.
</remarks>
<example>
The following code defines a function that determines whether an object implements
<see cref="T:System.IComparable"/>.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
function isComparable(value)
{
var IComparableT = host.type("System.IComparable");
return host.isType(IComparableT, value);
}
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.asType``1(System.Object)">
<summary>
Casts an object to the specified host type, returning <c>null</c> if the cast fails.
</summary>
<typeparam name="T">The host type to which to cast <paramref name="value"/>.</typeparam>
<param name="value">The object to cast to the specified host type.</param>
<returns>The result of the cast if successful, <c>null</c> otherwise.</returns>
<remarks>
This function is similar to C#'s
<c><see href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/as">as</see></c>
operator.
</remarks>
<example>
The following code defines a function that disposes an object if it implements
<see cref="T:System.IDisposable"/>.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
function dispose(value)
{
var IDisposableT = host.type("System.IDisposable");
var disposable = host.asType(IDisposableT, value);
if (disposable) {
disposable.Dispose();
}
}
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.cast``1(System.Object)">
<summary>
Casts an object to the specified host type.
</summary>
<typeparam name="T">The host type to which to cast <paramref name="value"/>.</typeparam>
<param name="value">The object to cast to the specified host type.</param>
<returns>The result of the cast.</returns>
<remarks>
If the cast fails, this function throws an exception.
</remarks>
<example>
The following code casts a floating-point value to a 32-bit integer.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var Int32T = host.type("System.Int32");
var intValue = host.cast(Int32T, 12.5);
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.isTypeObj(System.Object)">
<summary>
Determines whether an object is a host type. This version is invoked if the specified
object cannot be used as a type argument.
</summary>
<param name="value">The object to test.</param>
<returns><c>True</c> if <paramref name="value"/> is a host type, <c>false</c> otherwise.</returns>
<remarks>
This function is overloaded with <see cref="M:Microsoft.ClearScript.HostFunctions.isTypeObj``1"/> and selected at runtime if
<paramref name="value"/> cannot be used as a type argument. Note that this applies to
some host types; examples are static types and overloaded generic type groups.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.isTypeObj``1">
<summary>
Determines whether an object is a host type. This version is invoked if the specified
object can be used as a type argument.
</summary>
<typeparam name="T">The host type (ignored).</typeparam>
<returns><c>True</c>.</returns>
<remarks>
This function is overloaded with <see cref="M:Microsoft.ClearScript.HostFunctions.isTypeObj(System.Object)"/> and selected at
runtime if <typeparamref name="T"/> can be used as a type argument. Because type
arguments are always host types, this method ignores its type argument and always
returns <c>true</c>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.isNull(System.Object)">
<summary>
Determines whether the specified value is <c>null</c>.
</summary>
<param name="value">The value to test.</param>
<returns><c>True</c> if <paramref name="value"/> is <c>null</c>, <c>false</c> otherwise.</returns>
<remarks>
Use this function to test field, property, and method return values when <c>null</c>
result wrapping is in effect (see
<see cref="F:Microsoft.ClearScript.ScriptMemberFlags.WrapNullResult"/> and
<see cref="P:Microsoft.ClearScript.ScriptEngine.EnableNullResultWrapping"/>).
</remarks>
<seealso cref="F:Microsoft.ClearScript.ScriptMemberFlags.WrapNullResult"/>
<seealso cref="P:Microsoft.ClearScript.ScriptEngine.EnableNullResultWrapping"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.flags``1(``0[])">
<summary>
Creates a strongly typed flag set.
</summary>
<typeparam name="T">The type of flag set to create.</typeparam>
<param name="args">The flags to include in the flag set.</param>
<returns>A strongly typed flag set containing the specified flags.</returns>
<remarks>
This function throws an exception if <typeparamref name="T"/> is not a flag set type.
</remarks>
<example>
The following code demonstrates using a strongly typed flag set.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import URI types
var UriT = host.type("System.Uri", "System");
var UriFormatT = host.type("System.UriFormat", "System");
var UriComponentsT = host.type("System.UriComponents", "System");
// create a URI
var uri = host.newObj(UriT, "http://www.example.com:8080/path/to/file/sample.htm?x=1&amp;y=2");
// extract URI components
var components = host.flags(UriComponentsT.Scheme, UriComponentsT.Host, UriComponentsT.Path);
var result = uri.GetComponents(components, UriFormatT.Unescaped);
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toSByte(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.SByte"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.SByte"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.SByte"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.SByte"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.SByte"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.SByte");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toSByte(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toByte(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.Byte"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.Byte"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.Byte"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.Byte"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.Byte"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.Byte");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toByte(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toInt16(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.Int16"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.Int16"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.Int16"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.Int16"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.Int16"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.Int16");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toInt16(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toUInt16(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.UInt16"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.UInt16"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.UInt16"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.UInt16"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.UInt16"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.UInt16");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toUInt16(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toChar(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.Char"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.Char"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.Char"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.Char"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.Char"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.Char");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toChar(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toInt32(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.Int32"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.Int32"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.Int32"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.Int32"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.Int32"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.Int32");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toInt32(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toUInt32(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.UInt32"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.UInt32"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.UInt32"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.UInt32"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.UInt32"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.UInt32");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toUInt32(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toInt64(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.Int64"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.Int64"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.Int64"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.Int64"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.Int64"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.Int64");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toInt64(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toUInt64(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.UInt64"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.UInt64"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.UInt64"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.UInt64"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.UInt64"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.UInt64");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toUInt64(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toSingle(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.Single"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.Single"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.Single"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.Single"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.Single"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.Single");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toSingle(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toDouble(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.Double"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.Double"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.Double"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.Double"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.Double"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.Double");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toDouble(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toDecimal(System.IConvertible)">
<summary>
Converts the specified value to a strongly typed <see cref="T:System.Decimal"/> instance.
</summary>
<param name="value">The value to convert.</param>
<returns>An object that can be passed to a parameter of type <see cref="T:System.Decimal"/>.</returns>
<remarks>
This function converts <paramref name="value"/> to <see cref="T:System.Decimal"/> and
packages the result to retain its numeric type across the host-script boundary. It may
be useful for passing arguments to <see cref="T:System.Decimal"/> parameters if the script
engine does not support that type natively.
</remarks>
<example>
The following code adds an element of type <see cref="T:System.Decimal"/> to a strongly
typed list.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ElementT = host.type("System.Decimal");
var ListT = host.type("System.Collections.Generic.List", ElementT);
// create a list
var list = host.newObj(ListT);
// add a list element
list.Add(host.toDecimal(42));
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.getProperty(Microsoft.ClearScript.IPropertyBag,System.String)">
<summary>
Gets the value of a property in a dynamic host object that implements <see cref="T:Microsoft.ClearScript.IPropertyBag"/>.
</summary>
<param name="target">The dynamic host object that contains the property to get.</param>
<param name="name">The name of the property to get.</param>
<returns>The value of the specified property.</returns>
<remarks>
This function is provided for script languages that do not support dynamic properties.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.setProperty(Microsoft.ClearScript.IPropertyBag,System.String,System.Object)">
<summary>
Sets a property value in a dynamic host object that implements <see cref="T:Microsoft.ClearScript.IPropertyBag"/>.
</summary>
<param name="target">The dynamic host object that contains the property to set.</param>
<param name="name">The name of the property to set.</param>
<param name="value">The new value of the specified property.</param>
<returns>The result of the operation, which is usually the value assigned to the specified property.</returns>
<remarks>
This function is provided for script languages that do not support dynamic properties.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.removeProperty(Microsoft.ClearScript.IPropertyBag,System.String)">
<summary>
Removes a property from a dynamic host object that implements <see cref="T:Microsoft.ClearScript.IPropertyBag"/>.
</summary>
<param name="target">The dynamic host object that contains the property to remove.</param>
<param name="name">The name of the property to remove.</param>
<returns><c>True</c> if the property was found and removed, <c>false</c> otherwise.</returns>
<remarks>
This function is provided for script languages that do not support dynamic properties.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.getProperty(System.Dynamic.IDynamicMetaObjectProvider,System.String)">
<summary>
Gets the value of a property in a dynamic host object that implements <see cref="T:System.Dynamic.IDynamicMetaObjectProvider"/>.
</summary>
<param name="target">The dynamic host object that contains the property to get.</param>
<param name="name">The name of the property to get.</param>
<returns>The value of the specified property.</returns>
<remarks>
This function is provided for script languages that do not support dynamic properties.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.setProperty(System.Dynamic.IDynamicMetaObjectProvider,System.String,System.Object)">
<summary>
Sets a property value in a dynamic host object that implements <see cref="T:System.Dynamic.IDynamicMetaObjectProvider"/>.
</summary>
<param name="target">The dynamic host object that contains the property to set.</param>
<param name="name">The name of the property to set.</param>
<param name="value">The new value of the specified property.</param>
<returns>The result of the operation, which is usually the value assigned to the specified property.</returns>
<remarks>
This function is provided for script languages that do not support dynamic properties.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.removeProperty(System.Dynamic.IDynamicMetaObjectProvider,System.String)">
<summary>
Removes a property from a dynamic host object that implements <see cref="T:System.Dynamic.IDynamicMetaObjectProvider"/>.
</summary>
<param name="target">The dynamic host object that contains the property to remove.</param>
<param name="name">The name of the property to remove.</param>
<returns><c>True</c> if the property was found and removed, <c>false</c> otherwise.</returns>
<remarks>
This function is provided for script languages that do not support dynamic properties.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.getElement(System.Dynamic.IDynamicMetaObjectProvider,System.Object[])">
<summary>
Gets the value of an element in a dynamic host object that implements <see cref="T:System.Dynamic.IDynamicMetaObjectProvider"/>.
</summary>
<param name="target">The dynamic host object that contains the element to get.</param>
<param name="indices">One or more indices that identify the element to get.</param>
<returns>The value of the specified element.</returns>
<remarks>
This function is provided for script languages that do not support general indexing.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.setElement(System.Dynamic.IDynamicMetaObjectProvider,System.Object,System.Object[])">
<summary>
Sets an element value in a dynamic host object that implements <see cref="T:System.Dynamic.IDynamicMetaObjectProvider"/>.
</summary>
<param name="target">The dynamic host object that contains the element to set.</param>
<param name="value">The new value of the element.</param>
<param name="indices">One or more indices that identify the element to set.</param>
<returns>The result of the operation, which is usually the value assigned to the specified element.</returns>
<remarks>
This function is provided for script languages that do not support general indexing.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.removeElement(System.Dynamic.IDynamicMetaObjectProvider,System.Object[])">
<summary>
Removes an element from a dynamic host object that implements <see cref="T:System.Dynamic.IDynamicMetaObjectProvider"/>.
</summary>
<param name="target">The dynamic host object that contains the element to remove.</param>
<param name="indices">One or more indices that identify the element to remove.</param>
<returns><c>True</c> if the element was found and removed, <c>false</c> otherwise.</returns>
<remarks>
This function is provided for script languages that do not support general indexing.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.toStaticType(System.Dynamic.IDynamicMetaObjectProvider)">
<summary>
Casts a dynamic host object to its static type.
</summary>
<param name="value">The object to cast to its static type.</param>
<returns>The specified object in its static type form, stripped of its dynamic members.</returns>
<remarks>
A dynamic host object that implements <see cref="T:System.Dynamic.IDynamicMetaObjectProvider"/> may have
dynamic members that override members of its static type. This function can be used to
gain access to type members overridden in this manner.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.tryCatch(System.Object,System.Object,System.Object)">
<summary>
Allows script code to handle host exceptions.
</summary>
<param name="tryFunc">A script function that invokes one or more host methods or properties.</param>
<param name="catchFunc">A script function to invoke if <paramref name="tryFunc"/> throws an exception.</param>
<param name="finallyFunc">An optional script function that performs cleanup for the operation.</param>
<returns><c>True</c> if <paramref name="tryFunc"/> completed successfully, <c>false</c> if it threw an exception that was handled by <paramref name="catchFunc"/>.</returns>
<remarks>
This function uses a <c>try</c>-<c>catch</c>-<c>finally</c> statement to invoke
<paramref name="tryFunc"/>. If an exception is thrown, it is caught and passed to
<paramref name="catchFunc"/> for analysis. If <paramref name="catchFunc"/> returns
<c>false</c>, the exception is rethrown. Regardless of the outcome,
<paramref name="finallyFunc"/>, if specified, is invoked as a final step before the
function exits.
</remarks>
<example>
The following code demonstrates handling host exceptions in script code.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
// import types
var ConsoleT = host.type("System.Console");
var WebClientT = host.type("System.Net.WebClient", "System");
// create a Web client
var webClient = host.newObj(WebClientT);
host.tryCatch(
function () {
// download Web document
ConsoleT.WriteLine(webClient.DownloadString("http://cnn.com"));
},
function (exception) {
// dump exception
ConsoleT.WriteLine("*** ERROR: " + exception.GetBaseException().ToString());
return true;
},
function () {
// clean up
ConsoleT.WriteLine("*** CLEANING UP ***");
webClient.Dispose();
}
);
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.String,System.Object[])"/>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="T:Microsoft.ClearScript.ExtendedHostFunctions">
<summary>
Provides optional script-callable utility functions. This extended version allows script
code to import host types.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])">
<summary>
Imports a host type by name.
</summary>
<param name="name">The fully qualified name of the host type to import.</param>
<param name="hostTypeArgs">Optional generic type arguments.</param>
<returns>The imported host type.</returns>
<remarks>
<para>
Host types are imported in the form of objects whose properties and methods are bound
to the host type's static members and nested types. If <paramref name="name"/> refers
to a generic type, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see>.
</para>
</remarks>
<example>
The following code imports the
<see href="https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2">Dictionary</see>
generic type and uses it to create a string dictionary.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var DictT = host.type("System.Collections.Generic.Dictionary");
var StringT = host.type("System.String");
var dict = host.newObj(DictT(StringT, StringT));
</code>
Another way to create a string dictionary is to import the specific type directly.
<code lang="JavaScript">
var StringT = host.type("System.String");
var StringDictT = host.type("System.Collections.Generic.Dictionary", StringT, StringT);
var dict = host.newObj(StringDictT);
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.String,System.Object[])">
<summary>
Imports a host type by name from the specified assembly.
</summary>
<param name="name">The fully qualified name of the host type to import.</param>
<param name="assemblyName">The name of the assembly that contains the host type to import.</param>
<param name="hostTypeArgs">Optional generic type arguments.</param>
<returns>The imported host type.</returns>
<remarks>
<para>
Host types are imported in the form of objects whose properties and methods are bound
to the host type's static members and nested types. If <paramref name="name"/> refers
to a generic type, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see>.
</para>
</remarks>
<example>
The following code imports <see cref="T:System.Linq.Enumerable"/> and uses it to create
an array of strings.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var EnumerableT = host.type("System.Linq.Enumerable", "System.Core");
var Int32T = host.type("System.Int32");
var StringT = host.type("System.String");
var SelectorT = host.type("System.Func", Int32T, StringT);
var selector = host.del(SelectorT, function (num) { return StringT.Format("The number is {0}.", num); });
var array = EnumerableT.Range(0, 5).Select(selector).ToArray();
</code>
</example>
<seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.Type)">
<summary>
Imports the host type for the specified <see cref="T:System.Type"/>.
</summary>
<param name="type">The <see cref="T:System.Type"/> that specifies the host type to import.</param>
<returns>The imported host type.</returns>
<remarks>
<para>
Host types are imported in the form of objects whose properties and methods are bound
to the host type's static members and nested types. If <paramref name="type"/> refers
to a generic type, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.arrType``1(System.Int32)">
<summary>
Imports the host array type for the specified element type.
</summary>
<typeparam name="T">The element type for the host array type to import.</typeparam>
<param name="rank">The number of dimensions for the host array type to import.</param>
<returns>The imported host array type.</returns>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.lib(System.String[])">
<summary>
Imports types from one or more host assemblies.
</summary>
<param name="assemblyNames">The names of the assemblies that contain the types to import.</param>
<returns>The imported host type collection.</returns>
<remarks>
Host type collections provide convenient scriptable access to all the types defined in one
or more host assemblies. They are hierarchical collections where leaf nodes represent types
and parent nodes represent namespaces. For example, if an assembly contains a type named
"Acme.Gadgets.Button", the corresponding collection will have a property named "Acme" whose
value is an object with a property named "Gadgets" whose value is an object with a property
named "Button" whose value represents the <c>Acme.Gadgets.Button</c> host type.
</remarks>
<example>
The following code imports types from several core assemblies and uses
<see cref="T:System.Linq.Enumerable"/> to create an array of integers.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var clr = host.lib("mscorlib", "System", "System.Core");
var array = clr.System.Linq.Enumerable.Range(0, 5).ToArray();
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.lib(Microsoft.ClearScript.HostTypeCollection,System.String[])">
<summary>
Imports types from one or more host assemblies and merges them with an existing host type collection.
</summary>
<param name="collection">The host type collection with which to merge types from the specified assemblies.</param>
<param name="assemblyNames">The names of the assemblies that contain the types to import.</param>
<returns>A host type collection: <paramref name="collection"/> if it is not <c>null</c>, a new host type collection otherwise.</returns>
<remarks>
Host type collections provide convenient scriptable access to all the types defined in one
or more host assemblies. They are hierarchical collections where leaf nodes represent types
and parent nodes represent namespaces. For example, if an assembly contains a type named
"Acme.Gadgets.Button", the corresponding collection will have a property named "Acme" whose
value is an object with a property named "Gadgets" whose value is an object with a property
named "Button" whose value represents the <c>Acme.Gadgets.Button</c> host type.
</remarks>
<example>
The following code imports types from several core assemblies and uses
<see cref="T:System.Linq.Enumerable"/> to create an array of integers.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var clr = host.lib("mscorlib");
host.lib(clr, "System");
host.lib(clr, "System.Core");
var array = clr.System.Linq.Enumerable.Range(0, 5).ToArray();
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.comType(System.String,System.String)">
<summary>
Imports a COM/ActiveX type.
</summary>
<param name="progID">The programmatic identifier (ProgID) of the registered class to import.</param>
<param name="serverName">An optional name that specifies the server from which to import the type.</param>
<returns>The imported COM/ActiveX type.</returns>
<remarks>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</remarks>
<example>
The following code imports the
<see href="https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/windows-scripting/x4k5wbx4(v=vs.84)">Scripting.Dictionary</see>
class and uses it to create and populate an instance.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var DictT = host.comType('Scripting.Dictionary');
var dict = host.newObj(DictT);
dict.Add('foo', 123);
dict.Add('bar', 456.789);
dict.Add('baz', 'abc');
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.newComObj(System.String,System.String)">
<summary>
Creates a COM/ActiveX object of the specified type.
</summary>
<param name="progID">The programmatic identifier (ProgID) of the registered class to instantiate.</param>
<param name="serverName">An optional name that specifies the server on which to create the object.</param>
<returns>A new COM/ActiveX object of the specified type.</returns>
<remarks>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</remarks>
<example>
The following code creates a
<see href="https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/windows-scripting/6kxy1a51(v=vs.84)">Scripting.FileSystemObject</see>
instance and uses it to list the drives on the local machine.
It assumes that an instance of <see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/> is exposed under
the name "host"
(see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>).
<code lang="JavaScript">
var fso = host.newComObj('Scripting.FileSystemObject');
var ConsoleT = host.type('System.Console');
for (en = fso.Drives.GetEnumerator(); en.MoveNext();) {
ConsoleT.WriteLine(en.Current.Path);
}
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.typeLibEnums``1(``0,Microsoft.ClearScript.HostTypeCollection)">
<summary>
Imports enumerations defined within or referenced from a COM/ActiveX type library.
</summary>
<typeparam name="T">The imported type whose parent library is to be searched for relevant enumerations.</typeparam>
<param name="obj">An instance of the representative type.</param>
<param name="collection">An optional host type collection with which to merge the imported enumerations.</param>
<returns>A host type collection: <paramref name="collection"/> if it is not <c>null</c>, a new host type collection otherwise.</returns>
</member>
<member name="T:Microsoft.ClearScript.HostItemFlags">
<summary>
Defines options for exposing host resources to script code.
</summary>
</member>
<member name="F:Microsoft.ClearScript.HostItemFlags.None">
<summary>
Specifies that no options are selected.
</summary>
</member>
<member name="F:Microsoft.ClearScript.HostItemFlags.GlobalMembers">
<summary>
Specifies that the host resource's members are to be exposed as global items in the
script engine's root namespace.
</summary>
</member>
<member name="F:Microsoft.ClearScript.HostItemFlags.PrivateAccess">
<summary>
Specifies that the host resource's non-public members are to be exposed.
</summary>
</member>
<member name="F:Microsoft.ClearScript.HostItemFlags.HideDynamicMembers">
<summary>
Specifies that the host resource's dynamic members are not to be exposed. This option
applies only to objects that implement <see cref="T:System.Dynamic.IDynamicMetaObjectProvider"/>.
</summary>
</member>
<member name="F:Microsoft.ClearScript.HostItemFlags.DirectAccess">
<summary>
Specifies that the script engine is to be given direct access to the exposed object if
possible. This option, when supported, suppresses marshaling and hands off the object
for script access without the host's involvement. It is currently supported only for
COM and <see href="https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.comvisibleattribute">COM-visible</see>
objects exposed in Windows Script engines.
</summary>
</member>
<member name="T:Microsoft.ClearScript.HostSettings">
<summary>
Defines properties that comprise ClearScript's global configuration.
</summary>
</member>
<member name="P:Microsoft.ClearScript.HostSettings.UseAssemblyTable">
<summary>
Enables or disables assembly table usage.
</summary>
<remarks>
<para>
The assembly table is a legacy internal feature intended to accelerate assembly
loading. Because it relies on deprecated platform functionality, this feature is now
disabled by default. Although its replacement is simpler and more efficient, the
feature is still available to provide full compatibility with older ClearScript
releases.
</para>
<para>
The assembly table feature is only available on .NET Framework. This property has no
effect on other platforms.
</para>
</remarks>
</member>
<member name="P:Microsoft.ClearScript.HostSettings.AuxiliarySearchPath">
<summary>
Gets or sets a semicolon-delimited list of directory paths to search for auxiliary files.
</summary>
<remarks>
This property allows the host to augment ClearScript's algorithm for locating unmanaged
resources such as native assemblies and related data files.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.HostTypeCollection">
<summary>
Represents a scriptable collection of host types.
</summary>
<remarks>
Host type collections provide convenient scriptable access to all the types defined in one
or more host assemblies. They are hierarchical collections where leaf nodes represent types
and parent nodes represent namespaces. For example, if an assembly contains a type named
"Acme.Gadgets.Button", the corresponding collection will have a property named "Acme" whose
value is an object with a property named "Gadgets" whose value is an object with a property
named "Button" whose value represents the <c>Acme.Gadgets.Button</c> host type. Use
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see> to expose a host
type collection to script code.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.#ctor">
<summary>
Initializes a new host type collection.
</summary>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.#ctor(System.Reflection.Assembly[])">
<summary>
Initializes a new host type collection with types from one or more assemblies.
</summary>
<param name="assemblies">The assemblies that contain the types with which to initialize the collection.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.#ctor(System.String[])">
<summary>
Initializes a new host type collection with types from one or more assemblies. The
assemblies are specified by name.
</summary>
<param name="assemblyNames">The names of the assemblies that contain the types with which to initialize the collection.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.#ctor(System.Predicate{System.Type},System.Reflection.Assembly[])">
<summary>
Initializes a new host type collection with selected types from one or more assemblies.
</summary>
<param name="filter">A filter for selecting the types to add.</param>
<param name="assemblies">The assemblies that contain the types with which to initialize the collection.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.#ctor(System.Predicate{System.Type},System.String[])">
<summary>
Initializes a new host type collection with selected types from one or more assemblies.
The assemblies are specified by name.
</summary>
<param name="filter">A filter for selecting the types to add.</param>
<param name="assemblyNames">The names of the assemblies that contain the types with which to initialize the collection.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.AddAssembly(System.Reflection.Assembly)">
<summary>
Adds types from an assembly to a host type collection.
</summary>
<param name="assembly">The assembly that contains the types to add.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.AddAssembly(System.String)">
<summary>
Adds types from an assembly to a host type collection. The assembly is specified by name.
</summary>
<param name="assemblyName">The name of the assembly that contains the types to add.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.AddAssembly(System.Reflection.Assembly,System.Predicate{System.Type})">
<summary>
Adds selected types from an assembly to a host type collection.
</summary>
<param name="assembly">The assembly that contains the types to add.</param>
<param name="filter">A filter for selecting the types to add.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.AddAssembly(System.String,System.Predicate{System.Type})">
<summary>
Adds selected types from an assembly to a host type collection. The assembly is
specified by name.
</summary>
<param name="assemblyName">The name of the assembly that contains the types to add.</param>
<param name="filter">A filter for selecting the types to add.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.AddType(System.Type)">
<summary>
Adds a type to a host type collection.
</summary>
<param name="type">The type to add.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.AddType(System.String,System.Type[])">
<summary>
Adds a type to a host type collection. The type is specified by name.
</summary>
<param name="typeName">The fully qualified name of the type to add.</param>
<param name="typeArgs">Optional generic type arguments.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.AddType(System.String,System.String,System.Type[])">
<summary>
Adds a type to a host type collection. The type is specified by type name and assembly name.
</summary>
<param name="typeName">The fully qualified name of the type to add.</param>
<param name="assemblyName">The name of the assembly that contains the type to add.</param>
<param name="typeArgs">Optional generic type arguments.</param>
</member>
<member name="M:Microsoft.ClearScript.HostTypeCollection.GetNamespaceNode(System.String)">
<summary>
Locates a namespace within a host type collection.
</summary>
<param name="name">The full name of the namespace to locate.</param>
<returns>The node that represents the namespace if it was found, <c>null</c> otherwise.</returns>
</member>
<member name="T:Microsoft.ClearScript.ImmutableValueAttribute">
<summary>
Specifies that instances of the target struct are immutable.
</summary>
<remarks>
When this attribute is applied to a struct, ClearScript exposes the same object reference
for all instances of the struct that satisfy equality comparison, giving script code the
ability to use native equality operators to compare the exposed objects. This behavior is
also enabled automatically for all enums, numeric types, <see cref="T:System.DateTime"/>,
<see cref="T:System.DateTimeOffset"/>, and <see cref="T:System.TimeSpan"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ImmutableValueAttribute.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ImmutableValueAttribute"/> instance.
</summary>
</member>
<member name="T:Microsoft.ClearScript.IScriptableObject">
<summary>
Defines a method to be called when a host object is exposed to script code.
</summary>
</member>
<member name="M:Microsoft.ClearScript.IScriptableObject.OnExposedToScriptCode(Microsoft.ClearScript.ScriptEngine)">
<summary>
Notifies the host object that it has been exposed to script code.
</summary>
<param name="engine">The script engine in which the host object was exposed.</param>
<remarks>
This method may be called more than once for a given host object. The object may be
exposed in multiple script engines or many times in one script engine. Implementers
should avoid expensive operations within this method, or cache the results of such
operations for efficient retrieval during subsequent invocations.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.IScriptEngineException">
<summary>
Defines common script engine exception properties.
</summary>
</member>
<member name="P:Microsoft.ClearScript.IScriptEngineException.Message">
<summary>
Gets the error message.
</summary>
</member>
<member name="P:Microsoft.ClearScript.IScriptEngineException.HResult">
<summary>
Gets an <see href="http://en.wikipedia.org/wiki/HRESULT">HRESULT</see> error code if one is available, zero otherwise.
</summary>
</member>
<member name="P:Microsoft.ClearScript.IScriptEngineException.EngineName">
<summary>
Gets the name associated with the script engine instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.IScriptEngineException.ErrorDetails">
<summary>
Gets a detailed error message if one is available, <c>null</c> otherwise.
</summary>
</member>
<member name="P:Microsoft.ClearScript.IScriptEngineException.IsFatal">
<summary>
Gets a value that indicates whether the exception represents a fatal error.
</summary>
</member>
<member name="P:Microsoft.ClearScript.IScriptEngineException.ExecutionStarted">
<summary>
Gets a value that indicates whether script code execution had started before the current exception was thrown.
</summary>
</member>
<member name="P:Microsoft.ClearScript.IScriptEngineException.ScriptException">
<summary>
Gets the script exception that caused the current exception to be thrown, or <c>null</c> if one was not specified.
</summary>
</member>
<member name="P:Microsoft.ClearScript.IScriptEngineException.InnerException">
<summary>
Gets the host exception that caused the current exception to be thrown, or <c>null</c> if one was not specified.
</summary>
</member>
<member name="T:Microsoft.ClearScript.JavaScript.CommonJSLegacyModule">
<exclude/>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.CommonJSLegacyModule.#ctor(System.String,System.String,System.Object,Microsoft.ClearScript.ScriptObject,System.Func{Microsoft.ClearScript.ScriptObject,Microsoft.ClearScript.ScriptObject})">
<exclude/>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.CommonJSLegacyModule.id">
<exclude/>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.CommonJSLegacyModule.uri">
<exclude/>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.CommonJSLegacyModule.exports">
<exclude/>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.CommonJSLegacyModule.meta">
<exclude/>
</member>
<member name="T:Microsoft.ClearScript.JavaScript.IArrayBuffer">
<summary>
Represents a JavaScript
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer">ArrayBuffer</see>.
</summary>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.IArrayBuffer.Size">
<summary>
Gets the size of the <c>ArrayBuffer</c> in bytes.
</summary>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBuffer.GetBytes">
<summary>
Creates a byte array containing a copy of the <c>ArrayBuffer</c>'s contents.
</summary>
<returns>A new byte array containing a copy of the <c>ArrayBuffer</c>'s contents.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBuffer.ReadBytes(System.UInt64,System.UInt64,System.Byte[],System.UInt64)">
<summary>
Copies bytes from the <c>ArrayBuffer</c> into the specified byte array.
</summary>
<param name="offset">The offset within the <c>ArrayBuffer</c> of the first byte to copy.</param>
<param name="count">The maximum number of bytes to copy.</param>
<param name="destination">The byte array into which to copy the bytes.</param>
<param name="destinationIndex">The index within <paramref name="destination"/> at which to store the first copied byte.</param>
<returns>The number of bytes copied.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBuffer.WriteBytes(System.Byte[],System.UInt64,System.UInt64,System.UInt64)">
<summary>
Copies bytes from the specified byte array into the <c>ArrayBuffer</c>.
</summary>
<param name="source">The byte array from which to copy the bytes.</param>
<param name="sourceIndex">The index within <paramref name="source"/> of the first byte to copy.</param>
<param name="count">The maximum number of bytes to copy.</param>
<param name="offset">The offset within the <c>ArrayBuffer</c> at which to store the first copied byte.</param>
<returns>The number of bytes copied.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBuffer.InvokeWithDirectAccess(System.Action{System.IntPtr})">
<summary>
Invokes a delegate that returns no value, giving it direct access to the <c>ArrayBuffer</c>'s contents.
</summary>
<param name="action">The delegate to invoke.</param>
<remarks>
This method invokes the specified delegate, passing in the memory address of the
<c>ArrayBuffer</c>'s contents. This memory address is valid only while the delegate is
executing. The delegate must not access memory outside the <c>ArrayBuffer</c>'s range.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBuffer.InvokeWithDirectAccess``1(System.Func{System.IntPtr,``0})">
<summary>
Invokes a delegate that returns a value, giving it direct access to the <c>ArrayBuffer</c>'s contents.
</summary>
<typeparam name="T">The delegate's return type.</typeparam>
<param name="func">The delegate to invoke.</param>
<returns>The delegate's return value.</returns>
<remarks>
This method invokes the specified delegate, passing in the memory address of the
<c>ArrayBuffer</c>'s contents. This memory address is valid only while the delegate is
executing. The delegate must not access memory outside the <c>ArrayBuffer</c>'s range.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.JavaScript.IArrayBufferView">
<summary>
Defines properties and methods common to all
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer">ArrayBuffer</see>
views.
</summary>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.IArrayBufferView.ArrayBuffer">
<summary>
Gets view's underlying <c>ArrayBuffer</c>.
</summary>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.IArrayBufferView.Offset">
<summary>
Gets the view's offset within the underlying <c>ArrayBuffer</c>.
</summary>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.IArrayBufferView.Size">
<summary>
Gets the view's size in bytes.
</summary>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBufferView.GetBytes">
<summary>
Creates a byte array containing a copy of the view's contents.
</summary>
<returns>A new byte array containing a copy of the view's contents.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBufferView.ReadBytes(System.UInt64,System.UInt64,System.Byte[],System.UInt64)">
<summary>
Copies bytes from the view into the specified byte array.
</summary>
<param name="offset">The offset within the view of the first byte to copy.</param>
<param name="count">The maximum number of bytes to copy.</param>
<param name="destination">The byte array into which to copy the bytes.</param>
<param name="destinationIndex">The index within <paramref name="destination"/> at which to store the first copied byte.</param>
<returns>The number of bytes copied.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBufferView.WriteBytes(System.Byte[],System.UInt64,System.UInt64,System.UInt64)">
<summary>
Copies bytes from the specified byte array into the view.
</summary>
<param name="source">The byte array from which to copy the bytes.</param>
<param name="sourceIndex">The index within <paramref name="source"/> of the first byte to copy.</param>
<param name="count">The maximum number of bytes to copy.</param>
<param name="offset">The offset within the view at which to store the first copied byte.</param>
<returns>The number of bytes copied.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBufferView.InvokeWithDirectAccess(System.Action{System.IntPtr})">
<summary>
Invokes a delegate that returns no value, giving it direct access to the view's contents.
</summary>
<param name="action">The delegate to invoke.</param>
<remarks>
This method invokes the specified delegate, passing in the memory address of the view's
contents. This memory address is valid only while the delegate is executing. The
delegate must not access memory outside the view's range.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.IArrayBufferView.InvokeWithDirectAccess``1(System.Func{System.IntPtr,``0})">
<summary>
Invokes a delegate that returns a value, giving it direct access to the view's contents.
</summary>
<typeparam name="T">The delegate's return type.</typeparam>
<param name="func">The delegate to invoke.</param>
<returns>The delegate's return value.</returns>
<remarks>
This method invokes the specified delegate, passing in the memory address of the view's
contents. This memory address is valid only while the delegate is executing. The
delegate must not access memory outside the view's range.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.JavaScript.IDataView">
<summary>
Represents a JavaScript
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView">DataView</see>.
</summary>
</member>
<member name="T:Microsoft.ClearScript.JavaScript.ITypedArray">
<summary>
Defines properties and methods common to all JavaScript
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays">typed arrays</see>.
</summary>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.ITypedArray.Length">
<summary>
Gets the typed array's length.
</summary>
</member>
<member name="T:Microsoft.ClearScript.JavaScript.ITypedArray`1">
<summary>
Represents a JavaScript <see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays">typed array</see>.
</summary>
<typeparam name="T">The typed array's element type.</typeparam>
<remarks>
<para>
The following table lists the specific interfaces implemented by JavaScript typed arrays:
</para>
<para>
<list type="table">
<listheader>
<term>Typed&#xA0;Array</term>
<term>Interface(s)&#xA0;(C#)</term>
</listheader>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array">Uint8Array</see></term>
<term><c>ITypedArray&#x3C;byte&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray">Uint8ClampedArray</see></term>
<term><c>ITypedArray&#x3C;byte&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array">Int8Array</see></term>
<term><c>ITypedArray&#x3C;sbyte&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array">Uint16Array</see></term>
<term><c>ITypedArray&#x3C;ushort&#x3E;</c> and <c>ITypedArray&#x3C;char&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array">Int16Array</see></term>
<term><c>ITypedArray&#x3C;short&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array">Uint32Array</see></term>
<term><c>ITypedArray&#x3C;uint&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array">Int32Array</see></term>
<term><c>ITypedArray&#x3C;int&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array">BigUint64Array</see></term>
<term><c>ITypedArray&#x3C;ulong&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array">BigInt64Array</see></term>
<term><c>ITypedArray&#x3C;long&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array">Float32Array</see></term>
<term><c>ITypedArray&#x3C;float&#x3E;</c></term>
</item>
<item>
<term><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array">Float64Array</see></term>
<term><c>ITypedArray&#x3C;double&#x3E;</c></term>
</item>
</list>
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.ITypedArray`1.ToArray">
<summary>
Creates an array containing a copy of the typed array's contents.
</summary>
<returns>A new array containing a copy of the typed array's contents.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.ITypedArray`1.Read(System.UInt64,System.UInt64,`0[],System.UInt64)">
<summary>
Copies elements from the typed array into the specified array.
</summary>
<param name="index">The index within the typed array of the first element to copy.</param>
<param name="length">The maximum number of elements to copy.</param>
<param name="destination">The array into which to copy the elements.</param>
<param name="destinationIndex">The index within <paramref name="destination"/> at which to store the first copied element.</param>
<returns>The number of elements copied.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.ITypedArray`1.Write(`0[],System.UInt64,System.UInt64,System.UInt64)">
<summary>
Copies elements from the specified array into the typed array.
</summary>
<param name="source">The array from which to copy the elements.</param>
<param name="sourceIndex">The index within <paramref name="source"/> of the first element to copy.</param>
<param name="length">The maximum number of elements to copy.</param>
<param name="index">The index within the typed array at which to store the first copied element.</param>
<returns>The number of elements copied.</returns>
</member>
<member name="T:Microsoft.ClearScript.JavaScript.JavaScriptExtensions">
<summary>
Defines extension methods for use with JavaScript engines.
</summary>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.JavaScriptExtensions.ToPromise``1(System.Threading.Tasks.Task{``0})">
<summary>
Converts a <see cref="T:System.Threading.Tasks.Task`1"/> instance to a
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">promise</see>
for use with script code currently running on the calling thread.
</summary>
<typeparam name="T">The task's result type.</typeparam>
<param name="task">The task to convert to a promise.</param>
<returns>A promise that represents the task's asynchronous operation.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.JavaScriptExtensions.ToPromise``1(System.Threading.Tasks.Task{``0},Microsoft.ClearScript.ScriptEngine)">
<summary>
Converts a <see cref="T:System.Threading.Tasks.Task`1"/> instance to a
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">promise</see>
for use with script code running in the specified script engine.
</summary>
<typeparam name="T">The task's result type.</typeparam>
<param name="task">The task to convert to a promise.</param>
<param name="engine">The script engine in which the promise will be used.</param>
<returns>A promise that represents the task's asynchronous operation.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.JavaScriptExtensions.ToPromise(System.Threading.Tasks.Task)">
<summary>
Converts a <see cref="T:System.Threading.Tasks.Task"/> instance to a
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">promise</see>
for use with script code currently running on the calling thread.
</summary>
<param name="task">The task to convert to a promise.</param>
<returns>A promise that represents the task's asynchronous operation.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.JavaScriptExtensions.ToPromise(System.Threading.Tasks.Task,Microsoft.ClearScript.ScriptEngine)">
<summary>
Converts a <see cref="T:System.Threading.Tasks.Task"/> instance to a
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">promise</see>
for use with script code running in the specified script engine.
</summary>
<param name="task">The task to convert to a promise.</param>
<param name="engine">The script engine in which the promise will be used.</param>
<returns>A promise that represents the task's asynchronous operation.</returns>
</member>
<member name="M:Microsoft.ClearScript.JavaScript.JavaScriptExtensions.ToTask(System.Object)">
<summary>
Converts a
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">promise</see>
to a <see cref="T:System.Threading.Tasks.Task`1"/> instance.
</summary>
<param name="promise">The promise to convert to a task.</param>
<returns>A task that represents the promise's asynchronous operation.</returns>
</member>
<member name="T:Microsoft.ClearScript.JavaScript.ModuleCategory">
<summary>
Defines document categories for JavaScript modules.
</summary>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.ModuleCategory.Standard">
<summary>
Gets the document category for standard <see href="https://www.ecma-international.org/ecma-262/6.0/#sec-modules">ECMAScript 6</see> modules.
</summary>
</member>
<member name="P:Microsoft.ClearScript.JavaScript.ModuleCategory.CommonJS">
<summary>
Gets the document category for <see href="http://wiki.commonjs.org/wiki/Modules">CommonJS</see> modules.
</summary>
</member>
<member name="T:Microsoft.ClearScript.NoDefaultScriptAccessAttribute">
<summary>
Specifies that script code is to have no access to type members by default.
</summary>
<remarks>
This attribute is applicable to classes, enums, interfaces, structs, and assemblies. Use
<see cref="T:Microsoft.ClearScript.ScriptUsageAttribute"/>, <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/>, or
<see cref="T:Microsoft.ClearScript.NoScriptAccessAttribute"/> to override it for individual type members. Note that
it has no effect on the method binding algorithm. If a script-based call is bound to a
method that is blocked by this attribute, it will be rejected even if an overload exists
that could receive the call.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.NoDefaultScriptAccessAttribute.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.NoDefaultScriptAccessAttribute"/> instance.
</summary>
</member>
<member name="T:Microsoft.ClearScript.NoScriptAccessAttribute">
<summary>
Specifies that script code is to have no access to the target type member.
</summary>
<remarks>
This attribute is applicable to events, fields, methods, properties, and nested types. Note
that it has no effect on the method binding algorithm. If a script-based call is bound to a
method that is blocked by this attribute, it will be rejected even if an overload exists
that could receive the call.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.NoScriptAccessAttribute.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.NoScriptAccessAttribute"/> instance.
</summary>
</member>
<member name="T:Microsoft.ClearScript.IPropertyBag">
<summary>
Represents a scriptable collection of named properties.
</summary>
<remarks>
If an object that implements this interface is added to a script engine (see
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see>), script code
will be able to access the properties stored in the collection as if they were members of
the object itself, using the script language's native syntax for member access. No
other members of the object will be accessible. This interface also allows objects to
implement dynamic properties for script languages that support them.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.PropertyBag">
<summary>
Provides a default <see cref="T:Microsoft.ClearScript.IPropertyBag"/> implementation.
</summary>
</member>
<member name="M:Microsoft.ClearScript.PropertyBag.#ctor">
<summary>
Initializes a new writable <see cref="T:Microsoft.ClearScript.PropertyBag"/>.
</summary>
</member>
<member name="M:Microsoft.ClearScript.PropertyBag.#ctor(System.Boolean)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.PropertyBag"/>.
</summary>
<param name="isReadOnly"><c>True</c> to make the <see cref="T:Microsoft.ClearScript.PropertyBag"/> read-only, <c>false</c> to make it writable.</param>
<remarks>
The host can modify a read-only <see cref="T:Microsoft.ClearScript.PropertyBag"/> by calling
<see cref="M:Microsoft.ClearScript.PropertyBag.SetPropertyNoCheck(System.String,System.Object)">SetPropertyNoCheck</see>,
<see cref="M:Microsoft.ClearScript.PropertyBag.RemovePropertyNoCheck(System.String)">RemovePropertyNoCheck</see>, or
<see cref="M:Microsoft.ClearScript.PropertyBag.ClearNoCheck">ClearNoCheck</see>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.PropertyBag.SetPropertyNoCheck(System.String,System.Object)">
<summary>
Sets a property value without checking whether the <see cref="T:Microsoft.ClearScript.PropertyBag"/> is read-only.
</summary>
<param name="name">The name of the property to set.</param>
<param name="value">The property value.</param>
<remarks>
This operation is never exposed to script code.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.PropertyBag.RemovePropertyNoCheck(System.String)">
<summary>
Removes a property without checking whether the <see cref="T:Microsoft.ClearScript.PropertyBag"/> is read-only.
</summary>
<param name="name">The name of the property to remove.</param>
<returns><c>True</c> if the property was found and removed, <c>false</c> otherwise.</returns>
<remarks>
This operation is never exposed to script code.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.PropertyBag.ClearNoCheck">
<summary>
Removes all properties without checking whether the <see cref="T:Microsoft.ClearScript.PropertyBag"/> is read-only.
</summary>
<remarks>
This operation is never exposed to script code.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.PropertyBag.ContainsKey(System.String)">
<summary>
Determines whether the <see cref="T:Microsoft.ClearScript.PropertyBag"/> contains a property with the specified name.
</summary>
<param name="key">The name of the property to locate.</param>
<returns><c>True</c> if the <see cref="T:Microsoft.ClearScript.PropertyBag"/> contains a property with the specified name, <c>false</c> otherwise.</returns>
</member>
<member name="M:Microsoft.ClearScript.PropertyBag.Add(System.String,System.Object)">
<summary>
Adds a property to the <see cref="T:Microsoft.ClearScript.PropertyBag"/>.
</summary>
<param name="key">The name of the property to add.</param>
<param name="value">The property value.</param>
</member>
<member name="M:Microsoft.ClearScript.PropertyBag.Remove(System.String)">
<summary>
Removes a property from the <see cref="T:Microsoft.ClearScript.PropertyBag"/>.
</summary>
<param name="key">The name of the property to remove.</param>
<returns><c>True</c> if the property was successfully found and removed, <c>false</c> otherwise.</returns>
</member>
<member name="M:Microsoft.ClearScript.PropertyBag.TryGetValue(System.String,System.Object@)">
<summary>
Looks up a property value in the <see cref="T:Microsoft.ClearScript.PropertyBag"/>.
</summary>
<param name="key">The name of the property to locate.</param>
<param name="value">The property value if the property was found, <c>null</c> otherwise.</param>
<returns><c>True</c> if the property was found, <c>false</c> otherwise.</returns>
</member>
<member name="P:Microsoft.ClearScript.PropertyBag.Item(System.String)">
<summary>
Gets or sets a property value in the <see cref="T:Microsoft.ClearScript.PropertyBag"/>.
</summary>
<param name="key">The name of the property to get or set.</param>
<returns>The property value.</returns>
</member>
<member name="P:Microsoft.ClearScript.PropertyBag.Keys">
<summary>
Gets a collection of property names from the <see cref="T:Microsoft.ClearScript.PropertyBag"/>.
</summary>
</member>
<member name="P:Microsoft.ClearScript.PropertyBag.Values">
<summary>
Gets a collection of property values from the <see cref="T:Microsoft.ClearScript.PropertyBag"/>.
</summary>
</member>
<member name="E:Microsoft.ClearScript.PropertyBag.PropertyChanged">
<summary>
Occurs when a property is added or replaced, or when the collection is cleared.
</summary>
</member>
<member name="T:Microsoft.ClearScript.ScriptAccess">
<summary>
Defines script access settings for type members.
</summary>
</member>
<member name="F:Microsoft.ClearScript.ScriptAccess.Full">
<summary>
Specifies that script code is to have full access to the type member. This is the
default setting.
</summary>
</member>
<member name="F:Microsoft.ClearScript.ScriptAccess.ReadOnly">
<summary>
Specifies that script code is to have read-only access to the type member. This setting
only affects fields and writable properties.
</summary>
</member>
<member name="F:Microsoft.ClearScript.ScriptAccess.None">
<summary>
Specifies that script code is to have no access to the type member. Note that this
setting has no effect on the method binding algorithm. If a script-based call is bound
to a method that is blocked by this setting, it will be rejected even if an overload
exists that could receive the call.
</summary>
</member>
<member name="T:Microsoft.ClearScript.ScriptEngine">
<summary>
Provides the base implementation for all script engines.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.#ctor(System.String)">
<summary>
Initializes a new script engine instance.
</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>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.#ctor(System.String,System.String)">
<summary>
Initializes a new script engine instance with the specified list of supported file name extensions.
</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="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.Name">
<summary>
Gets the name associated with the script engine instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.Current">
<summary>
Gets the script engine that is invoking a host member on the current thread.
</summary>
<remarks>
If multiple script engines are invoking host members on the current thread, this
property gets the one responsible for the most deeply nested invocation. If no script
engines are invoking host members on the current thread, this property returns
<c>null</c>.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.FileNameExtension">
<summary>
Gets the script engine's recommended file name extension for script files.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.AccessContext">
<summary>
Allows script code to access non-public host resources.
</summary>
<remarks>
By setting this property to a type you declare that script code running in the current
script engine is to be treated as if it were part of that type's implementation. Doing
so does not expose any host resources to script code, but it affects which host
resources are importable and which members of exposed resources are accessible.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.DefaultAccess">
<summary>
Gets or sets the default script access setting for all members of exposed objects.
</summary>
<remarks>
Use <see cref="T:Microsoft.ClearScript.DefaultScriptUsageAttribute"/>, <see cref="T:Microsoft.ClearScript.ScriptUsageAttribute"/>, or
their subclasses to override this property for individual types and members. Note that
this property has no effect on the method binding algorithm. If a script-based call is
bound to a method that is blocked by this property, it will be rejected even if an
overload exists that could receive the call.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.EnforceAnonymousTypeAccess">
<summary>
Enables or disables access restrictions for anonymous types.
</summary>
<remarks>
Anonymous types are
<see href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/internal">internal</see>
and therefore accessible only within the same assembly, but ClearScript 5.5.3 and
earlier permitted access to the public properties of an object even if its type was
internal. Newer versions strictly enforce <see cref="P:Microsoft.ClearScript.ScriptEngine.AccessContext"/>, but because
anonymous types are particularly useful for scripting, ClearScript by default continues
to expose their properties to external contexts. To override this behavior and enable
normal access restrictions for anonymous types, set this property to <c>true</c>.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.ExposeHostObjectStaticMembers">
<summary>
Controls whether host objects provide access to the static members of their exposed types to script code.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.DisableExtensionMethods">
<summary>
Enables or disables extension method support.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.FormatCode">
<summary>
Enables or disables script code formatting.
</summary>
<remarks>
When this property is set to <c>true</c>, the script engine may format script code
before executing or compiling it. This is intended to facilitate interactive debugging.
The formatting operation currently includes stripping leading and trailing blank lines
and removing global indentation.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.AllowReflection">
<summary>
Controls whether script code is permitted to use reflection.
</summary>
<remarks>
When this property is set to <c>true</c>, script code running in the current script
engine is permitted to use reflection. This affects
<see cref="M:System.Object.GetType">Object.GetType()</see>,
<see cref="M:System.Exception.GetType">Exception.GetType()</see>,
<see cref="P:System.Delegate.Method">Delegate.Method</see>,
<see cref="M:Microsoft.ClearScript.HostFunctions.typeOf(System.Object)"/> and <see cref="M:Microsoft.ClearScript.HostFunctions.typeOf``1"/>.
By default, any attempt to invoke these members from script code results in an
exception.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.DisableTypeRestriction">
<summary>
Enables or disables type restriction for field, property, and method return values.
</summary>
<remarks>
When this property is set to <c>true</c>, script code running in the current script
engine has access to the runtime types of all exposed host resources, which by default
are restricted to their declared types. The default behavior is a general requirement
for correct method binding, so setting this property to <c>true</c> is not recommended.
</remarks>
<seealso cref="F:Microsoft.ClearScript.ScriptMemberFlags.ExposeRuntimeType"/>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.DisableListIndexTypeRestriction">
<summary>
Enables or disables type restriction for array and list elements retrieved by index.
</summary>
<remarks>
In ClearScript 5.4.4 and earlier, indexed array and list elements were exempt from type
restriction. ClearScript 5.4.5 introduced a breaking change to correct this, but you can
set this property to <c>true</c> to restore the exemption if you have older script code
that depends on it.
</remarks>
<seealso cref="P:Microsoft.ClearScript.ScriptEngine.DisableTypeRestriction"/>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.EnableNullResultWrapping">
<summary>
Enables or disables <c>null</c> wrapping for field, property, and method return values.
</summary>
<remarks>
When this property is set to <c>true</c>, all field, property, and method return values
are marshaled with full .NET type information even if they are <c>null</c>. Note that
such values will always fail equality comparison with JavaScript's
<c><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null">null</see></c>,
VBScript's
<c><see href="https://docs.microsoft.com/en-us/previous-versions//f8tbc79x(v=vs.85)">Nothing</see></c>,
and other similar values. Instead, use <see cref="M:Microsoft.ClearScript.HostFunctions.isNull(System.Object)"/> or
<see cref="M:System.Object.Equals(System.Object,System.Object)"/> to perform such a comparison.
</remarks>
<seealso cref="F:Microsoft.ClearScript.ScriptMemberFlags.WrapNullResult"/>
<seealso cref="M:Microsoft.ClearScript.HostFunctions.isNull(System.Object)"/>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.DisableFloatNarrowing">
<summary>
Enables or disables floating point narrowing.
</summary>
<remarks>
When this property is set to <c>true</c>, no attempt is made to convert floating-point
values imported from the script engine to the narrowest equivalent .NET representation.
The default behavior is more likely to result in successful method binding in specific
scenarios, so setting this property to <c>true</c> is not recommended.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.UseReflectionBindFallback">
<summary>
Enables or disables the use of reflection-based method binding as a fallback.
</summary>
<remarks>
When this property is set to <c>true</c>, the script engine attempts to use
reflection-based method binding when the default method binding algorithm fails. This
approach reduces type safety, but it may be useful for running legacy scripts that rely
on the specific behavior of reflection-based method binding.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.EnableAutoHostVariables">
<summary>
Enables or disables automatic host variable tunneling for by-reference arguments to script functions and delegates.
</summary>
<remarks>
When this property is set to <c>true</c>, the script engine replaces by-reference
arguments to script functions and delegates with host variables, allowing script code
to simulate output arguments if the script language does not support them natively.
</remarks>
<seealso cref="M:Microsoft.ClearScript.HostFunctions.newVar``1(``0)"/>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.UndefinedImportValue">
<summary>
Gets or sets the engine's undefined import value.
</summary>
<remarks>
Some script languages support one or more special non-<c>null</c> values that represent
nonexistent, missing, unknown, or undefined data. When such a value is marshaled to the
host, the script engine maps it to the value of this property. The default value is
<see cref="F:Microsoft.ClearScript.Undefined.Value"/>.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.ContinuationCallback">
<summary>
Gets or sets a callback that can be used to halt script execution.
</summary>
<remarks>
During script execution the script engine periodically invokes this callback to
determine whether it should continue. If the callback returns <c>false</c>, the script
engine terminates script execution and throws an exception.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.Script">
<summary>
Allows the host to access script resources dynamically.
</summary>
<remarks>
The value of this property is an object that is bound to the script engine's root
namespace. It dynamically supports properties and methods that correspond to global
script objects and functions.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.Global">
<summary>
Allows the host to access script resources.
</summary>
<remarks>
The value of this property is an object that is bound to the script engine's root
namespace. It allows you to access global script resources via the
<see cref="T:Microsoft.ClearScript.ScriptObject"/> class interface. Doing so is likely to perform better than
dynamic access via <see cref="P:Microsoft.ClearScript.ScriptEngine.Script"/>.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngine.DocumentSettings">
<summary>
Gets or sets the script engine's document settings.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">
<summary>
Exposes a host object to script code.
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="target">The object to expose.</param>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">
<summary>
Exposes a host object to script code with the specified options.
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="target">The object to expose.</param>
<remarks>
<para>
Once a host object is exposed to script code, its members are accessible via the script
language's native syntax for member access. The following table provides details about
the mapping between host members and script-accessible properties and methods.
</para>
<para>
<list type="table">
<listheader>
<term>Member&#xA0;Type</term>
<term>Exposed&#xA0;As</term>
<description>Remarks</description>
</listheader>
<item>
<term><b>Constructor</b></term>
<term>N/A</term>
<description>
To invoke a constructor from script code, call
<see cref="M:Microsoft.ClearScript.HostFunctions.newObj``1(System.Object[])">HostFunctions.newObj(T)</see>.
</description>
</item>
<item>
<term><b>Property/Field</b></term>
<term><b>Property</b></term>
<description>N/A</description>
</item>
<item>
<term><b>Method</b></term>
<term><b>Method</b></term>
<description>
Overloaded host methods are merged into a single script-callable method. At
runtime the correct host method is selected based on the argument types.
</description>
</item>
<item>
<term><b>Generic&#xA0;Method</b></term>
<term><b>Method</b></term>
<description>
The ClearScript library supports dynamic C#-like type inference when invoking
generic methods. However, some methods require explicit type arguments. To call
such a method from script code, you must place the required number of
<see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostType(System.String,Microsoft.ClearScript.HostItemFlags,System.Type)">host type objects</see>
at the beginning of the argument list. Doing so for methods that do not require
explicit type arguments is optional.
</description>
</item>
<item>
<term><b>Extension&#xA0;Method</b></term>
<term><b>Method</b></term>
<description>
Extension methods are available if the type that implements them has been
exposed in the current script engine.
</description>
</item>
<item>
<term><b>Indexer</b></term>
<term><b>Property</b></term>
<description>
Indexers appear as properties named "Item" that accept one or more index values
as arguments. In addition, objects that implement <see cref="T:System.Collections.IList"/> expose
properties with numeric names that match their valid indices. This includes
one-dimensional host arrays and other collections. Multidimensional host arrays
do not expose functional indexers; you must use
<see href="https://docs.microsoft.com/en-us/dotnet/api/system.array.getvalue">Array.GetValue</see>
and
<see href="https://docs.microsoft.com/en-us/dotnet/api/system.array.setvalue">Array.SetValue</see>
instead.
</description>
</item>
<item>
<term><b>Event</b></term>
<term><b>Property</b></term>
<description>
Events are exposed as read-only properties of type <see cref="T:Microsoft.ClearScript.EventSource`1"/>.
</description>
</item>
</list>
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddRestrictedHostObject``1(System.String,``0)">
<summary>
Exposes a host object to script code with the specified type restriction.
</summary>
<typeparam name="T">The type whose members are to be made accessible from script code.</typeparam>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="target">The object to expose.</param>
<remarks>
<para>
This method can be used to restrict script access to the members of a particular
interface or base class.
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddRestrictedHostObject``1(System.String,Microsoft.ClearScript.HostItemFlags,``0)">
<summary>
Exposes a host object to script code with the specified type restriction and options.
</summary>
<typeparam name="T">The type whose members are to be made accessible from script code.</typeparam>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="target">The object to expose.</param>
<remarks>
<para>
This method can be used to restrict script access to the members of a particular
interface or base class.
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMObject(System.String,System.String)">
<summary>
Creates a COM/ActiveX object and exposes it to script code. The registered class is
specified by programmatic identifier (ProgID).
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="progID">The programmatic identifier (ProgID) of the registered class to instantiate.</param>
<remarks>
<para>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMObject(System.String,System.String,System.String)">
<summary>
Creates a COM/ActiveX object on the specified server and exposes it to script code. The
registered class is specified by programmatic identifier (ProgID).
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="progID">The programmatic identifier (ProgID) of the registered class to instantiate.</param>
<param name="serverName">The name of the server on which to create the object.</param>
<remarks>
<para>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMObject(System.String,Microsoft.ClearScript.HostItemFlags,System.String)">
<summary>
Creates a COM/ActiveX object and exposes it to script code with the specified options.
The registered class is specified by programmatic identifier (ProgID).
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="progID">The programmatic identifier (ProgID) of the registered class to instantiate.</param>
<remarks>
<para>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMObject(System.String,Microsoft.ClearScript.HostItemFlags,System.String,System.String)">
<summary>
Creates a COM/ActiveX object on the specified server and exposes it to script code with
the specified options. The registered class is specified by programmatic identifier (ProgID).
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="progID">The programmatic identifier (ProgID) of the registered class to instantiate.</param>
<param name="serverName">The name of the server on which to create the object.</param>
<remarks>
<para>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMObject(System.String,System.Guid)">
<summary>
Creates a COM/ActiveX object and exposes it to script code. The registered class is
specified by class identifier (CLSID).
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="clsid">The class identifier (CLSID) of the registered class to instantiate.</param>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMObject(System.String,System.Guid,System.String)">
<summary>
Creates a COM/ActiveX object on the specified server and exposes it to script code. The
registered class is specified by class identifier (CLSID).
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="clsid">The class identifier (CLSID) of the registered class to instantiate.</param>
<param name="serverName">The name of the server on which to create the object.</param>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Guid)">
<summary>
Creates a COM/ActiveX object and exposes it to script code with the specified options.
The registered class is specified by class identifier (CLSID).
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="clsid">The class identifier (CLSID) of the registered class to instantiate.</param>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Guid,System.String)">
<summary>
Creates a COM/ActiveX object on the specified server and exposes it to script code with
the specified options. The registered class is specified by class identifier (CLSID).
</summary>
<param name="itemName">A name for the new global script item that will represent the object.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="clsid">The class identifier (CLSID) of the registered class to instantiate.</param>
<param name="serverName">The name of the server on which to create the object.</param>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostType(System.Type)">
<summary>
Exposes a host type to script code with a default name.
</summary>
<param name="type">The type to expose.</param>
<remarks>
<para>
This method uses <paramref name="type"/>'s name for the new global script item that
will represent it.
</para>
<para>
Host types are exposed to script code in the form of objects whose properties and
methods are bound to the type's static members and nested types. If the type has
generic parameters, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostType(Microsoft.ClearScript.HostItemFlags,System.Type)">
<summary>
Exposes a host type to script code with a default name and the specified options.
</summary>
<param name="flags">A value that selects options for the operation.</param>
<param name="type">The type to expose.</param>
<remarks>
<para>
This method uses <paramref name="type"/>'s name for the new global script item that
will represent it.
</para>
<para>
Host types are exposed to script code in the form of objects whose properties and
methods are bound to the type's static members and nested types. If the type has
generic parameters, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostType(System.String,System.Type)">
<summary>
Exposes a host type to script code.
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="type">The type to expose.</param>
<remarks>
<para>
Host types are exposed to script code in the form of objects whose properties and
methods are bound to the type's static members and nested types. If the type has
generic parameters, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostType(System.String,Microsoft.ClearScript.HostItemFlags,System.Type)">
<summary>
Exposes a host type to script code with the specified options.
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="type">The type to expose.</param>
<remarks>
<para>
Host types are exposed to script code in the form of objects whose properties and
methods are bound to the type's static members and nested types. If the type has
generic parameters, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostType(System.String,System.String,System.Type[])">
<summary>
Exposes a host type to script code. The type is specified by name.
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="typeName">The fully qualified name of the type to expose.</param>
<param name="typeArgs">Optional generic type arguments.</param>
<remarks>
<para>
Host types are exposed to script code in the form of objects whose properties and
methods are bound to the type's static members and nested types. If the type has
generic parameters, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostType(System.String,Microsoft.ClearScript.HostItemFlags,System.String,System.Type[])">
<summary>
Exposes a host type to script code with the specified options. The type is specified by name.
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="typeName">The fully qualified name of the type to expose.</param>
<param name="typeArgs">Optional generic type arguments.</param>
<remarks>
<para>
Host types are exposed to script code in the form of objects whose properties and
methods are bound to the type's static members and nested types. If the type has
generic parameters, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostType(System.String,System.String,System.String,System.Type[])">
<summary>
Exposes a host type to script code. The type is specified by type name and assembly name.
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="typeName">The fully qualified name of the type to expose.</param>
<param name="assemblyName">The name of the assembly that contains the type to expose.</param>
<param name="typeArgs">Optional generic type arguments.</param>
<remarks>
<para>
Host types are exposed to script code in the form of objects whose properties and
methods are bound to the type's static members and nested types. If the type has
generic parameters, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostType(System.String,Microsoft.ClearScript.HostItemFlags,System.String,System.String,System.Type[])">
<summary>
Exposes a host type to script code with the specified options. The type is specified by
type name and assembly name.
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="typeName">The fully qualified name of the type to expose.</param>
<param name="assemblyName">The name of the assembly that contains the type to expose.</param>
<param name="typeArgs">Optional generic type arguments.</param>
<remarks>
<para>
Host types are exposed to script code in the form of objects whose properties and
methods are bound to the type's static members and nested types. If the type has
generic parameters, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddHostTypes(System.Type[])">
<summary>
Exposes host types to script code.
</summary>
<param name="types">The types to expose.</param>
<remarks>
<para>
This method uses each specified type's name for the new global script item that will
represent it.
</para>
<para>
Host types are exposed to script code in the form of objects whose properties and
methods are bound to the type's static members and nested types. If the type has
generic parameters, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMType(System.String,System.String)">
<summary>
Imports a COM/ActiveX type and exposes it to script code. The registered class is
specified by programmatic identifier (ProgID).
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="progID">The programmatic identifier (ProgID) of the registered class to import.</param>
<remarks>
<para>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMType(System.String,System.String,System.String)">
<summary>
Imports a COM/ActiveX type from the specified server and exposes it to script code. The
registered class is specified by programmatic identifier (ProgID).
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="progID">The programmatic identifier (ProgID) of the registered class to import.</param>
<param name="serverName">The name of the server from which to import the type.</param>
<remarks>
<para>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMType(System.String,Microsoft.ClearScript.HostItemFlags,System.String)">
<summary>
Imports a COM/ActiveX type and exposes it to script code with the specified options.
The registered class is specified by programmatic identifier (ProgID).
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="progID">The programmatic identifier (ProgID) of the registered class to import.</param>
<remarks>
<para>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMType(System.String,Microsoft.ClearScript.HostItemFlags,System.String,System.String)">
<summary>
Imports a COM/ActiveX type from the specified server and exposes it to script code with
the specified options. The registered class is specified by programmatic identifier (ProgID).
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="progID">The programmatic identifier (ProgID) of the registered class to import.</param>
<param name="serverName">The name of the server from which to import the type.</param>
<remarks>
<para>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMType(System.String,System.Guid)">
<summary>
Imports a COM/ActiveX type and exposes it to script code. The registered class is
specified by class identifier (CLSID).
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="clsid">The class identifier (CLSID) of the registered class to import.</param>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMType(System.String,System.Guid,System.String)">
<summary>
Imports a COM/ActiveX type from the specified server and exposes it to script code. The
registered class is specified by class identifier (CLSID).
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="clsid">The class identifier (CLSID) of the registered class to import.</param>
<param name="serverName">The name of the server from which to import the type.</param>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMType(System.String,Microsoft.ClearScript.HostItemFlags,System.Guid)">
<summary>
Imports a COM/ActiveX type and exposes it to script code with the specified options.
The registered class is specified by class identifier (CLSID).
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="clsid">The class identifier (CLSID) of the registered class to import.</param>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.AddCOMType(System.String,Microsoft.ClearScript.HostItemFlags,System.Guid,System.String)">
<summary>
Imports a COM/ActiveX type from the specified server and exposes it to script code with
the specified options. The registered class is specified by class identifier (CLSID).
</summary>
<param name="itemName">A name for the new global script item that will represent the type.</param>
<param name="flags">A value that selects options for the operation.</param>
<param name="clsid">The class identifier (CLSID) of the registered class to import.</param>
<param name="serverName">The name of the server from which to import the type.</param>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see <see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)"/>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Execute(System.String)">
<summary>
Executes script code.
</summary>
<param name="code">The script code to execute.</param>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets the specified script code as a statement.
</para>
<para>
If a debugger is attached, it will present the specified script code to the user as a
document with an automatically selected name. This document will not be discarded
after execution.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Execute(System.String,System.String)">
<summary>
Executes script code with an associated document name.
</summary>
<param name="documentName">A document name for the script code. 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 execute.</param>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets the specified script code as a statement.
</para>
<para>
If a debugger is attached, it will present the specified script code to the user as a
document with the specified name. This document will not be discarded after execution.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Execute(System.String,System.Boolean,System.String)">
<summary>
Executes script code with an associated document name, optionally discarding the document after execution.
</summary>
<param name="documentName">A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
<param name="discard"><c>True</c> to discard the script document after execution, <c>false</c> otherwise.</param>
<param name="code">The script code to execute.</param>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets the specified script code as a statement.
</para>
<para>
If a debugger is attached, it will present the specified script code to the user as a
document with the specified name. Discarding this document removes it from view but
has no effect on the script engine. Only Windows Script engines honor
<paramref name="discard"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Execute(Microsoft.ClearScript.DocumentInfo,System.String)">
<summary>
Executes script code with the specified document meta-information.
</summary>
<param name="documentInfo">A structure containing meta-information for the script document.</param>
<param name="code">The script code to execute.</param>
<remarks>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets the specified script code as a statement.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.ExecuteDocument(System.String)">
<summary>
Loads and executes a script document.
</summary>
<param name="specifier">A string specifying the document to be loaded and executed.</param>
<remarks>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets script code loaded from the specified document as a statement.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.ExecuteDocument(System.String,Microsoft.ClearScript.DocumentCategory)">
<summary>
Loads and executes a document with the specified category.
</summary>
<param name="specifier">A string specifying the document to be loaded and executed.</param>
<param name="category">An optional category for the requested document.</param>
<remarks>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets script code loaded from the specified document as a statement.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.ExecuteDocument(System.String,Microsoft.ClearScript.DocumentCategory,Microsoft.ClearScript.DocumentContextCallback)">
<summary>
Loads and executes a document with the specified category and context callback.
</summary>
<param name="specifier">A string specifying the document to be loaded and executed.</param>
<param name="category">An optional category for the requested document.</param>
<param name="contextCallback">An optional context callback for the requested document.</param>
<remarks>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets script code loaded from the specified document as a statement.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.ExecuteCommand(System.String)">
<summary>
Executes script code as a command.
</summary>
<param name="command">The script command to execute.</param>
<returns>The command output.</returns>
<remarks>
This method is similar to <see cref="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String)"/> but optimized for command
consoles. The specified command must be limited to a single expression or statement.
Script engines can override this method to customize command execution as well as the
process of converting the result to a string for console output.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String)">
<summary>
Evaluates script code.
</summary>
<param name="code">The script code to evaluate.</param>
<returns>The result value.</returns>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets the specified script code as an expression.
</para>
<para>
If a debugger is attached, it will present the specified script code to the user as a
document with an automatically selected name. This document will be discarded after
execution.
</para>
<para>
For information about the types of result values that script code can return, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.Boolean,System.String)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.String)">
<summary>
Evaluates script code with an associated document name.
</summary>
<param name="documentName">A document name for the script code. 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 evaluate.</param>
<returns>The result value.</returns>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets the specified script code as an expression.
</para>
<para>
If a debugger is attached, it will present the specified script code to the user as a
document with the specified name. This document will be discarded after execution.
</para>
<para>
For information about the types of result values that script code can return, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.Boolean,System.String)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.Boolean,System.String)">
<summary>
Evaluates script code with an associated document name, optionally discarding the document after execution.
</summary>
<param name="documentName">A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
<param name="discard"><c>True</c> to discard the script document after execution, <c>false</c> otherwise.</param>
<param name="code">The script code to evaluate.</param>
<returns>The result value.</returns>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets the specified script code as an expression.
</para>
<para>
If a debugger is attached, it will present the specified script code to the user as a
document with the specified name. Discarding this document removes it from view but
has no effect on the script engine. Only Windows Script engines honor
<paramref name="discard"/>.
</para>
<para>
The following table summarizes the types of result values that script code can return.
<list type="table">
<listheader>
<term>Type</term>
<term>Returned&#xA0;As</term>
<description>Remarks</description>
</listheader>
<item>
<term><b>String</b></term>
<term><see href="https://docs.microsoft.com/en-us/dotnet/api/system.string">System.String</see></term>
<description>N/A</description>
</item>
<item>
<term><b>Boolean</b></term>
<term><see href="https://docs.microsoft.com/en-us/dotnet/api/system.boolean">System.Boolean</see></term>
<description>N/A</description>
</item>
<item>
<term><b>Number</b></term>
<term><see href="https://docs.microsoft.com/en-us/dotnet/api/system.int32">System.Int32</see>&#xA0;or&#xA0;<see href="https://docs.microsoft.com/en-us/dotnet/api/system.double">System.Double</see></term>
<description>
Other numeric types are possible. The exact conversions between script and .NET
numeric types are defined by the script engine.
</description>
</item>
<item>
<term><b>Null&#xA0;Reference</b></term>
<term><c>null</c></term>
<description>N/A</description>
</item>
<item>
<term><b>Undefined</b></term>
<term><see cref="T:Microsoft.ClearScript.Undefined"/></term>
<description>
This represents JavaScript's
<see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</see>,
VBScript's
<see href="https://docs.microsoft.com/en-us/previous-versions//f8tbc79x(v=vs.85)">Empty</see>,
etc.
</description>
</item>
<item>
<term><b>Void</b></term>
<term><see cref="T:Microsoft.ClearScript.VoidResult"/></term>
<description>
This is returned when script code forwards the result of a host method that returns no value.
</description>
</item>
<item>
<term><b>Host&#xA0;Object</b></term>
<term>Native&#xA0;.NET&#xA0;type</term>
<description>
This includes all .NET types not mentioned above, including value types (enums,
structs, etc.), and instances of all other classes. Script code can only create
these objects by invoking a host method or constructor. They are returned to
the host in their native .NET form.
</description>
</item>
<item>
<term><b>Script&#xA0;Object</b></term>
<term><see cref="T:Microsoft.ClearScript.ScriptObject"/></term>
<description>
This includes all native script objects that have no .NET representation. C#'s
<see href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types#the-dynamic-type">dynamic</see>
keyword provides a convenient way to access them.
</description>
</item>
<item>
<term>Other</term>
<term>Unspecified</term>
<description>
This includes host types and other ClearScript-specific objects intended for
script code use only. It may also include language-specific values that the
ClearScript library does not support.
</description>
</item>
</list>
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Evaluate(Microsoft.ClearScript.DocumentInfo,System.String)">
<summary>
Evaluates script code with the specified document meta-information.
</summary>
<param name="documentInfo">A structure containing meta-information for the script document.</param>
<param name="code">The script code to evaluate.</param>
<returns>The result value.</returns>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets the specified script code as an expression.
</para>
<para>
For information about the types of result values that script code can return, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.Boolean,System.String)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.EvaluateDocument(System.String)">
<summary>
Loads and evaluates a script document.
</summary>
<param name="specifier">A string specifying the document to be loaded and evaluated.</param>
<returns>The result value.</returns>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets script code loaded from the specified document as an expression.
</para>
<para>
For information about the types of result values that script code can return, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.Boolean,System.String)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.EvaluateDocument(System.String,Microsoft.ClearScript.DocumentCategory)">
<summary>
Loads and evaluates a document with the specified category.
</summary>
<param name="specifier">A string specifying the document to be loaded and evaluated.</param>
<param name="category">An optional category for the requested document.</param>
<returns>The result value.</returns>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets script code loaded from the specified document as an expression.
</para>
<para>
For information about the types of result values that script code can return, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.Boolean,System.String)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.EvaluateDocument(System.String,Microsoft.ClearScript.DocumentCategory,Microsoft.ClearScript.DocumentContextCallback)">
<summary>
Loads and evaluates a document with the specified category and context callback.
</summary>
<param name="specifier">A string specifying the document to be loaded and evaluated.</param>
<param name="category">An optional category for the requested document.</param>
<param name="contextCallback">An optional context callback for the requested document.</param>
<returns>The result value.</returns>
<remarks>
<para>
In some script languages the distinction between statements and expressions is
significant but ambiguous for certain syntactic elements. This method always
interprets script code loaded from the specified document as an expression.
</para>
<para>
For information about the types of result values that script code can return, see
<see cref="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.Boolean,System.String)"/>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Invoke(System.String,System.Object[])">
<summary>
Invokes a global function or procedure.
</summary>
<param name="funcName">The name of the global function or procedure to invoke.</param>
<param name="args">Optional invocation arguments.</param>
<returns>The return value if a function was invoked, an undefined value otherwise.</returns>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.GetStackTrace">
<summary>
Gets a string representation of the script call stack.
</summary>
<returns>The script call stack formatted as a string.</returns>
<remarks>
This method returns an empty string if the script engine is not executing script code.
The stack trace text format is defined by the script engine.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Interrupt">
<summary>
Interrupts script execution and causes the script engine to throw an exception.
</summary>
<remarks>
This method can be called safely from any thread.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.CollectGarbage(System.Boolean)">
<summary>
Performs garbage collection.
</summary>
<param name="exhaustive"><c>True</c> to perform exhaustive garbage collection, <c>false</c> to favor speed over completeness.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Dispose">
<summary>
Releases all resources used by the script engine.
</summary>
<remarks>
Call <c>Dispose()</c> when you are finished using the script engine. <c>Dispose()</c>
leaves the script engine in an unusable state. After calling <c>Dispose()</c>, you must
release all references to the script engine so the garbage collector can reclaim the
memory that the script engine was occupying.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Dispose(System.Boolean)">
<summary>
Releases the unmanaged resources used by the script engine and optionally releases the managed resources.
</summary>
<param name="disposing"><c>True</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
<remarks>
This method is called by the public <see cref="M:Microsoft.ClearScript.ScriptEngine.Dispose"/> method and the
<see cref="M:Microsoft.ClearScript.ScriptEngine.Finalize">Finalize</see> method. <see cref="M:Microsoft.ClearScript.ScriptEngine.Dispose"/> invokes the
protected <c>Dispose(Boolean)</c> method with the <paramref name="disposing"/>
parameter set to <c>true</c>. <see cref="M:Microsoft.ClearScript.ScriptEngine.Finalize">Finalize</see> invokes
<c>Dispose(Boolean)</c> with <paramref name="disposing"/> set to <c>false</c>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngine.Finalize">
<summary>
Releases unmanaged resources and performs other cleanup operations before the script engine is reclaimed by garbage collection.
</summary>
<remarks>
This method overrides <see cref="M:System.Object.Finalize"/>. Application code should not
call this method; an object's <c>Finalize()</c> method is automatically invoked during
garbage collection, unless finalization by the garbage collector has been disabled by a
call to <see cref="M:System.GC.SuppressFinalize(System.Object)"/>.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.ScriptEngineException">
<summary>
The exception that is thrown when an error occurs during script execution or script object access.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngineException.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptEngineException"/> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngineException.#ctor(System.String)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptEngineException"/> with the specified error message.
</summary>
<param name="message">The error message.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngineException.#ctor(System.String,System.Exception)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptEngineException"/> with the specified error message and nested exception.
</summary>
<param name="message">The error message.</param>
<param name="innerException">The exception that caused the current exception to be thrown.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngineException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptEngineException"/> with serialized data.
</summary>
<param name="info">The object that holds the serialized data.</param>
<param name="context">The contextual information about the source or destination.</param>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngineException.Microsoft#ClearScript#IScriptEngineException#HResult">
<summary>
Gets an <see href="http://en.wikipedia.org/wiki/HRESULT">HRESULT</see> error code if one is available, zero otherwise.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngineException.EngineName">
<summary>
Gets the name associated with the script engine instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngineException.ErrorDetails">
<summary>
Gets a detailed error message if one is available, <c>null</c> otherwise.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngineException.IsFatal">
<summary>
Gets a value that indicates whether the exception represents a fatal error.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngineException.ExecutionStarted">
<summary>
Gets a value that indicates whether script code execution had started before the current exception was thrown.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptEngineException.ScriptException">
<summary>
Gets the script exception that caused the current exception to be thrown, or <c>null</c> if one was not specified.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngineException.ToString">
<summary>
Returns a string that represents the current exception.
</summary>
<returns>A string that represents the current exception.</returns>
</member>
<member name="M:Microsoft.ClearScript.ScriptEngineException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
<summary>
Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"/> with the data needed to serialize the target object.
</summary>
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
<param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"/>) for this serialization.</param>
</member>
<member name="T:Microsoft.ClearScript.ScriptInterruptedException">
<summary>
The exception that is thrown when script execution is interrupted by the host.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptInterruptedException.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptInterruptedException"/> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptInterruptedException.#ctor(System.String)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptInterruptedException"/> with the specified error message.
</summary>
<param name="message">The error message.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptInterruptedException.#ctor(System.String,System.Exception)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptInterruptedException"/> with the specified error message and nested exception.
</summary>
<param name="message">The error message.</param>
<param name="innerException">The exception that caused the current exception to be thrown.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptInterruptedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptInterruptedException"/> with serialized data.
</summary>
<param name="info">The object that holds the serialized data.</param>
<param name="context">The contextual information about the source or destination.</param>
</member>
<member name="P:Microsoft.ClearScript.ScriptInterruptedException.Microsoft#ClearScript#IScriptEngineException#HResult">
<summary>
Gets an <see href="http://en.wikipedia.org/wiki/HRESULT">HRESULT</see> error code if one is available, zero otherwise.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptInterruptedException.EngineName">
<summary>
Gets the name associated with the script engine instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptInterruptedException.ErrorDetails">
<summary>
Gets a detailed error message if one is available, <c>null</c> otherwise.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptInterruptedException.IsFatal">
<summary>
Gets a value that indicates whether the exception represents a fatal error.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptInterruptedException.ExecutionStarted">
<summary>
Gets a value that indicates whether script code execution had started before the current exception was thrown.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptInterruptedException.ScriptException">
<summary>
Gets the script exception that caused the current exception to be thrown, or <c>null</c> if one was not specified.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptInterruptedException.ToString">
<summary>
Returns a string that represents the current exception.
</summary>
<returns>A string that represents the current exception.</returns>
</member>
<member name="M:Microsoft.ClearScript.ScriptInterruptedException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
<summary>
Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"/> with the data needed to serialize the target object.
</summary>
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
<param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"/>) for this serialization.</param>
</member>
<member name="T:Microsoft.ClearScript.ScriptMemberAttribute">
<summary>
Specifies how the target type member is to be exposed to script code. This extended version
supports additional options.
</summary>
<remarks>
This attribute is applicable to events, fields, methods, and properties.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptMemberAttribute.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptMemberAttribute.#ctor(System.String)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/> instance with the specified name.
</summary>
<param name="name">The name that script code will use to access the target type member.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptMemberAttribute.#ctor(Microsoft.ClearScript.ScriptAccess)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/> instance with the specified script access setting.
</summary>
<param name="access">The script access setting for the target type member.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptMemberAttribute.#ctor(System.String,Microsoft.ClearScript.ScriptAccess)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/> instance with the specified name and script access setting.
</summary>
<param name="name">The name that script code will use to access the target type member.</param>
<param name="access">The script access setting for the target type member.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptMemberAttribute.#ctor(Microsoft.ClearScript.ScriptMemberFlags)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/> instance with the specified script options.
</summary>
<param name="flags">The script options for the target type member.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptMemberAttribute.#ctor(System.String,Microsoft.ClearScript.ScriptMemberFlags)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/> instance with the specified name and script options.
</summary>
<param name="name">The name that script code will use to access the target type member.</param>
<param name="flags">The script options for the target type member.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptMemberAttribute.#ctor(Microsoft.ClearScript.ScriptAccess,Microsoft.ClearScript.ScriptMemberFlags)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/> instance with the specified script access setting and script options.
</summary>
<param name="access">The script access setting for the target type member.</param>
<param name="flags">The script options for the target type member.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptMemberAttribute.#ctor(System.String,Microsoft.ClearScript.ScriptAccess,Microsoft.ClearScript.ScriptMemberFlags)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/> instance with the specified name, script access setting, and script options.
</summary>
<param name="name">The name that script code will use to access the target type member.</param>
<param name="access">The script access setting for the target type member.</param>
<param name="flags">The script options for the target type member.</param>
</member>
<member name="P:Microsoft.ClearScript.ScriptMemberAttribute.Name">
<summary>
Gets or sets the name that script code will use to access the target type member.
</summary>
<remarks>
The default value is the name of the target type member. Note that this property has no
effect on the method binding algorithm. If a script-based call is bound to a method
that is exposed under a different name, it will be rejected even if an overload exists
that could receive the call.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.ScriptMemberAttribute.Flags">
<summary>
Gets or sets the script options for the target type member.
</summary>
</member>
<member name="T:Microsoft.ClearScript.ScriptMemberFlags">
<summary>
Defines options for exposing type members to script code.
</summary>
</member>
<member name="F:Microsoft.ClearScript.ScriptMemberFlags.None">
<summary>
Specifies that no options are selected.
</summary>
</member>
<member name="F:Microsoft.ClearScript.ScriptMemberFlags.ExposeRuntimeType">
<summary>
Specifies that the field, property, or method return value is not to be restricted to
its declared type.
</summary>
</member>
<member name="F:Microsoft.ClearScript.ScriptMemberFlags.WrapNullResult">
<summary>
Specifies that the field, property, or method return value is to be marshaled with full
.NET type information even if it is <c>null</c>. Note that such a value will always
fail equality comparison with JavaScript's
<c><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null">null</see></c>,
VBScript's
<c><see href="https://docs.microsoft.com/en-us/previous-versions//f8tbc79x(v=vs.85)">Nothing</see></c>,
and other similar values. Instead, use <see cref="M:Microsoft.ClearScript.HostFunctions.isNull(System.Object)"/> or
<see cref="M:System.Object.Equals(System.Object,System.Object)"/> to perform such a comparison.
</summary>
</member>
<member name="T:Microsoft.ClearScript.ScriptObject">
<summary>
Represents a script object.
</summary>
<seealso cref="M:Microsoft.ClearScript.ScriptEngine.Evaluate(System.String,System.Boolean,System.String)"/>
</member>
<member name="P:Microsoft.ClearScript.ScriptObject.Engine">
<summary>
Gets the script engine that owns the object.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptObject.GetProperty(System.String,System.Object[])">
<summary>
Gets the value of a named script object property.
</summary>
<param name="name">The name of the property to get.</param>
<param name="args">Optional arguments for property retrieval.</param>
<returns>The value of the specified property.</returns>
</member>
<member name="M:Microsoft.ClearScript.ScriptObject.SetProperty(System.String,System.Object[])">
<summary>
Sets the value of a named script object property.
</summary>
<param name="name">The name of the property to set.</param>
<param name="args">An array containing optional arguments and the new property value.</param>
<remarks>
The <paramref name="args"></paramref> array must contain at least one element. The new
property value must be the last element of the array.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptObject.DeleteProperty(System.String)">
<summary>
Removes a named script object property.
</summary>
<param name="name">The name of the property to remove.</param>
<returns><c>True</c> if the property was removed successfully, <c>false</c> otherwise.</returns>
</member>
<member name="P:Microsoft.ClearScript.ScriptObject.PropertyNames">
<summary>
Enumerates the script object's property names.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptObject.Item(System.String,System.Object[])">
<summary>
Gets or sets the value of a named script object property.
</summary>
<param name="name">The name of the property to get or set.</param>
<param name="args">Optional arguments for property access.</param>
<returns>The value of the specified property.</returns>
</member>
<member name="M:Microsoft.ClearScript.ScriptObject.GetProperty(System.Int32)">
<summary>
Gets the value of an indexed script object property.
</summary>
<param name="index">The index of the property to get.</param>
<returns>The value of the specified property.</returns>
</member>
<member name="M:Microsoft.ClearScript.ScriptObject.SetProperty(System.Int32,System.Object)">
<summary>
Sets the value of an indexed script object property.
</summary>
<param name="index">The index of the property to set.</param>
<param name="value">The new property value.</param>
</member>
<member name="M:Microsoft.ClearScript.ScriptObject.DeleteProperty(System.Int32)">
<summary>
Removes an indexed script object property.
</summary>
<param name="index">The index of the property to remove.</param>
<returns><c>True</c> if the property was removed successfully, <c>false</c> otherwise.</returns>
</member>
<member name="P:Microsoft.ClearScript.ScriptObject.PropertyIndices">
<summary>
Enumerates the script object's property indices.
</summary>
</member>
<member name="P:Microsoft.ClearScript.ScriptObject.Item(System.Int32)">
<summary>
Gets or sets the value of an indexed script object property.
</summary>
<param name="index">The index of the property to get or set.</param>
<returns>The value of the specified property.</returns>
</member>
<member name="M:Microsoft.ClearScript.ScriptObject.Invoke(System.Boolean,System.Object[])">
<summary>
Invokes the script object.
</summary>
<param name="asConstructor"><c>True</c> to invoke the object as a constructor, <c>false</c> otherwise.</param>
<param name="args">Optional arguments for object invocation.</param>
<returns>The invocation result value.</returns>
</member>
<member name="M:Microsoft.ClearScript.ScriptObject.InvokeMethod(System.String,System.Object[])">
<summary>
Invokes a script object method.
</summary>
<param name="name">The name of the method to invoke.</param>
<param name="args">Optional arguments for method invocation.</param>
<returns>The invocation result value.</returns>
</member>
<member name="T:Microsoft.ClearScript.ScriptUsageAttribute">
<summary>
Specifies how the target type member is to be exposed to script code.
</summary>
<remarks>
This attribute is applicable to events, fields, methods, properties, and nested types.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ScriptUsageAttribute.#ctor">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptUsageAttribute"/> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ScriptUsageAttribute.#ctor(Microsoft.ClearScript.ScriptAccess)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.ScriptUsageAttribute"/> instance with the specified script access setting.
</summary>
<param name="access">The script access setting for the target type member.</param>
</member>
<member name="P:Microsoft.ClearScript.ScriptUsageAttribute.Access">
<summary>
Gets the script access setting for the target type member.
</summary>
</member>
<member name="T:Microsoft.ClearScript.StringDocument">
<summary>
Provides an in-memory <see cref="T:Microsoft.ClearScript.Document"/> implementation for a text document.
</summary>
</member>
<member name="M:Microsoft.ClearScript.StringDocument.#ctor(Microsoft.ClearScript.DocumentInfo,System.String)">
<summary>
Initializes a new <see cref="T:Microsoft.ClearScript.StringDocument"/> instance.
</summary>
<param name="info">A structure containing meta-information for the document.</param>
<param name="contents">A string containing the document's contents.</param>
</member>
<member name="P:Microsoft.ClearScript.StringDocument.Info">
<summary>
Gets a structure containing meta-information for the document.
</summary>
</member>
<member name="P:Microsoft.ClearScript.StringDocument.Contents">
<summary>
Gets a stream that provides read access to the document.
</summary>
<remarks>
The <see cref="T:Microsoft.ClearScript.StringDocument"/> implementation of this property returns a
<see cref="T:System.IO.MemoryStream"/> instance.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.StringDocument.Encoding">
<summary>
Gets the document's character encoding.
</summary>
<remarks>
<see cref="T:Microsoft.ClearScript.StringDocument"/> instances return <see cref="P:System.Text.Encoding.UTF8"/> for this property.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.Undefined">
<summary>
Represents an undefined value.
</summary>
<remarks>
Some script languages support one or more special non-<c>null</c> values that represent
nonexistent, missing, unknown, or undefined data. The ClearScript library maps such values
to instances of this class.
</remarks>
</member>
<member name="F:Microsoft.ClearScript.Undefined.Value">
<summary>
The sole instance of the <see cref="T:Microsoft.ClearScript.Undefined"/> class.
</summary>
</member>
<member name="M:Microsoft.ClearScript.Undefined.ToString">
<summary>
Returns a string that represents the current object.
</summary>
<returns>A string that represents the current object.</returns>
<remarks>
The <see cref="T:Microsoft.ClearScript.Undefined"/> version of this method returns "[undefined]".
</remarks>
</member>
<member name="T:Microsoft.ClearScript.Util.IDisposableEnumerator">
<exclude/>
</member>
<member name="T:Microsoft.ClearScript.Util.IAsyncEnumeratorPromise`1">
<exclude/>
</member>
<member name="P:Microsoft.ClearScript.Util.IAsyncEnumeratorPromise`1.Current">
<exclude/>
</member>
<member name="M:Microsoft.ClearScript.Util.IAsyncEnumeratorPromise`1.MoveNextAsync">
<exclude/>
</member>
<member name="M:Microsoft.ClearScript.Util.IAsyncEnumeratorPromise`1.DisposeAsync">
<exclude/>
</member>
<member name="M:Microsoft.ClearScript.Util.IAsyncEnumeratorPromise`1.MoveNextPromise">
<exclude/>
</member>
<member name="M:Microsoft.ClearScript.Util.IAsyncEnumeratorPromise`1.DisposePromise">
<exclude/>
</member>
<member name="T:Microsoft.ClearScript.VoidResult">
<summary>
Represents the result of a host method that returns no value.
</summary>
<remarks>
Some script languages expect every subroutine call to return a value. When script code
written in such a language invokes a host method that explicitly returns no value (such as
a C# <see href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/void">void</see> method),
the ClearScript library provides an instance of this class as a dummy return value.
</remarks>
</member>
</members>
</doc>