diff --git a/CHANGELOG.md b/CHANGELOG.md
index f6cbbab5..15f9e4bb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,19 @@
Change log
==========
+## v3.9.0 Preview 3 - November 6, 2020
+ * In JavaScriptEngineSwitcher.V8:
+ * Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version 8.7.220.16)
+ * Own versions of the ClearScript's assemblies are no longer build, because the [official NuGet package](https://www.nuget.org/packages/Microsoft.ClearScript.V8) is now used. Therefore, you should also replace in your projects the `JavaScriptEngineSwitcher.V8.Native.*` packages by the `Microsoft.ClearScript.V8.Native.*` packages.
+
+## v3.9.0 Preview 2 - October 30, 2020
+ * In JavaScriptEngineSwitcher.V8 added support of Microsoft ClearScript.V8 version 7.0 RC4 (support of V8 version 8.7.220.10)
+
+## v3.9.0 Preview - October 24, 2020
+ * In JavaScriptEngineSwitcher.V8:
+ * Cross-platform is implemented by using an [unofficial experimental version of the Microsoft ClearScript.V8](https://github.com/Taritsyn/ClearScript-Experimental) library, which is not targeted at any particular operating system or processor architecture, and can work with various native assemblies
+ * Added a packages, that contains a native assemblies for Linux (x64) and OS X (x64)
+
## v3.8.2 - October 23, 2020
* In JavaScriptEngineSwitcher.V8 added support of Microsoft ClearScript.V8 version 7.0 RC3
diff --git a/JavaScriptEngineSwitcher.NoSamples.sln b/JavaScriptEngineSwitcher.NoSamples.sln
index baef53e8..d1e12f4c 100644
--- a/JavaScriptEngineSwitcher.NoSamples.sln
+++ b/JavaScriptEngineSwitcher.NoSamples.sln
@@ -51,6 +51,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.win-x64", "src\JavaScriptEngineSwitcher.V8.Native.win-x64\JavaScriptEngineSwitcher.V8.Native.win-x64.csproj", "{4FB64080-817F-468A-B92C-F63B46E6D85F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.linux-x64", "src\JavaScriptEngineSwitcher.V8.Native.linux-x64\JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj", "{D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.osx-x64", "src\JavaScriptEngineSwitcher.V8.Native.osx-x64\JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj", "{4B727E90-AE52-41DD-B704-28A00196052C}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Jurassic", "src\JavaScriptEngineSwitcher.Jurassic\JavaScriptEngineSwitcher.Jurassic.csproj", "{D31B5A77-8018-4D76-B372-325564385B2D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Jint", "src\JavaScriptEngineSwitcher.Jint\JavaScriptEngineSwitcher.Jint.csproj", "{22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}"
@@ -133,6 +137,10 @@ Global
{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Release|Any CPU.Build.0 = Release|Any CPU
+ {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.Build.0 = Release|Any CPU
{FF77615B-4182-4BE7-AE2B-0F9F75198490}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF77615B-4182-4BE7-AE2B-0F9F75198490}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF77615B-4182-4BE7-AE2B-0F9F75198490}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -161,10 +169,14 @@ Global
{E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF}.Release|Any CPU.Build.0 = Release|Any CPU
- {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4B727E90-AE52-41DD-B704-28A00196052C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4B727E90-AE52-41DD-B704-28A00196052C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4B727E90-AE52-41DD-B704-28A00196052C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4B727E90-AE52-41DD-B704-28A00196052C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -182,6 +194,7 @@ Global
{F676D869-5715-46B0-A118-A162D9C9DEC6} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
+ {304EEE7F-005D-4335-80AB-DB29025740B1} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{FF77615B-4182-4BE7-AE2B-0F9F75198490} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{E14C4086-9877-4658-AE39-6313039A9076} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{238D7E69-7052-4DFC-83EF-79D3D124C12B} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
@@ -189,7 +202,8 @@ Global
{89F9DDDD-5236-4D9A-99E4-3C1358B81149} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{24A8F6A6-EA4E-43A6-A2D7-E1916F8CB4EE} = {53B43213-2E66-42C2-8476-600A2FD2DA75}
{E95FDEF6-18A0-4E26-8FDF-B4B590E6EDAF} = {53B43213-2E66-42C2-8476-600A2FD2DA75}
- {304EEE7F-005D-4335-80AB-DB29025740B1} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
+ {4B727E90-AE52-41DD-B704-28A00196052C} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8184BE59-ACBC-4CD1-9419-D59A0FAC6131}
diff --git a/JavaScriptEngineSwitcher.sln b/JavaScriptEngineSwitcher.sln
index cc1686a9..94f0ed1c 100644
--- a/JavaScriptEngineSwitcher.sln
+++ b/JavaScriptEngineSwitcher.sln
@@ -61,6 +61,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.win-x64", "src\JavaScriptEngineSwitcher.V8.Native.win-x64\JavaScriptEngineSwitcher.V8.Native.win-x64.csproj", "{4FB64080-817F-468A-B92C-F63B46E6D85F}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.linux-x64", "src\JavaScriptEngineSwitcher.V8.Native.linux-x64\JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj", "{D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.V8.Native.osx-x64", "src\JavaScriptEngineSwitcher.V8.Native.osx-x64\JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj", "{4B727E90-AE52-41DD-B704-28A00196052C}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Jurassic", "src\JavaScriptEngineSwitcher.Jurassic\JavaScriptEngineSwitcher.Jurassic.csproj", "{D31B5A77-8018-4D76-B372-325564385B2D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Jint", "src\JavaScriptEngineSwitcher.Jint\JavaScriptEngineSwitcher.Jint.csproj", "{22D73C6E-5F35-497B-A93B-F9EAAAE4DDAA}"
@@ -73,7 +77,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.Ch
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-arm", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm.csproj", "{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64.csproj", "{3405C818-7B0D-4B85-A1E1-F13BE377054A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64\JavaScriptEngineSwitcher.ChakraCore.Native.win-arm64.csproj", "{304EEE7F-005D-4335-80AB-DB29025740B1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64", "src\JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64\JavaScriptEngineSwitcher.ChakraCore.Native.linux-x64.csproj", "{FF77615B-4182-4BE7-AE2B-0F9F75198490}"
EndProject
@@ -157,6 +161,10 @@ Global
{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812}.Release|Any CPU.Build.0 = Release|Any CPU
+ {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {304EEE7F-005D-4335-80AB-DB29025740B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {304EEE7F-005D-4335-80AB-DB29025740B1}.Release|Any CPU.Build.0 = Release|Any CPU
{FF77615B-4182-4BE7-AE2B-0F9F75198490}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF77615B-4182-4BE7-AE2B-0F9F75198490}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF77615B-4182-4BE7-AE2B-0F9F75198490}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -213,10 +221,14 @@ Global
{D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4}.Release|Any CPU.Build.0 = Release|Any CPU
- {3405C818-7B0D-4B85-A1E1-F13BE377054A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3405C818-7B0D-4B85-A1E1-F13BE377054A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3405C818-7B0D-4B85-A1E1-F13BE377054A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3405C818-7B0D-4B85-A1E1-F13BE377054A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4B727E90-AE52-41DD-B704-28A00196052C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4B727E90-AE52-41DD-B704-28A00196052C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4B727E90-AE52-41DD-B704-28A00196052C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4B727E90-AE52-41DD-B704-28A00196052C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -236,6 +248,7 @@ Global
{F676D869-5715-46B0-A118-A162D9C9DEC6} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{D2B4F490-E7A6-40A8-808E-6D7A30D3EBF5} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{BB7BE2DF-C68C-4F82-8BAB-79A16D9AB812} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
+ {304EEE7F-005D-4335-80AB-DB29025740B1} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{FF77615B-4182-4BE7-AE2B-0F9F75198490} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{E14C4086-9877-4658-AE39-6313039A9076} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
{238D7E69-7052-4DFC-83EF-79D3D124C12B} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
@@ -250,7 +263,8 @@ Global
{5CA92021-B75A-40AF-B5AA-500BAF76B4D6} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3}
{0342791E-6390-4F97-9163-5CE02E4CFF07} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3}
{D0127B5A-E66B-4DA2-8C57-A8BA2A0163F4} = {E5989CB5-AACE-4D35-A8EE-26942F140DA3}
- {3405C818-7B0D-4B85-A1E1-F13BE377054A} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
+ {D4B2AB12-57DE-43AA-9A1E-E4A5DEB59889} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
+ {4B727E90-AE52-41DD-B704-28A00196052C} = {0C281F46-F1D2-4A1C-8560-375EDA65D680}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8184BE59-ACBC-4CD1-9419-D59A0FAC6131}
diff --git a/lib/ClearScript/LICENSE.v8.txt b/lib/ClearScript/LICENSE.v8.txt
deleted file mode 100644
index bf2314e3..00000000
--- a/lib/ClearScript/LICENSE.v8.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Copyright 2006-2011, the V8 project authors. All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of Google Inc. nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/lib/ClearScript/License.txt b/lib/ClearScript/License.txt
deleted file mode 100644
index 54b1b899..00000000
--- a/lib/ClearScript/License.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-MIT License
-
-Copyright (c) Microsoft Corporation
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/lib/ClearScript/lib/net45/ClearScript.dll b/lib/ClearScript/lib/net45/ClearScript.dll
deleted file mode 100644
index ecae6b7b..00000000
Binary files a/lib/ClearScript/lib/net45/ClearScript.dll and /dev/null differ
diff --git a/lib/ClearScript/lib/net45/ClearScript.xml b/lib/ClearScript/lib/net45/ClearScript.xml
deleted file mode 100644
index b34f5608..00000000
--- a/lib/ClearScript/lib/net45/ClearScript.xml
+++ /dev/null
@@ -1,6084 +0,0 @@
-
-
-
- ClearScript
-
-
-
-
- Defines properties that comprise ClearScript's global configuration.
-
-
-
-
- Enables or disables assembly table usage.
-
-
-
- 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.
-
-
- The assembly table feature is only available on .NET Framework. This property has no
- effect on other platforms.
-
-
-
-
-
- Provides an abstract representation of a document.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets a structure containing meta-information for the document.
-
-
-
-
- Gets a stream that provides read access to the document.
-
-
-
-
- Gets the document's character encoding.
-
-
- This property returns null if the document contains binary data or if its
- character encoding is unknown.
-
-
-
-
- Represents a document category.
-
-
-
-
- Gets or sets the maximum cache size for the document category.
-
-
-
- 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.
-
-
- Each script engine or runtime maintains private caches for supported document
- categories. These are distinct from the caches used by document loaders.
-
-
-
-
-
-
- Gets the document category for normal scripts.
-
-
-
-
- Represents a method that retrieves context information for a document.
-
- A structure containing meta-information for the document.
- A property collection containing context information for the document.
-
-
-
- Represents a method to be called when a document is loaded.
-
- A structure containing meta-information for the document.
-
- The callback can modify the document meta-information by specifying or overriding any of
- its mutable properties.
-
-
-
-
- Represents a document access configuration.
-
-
- This class can be extended to accommodate custom document loaders.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets or sets a document loader.
-
-
-
-
- Gets or sets document access options.
-
-
-
-
- Gets or sets a semicolon-delimited list of directory URLs or paths to search for documents.
-
-
-
-
- Gets or sets a semicolon-delimited list of supported file name extensions.
-
-
-
-
- Gets or set an optional method to be called when a document is loaded.
-
-
-
-
- Gets or sets an optional document context callback.
-
-
-
- This property is used as an alternative to .
- 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.
-
-
- Use
- import.meta
- to access the context information of a JavaScript
- module. In a module, use module.meta.
-
-
-
-
-
- Adds a system document to the configuration.
-
- An identifier for the document.
- A string containing the document's contents.
-
- System documents take precedence over loaded documents. Once this method is invoked,
- document access using this configuration will always map the combination of
- and to the
- specified document, bypassing the configuration's document loader.
-
-
-
-
- Adds a system document with the specified category to the configuration.
-
- An identifier for the document.
- An optional category for the document.
- A string containing the document's contents.
-
- System documents take precedence over loaded documents. Once this method is invoked,
- document access using this configuration will always map the combination of
- and to the specified
- document, bypassing the configuration's document loader.
-
-
-
-
- Adds a system document with the specified category and context callback to the configuration.
-
- An identifier for the document.
- An optional category for the document.
- A string containing the document's contents.
- An optional context callback for the document.
-
- System documents take precedence over loaded documents. Once this method is invoked,
- document access using this configuration will always map the combination of
- and to the specified
- document, bypassing the configuration's document loader.
-
-
-
-
- Adds the specified document as a system document to the configuration.
-
- An identifier for the document.
- The document to be added as a system document.
-
- System documents take precedence over loaded documents. Once this method is invoked,
- document access using this configuration will always map the combination of
- and the specified document's category to the specified
- document, bypassing the configuration's document loader.
-
-
-
-
- Represents a document loader.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets the default document loader.
-
-
-
-
- Gets or sets the maximum size of the document loader's cache.
-
-
- 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.
-
-
-
-
-
- Loads a document.
-
- Document access settings for the operation.
- An optional structure containing meta-information for the requesting document.
- A string specifying the document to be loaded.
- An optional category for the requested document.
- An optional context callback for the requested document.
- A instance that represents the loaded document.
-
- A loaded document must have an absolute URI. Once a
- load operation has completed successfully, subsequent requests that resolve to the same
- URI are expected to return the same reference, although loaders
- are not required to manage document caches of unlimited size.
-
-
-
-
- Loads a document asynchronously.
-
- Document access settings for the operation.
- An optional structure containing meta-information for the requesting document.
- A string specifying the document to be loaded.
- An optional category for the requested document.
- An optional context callback for the requested document.
- A task that represents the asynchronous operation. Upon completion, the task's result is a instance that represents the loaded document.
-
- A loaded document must have an absolute URI. Once a
- load operation has completed successfully, subsequent requests that resolve to the same
- URI are expected to return the same reference, although loaders
- are not required to manage document caches of unlimited size.
-
-
-
-
- Discards all cached documents.
-
-
-
-
- Defines document access options.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that documents may be loaded from the file system.
-
-
-
-
- Specifies that documents may be downloaded from the Web.
-
-
-
-
- Specifies that documents may be loaded from any location.
-
-
-
-
- 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.
-
-
-
-
- Defines extension methods for use with all script engines.
-
-
-
-
- Converts a type to a host type for use with script code currently running on the
- calling thread.
-
- The type to convert to a host type.
- A host type for use with script code.
-
-
-
- Converts a type to a host type for use with script code running in the specified
- script engine.
-
- The type to convert to a host type.
- The script engine in which the host type will be used.
- A host type for use with script code.
-
-
-
- Converts an object to a host object with the specified type restriction, for use with
- script code currently running on the calling thread.
-
- The type whose members are to be made accessible from script code.
- The object to convert to a host object for use with script code.
- A host object with the specified type restriction.
-
-
-
- Converts an object to a host object with the specified type restriction, for use with
- script code running in the specified script engine.
-
- The type whose members are to be made accessible from script code.
- The object to convert to a host object for use with script code.
- The script engine in which the host object will be used.
- A host object with the specified type restriction.
-
-
-
- Represents a method that specifies to a script engine whether script execution should continue.
-
- True to continue script execution, false to interrupt it.
-
-
-
-
- Defines document attributes.
-
-
-
-
- Indicates that no attributes are present.
-
-
-
-
- Indicates that the document is temporary and can be discarded after use. Only Windows
- Script engines honor this attribute.
-
-
-
-
- Contains meta-information for a document.
-
-
-
-
- Initializes a new structure with the specified document name.
-
- The document name.
-
-
-
- Initializes a new structure with the specified document URI.
-
- The document URI.
-
-
-
- Gets the document's name.
-
-
- 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.
-
-
-
-
- Gets the document's URI.
-
-
- This property returns null if a URI was not specified at instantiation time.
-
-
-
-
- Gets or sets an optional source map URI for the document.
-
-
-
-
- Gets or sets the document's category.
-
-
-
-
- Gets or sets optional document attributes.
-
-
-
-
- Gets or sets an optional context callback for the document.
-
-
-
- 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.
-
-
- Use
- import.meta
- to access the context information of a JavaScript
- module. In a module, use module.meta.
-
-
-
-
-
- Specifies that instances of the target struct are immutable.
-
-
- 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, ,
- , and .
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Defines options for exposing host resources to script code.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that the host resource's members are to be exposed as global items in the
- script engine's root namespace.
-
-
-
-
- Specifies that the host resource's non-public members are to be exposed.
-
-
-
-
- Specifies that the host resource's dynamic members are not to be exposed. This option
- applies only to objects that implement .
-
-
-
-
- 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 COM-visible
- objects exposed in Windows Script engines.
-
-
-
-
- Defines a method to be called when a host object is exposed to script code.
-
-
-
-
- Notifies the host object that it has been exposed to script code.
-
- The script engine in which the host object was exposed.
-
- 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.
-
-
-
-
- Defines common script engine exception properties.
-
-
-
-
- Gets the error message.
-
-
-
-
- Gets an HRESULT error code if one is available, zero otherwise.
-
-
-
-
- Gets the name associated with the script engine instance.
-
-
-
-
- Gets a detailed error message if one is available, null otherwise.
-
-
-
-
- Gets a value that indicates whether the exception represents a fatal error.
-
-
-
-
- Gets a value that indicates whether script code execution had started before the current exception was thrown.
-
-
-
-
- Gets the script exception that caused the current exception to be thrown, or null if one was not specified.
-
-
-
-
- Gets the host exception that caused the current exception to be thrown, or null if one was not specified.
-
-
-
-
- Specifies defaults for how type members are to be exposed to script code.
-
-
- This attribute is applicable to classes, enums, interfaces, structs, and assemblies. Use
- , , or
- to override it for individual type members.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new instance with the specified default script access setting.
-
- The default script access setting for type members.
-
-
-
- Gets the default script access setting for type members.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Defines extension methods for use with JavaScript engines.
-
-
-
-
- Converts a instance to a
- promise
- for use with script code currently running on the calling thread.
-
- The task's result type.
- The task to convert to a promise.
- A promise that represents the task's asynchronous operation.
-
-
-
- Converts a instance to a
- promise
- for use with script code running in the specified script engine.
-
- The task's result type.
- The task to convert to a promise.
- The script engine in which the promise will be used.
- A promise that represents the task's asynchronous operation.
-
-
-
- Converts a instance to a
- promise
- for use with script code currently running on the calling thread.
-
- The task to convert to a promise.
- A promise that represents the task's asynchronous operation.
-
-
-
- Converts a instance to a
- promise
- for use with script code running in the specified script engine.
-
- The task to convert to a promise.
- The script engine in which the promise will be used.
- A promise that represents the task's asynchronous operation.
-
-
-
- Converts a
- promise
- to a instance.
-
- The promise to convert to a task.
- A task that represents the promise's asynchronous operation.
-
-
-
- Represents a JavaScript
- ArrayBuffer.
-
-
-
-
- Gets the size of the ArrayBuffer in bytes.
-
-
-
-
- Creates a byte array containing a copy of the ArrayBuffer's contents.
-
- A new byte array containing a copy of the ArrayBuffer's contents.
-
-
-
- Copies bytes from the ArrayBuffer into the specified byte array.
-
- The offset within the ArrayBuffer of the first byte to copy.
- The maximum number of bytes to copy.
- The byte array into which to copy the bytes.
- The index within at which to store the first copied byte.
- The number of bytes copied.
-
-
-
- Copies bytes from the specified byte array into the ArrayBuffer.
-
- The byte array from which to copy the bytes.
- The index within of the first byte to copy.
- The maximum number of bytes to copy.
- The offset within the ArrayBuffer at which to store the first copied byte.
- The number of bytes copied.
-
-
-
- Defines properties and methods common to all
- ArrayBuffer
- views.
-
-
-
-
- Gets view's underlying ArrayBuffer.
-
-
-
-
- Gets the view's offset within the underlying ArrayBuffer.
-
-
-
-
- Gets the view's size in bytes.
-
-
-
-
- Creates a byte array containing a copy of the view's contents.
-
- A new byte array containing a copy of the view's contents.
-
-
-
- Copies bytes from the view into the specified byte array.
-
- The offset within the view of the first byte to copy.
- The maximum number of bytes to copy.
- The byte array into which to copy the bytes.
- The index within at which to store the first copied byte.
- The number of bytes copied.
-
-
-
- Copies bytes from the specified byte array into the view.
-
- The byte array from which to copy the bytes.
- The index within of the first byte to copy.
- The maximum number of bytes to copy.
- The offset within the view at which to store the first copied byte.
- The number of bytes copied.
-
-
-
- Represents a JavaScript
- DataView.
-
-
-
-
- Defines properties and methods common to all JavaScript
- typed arrays.
-
-
-
-
- Gets the typed array's length.
-
-
-
-
- Represents a JavaScript typed array.
-
- The typed array's element type.
-
-
- The following table lists the specific interfaces implemented by JavaScript typed arrays:
-
-
-
-
- Typed Array
- Interface(s) (C#)
-
- -
- Uint8Array
- ITypedArray<byte>
-
- -
- Uint8ClampedArray
- ITypedArray<byte>
-
- -
- Int8Array
- ITypedArray<sbyte>
-
- -
- Uint16Array
- ITypedArray<ushort> and ITypedArray<char>
-
- -
- Int16Array
- ITypedArray<short>
-
- -
- Uint32Array
- ITypedArray<uint>
-
- -
- Int32Array
- ITypedArray<int>
-
- -
- Float32Array
- ITypedArray<float>
-
- -
- Float64Array
- ITypedArray<double>
-
-
-
-
-
-
-
- Creates an array containing a copy of the typed array's contents.
-
- A new array containing a copy of the typed array's contents.
-
-
-
- Copies elements from the typed array into the specified array.
-
- The index within the typed array of the first element to copy.
- The maximum number of elements to copy.
- The array into which to copy the elements.
- The index within at which to store the first copied element.
- The number of elements copied.
-
-
-
- Copies elements from the specified array into the typed array.
-
- The array from which to copy the elements.
- The index within of the first element to copy.
- The maximum number of elements to copy.
- The index within the typed array at which to store the first copied element.
- The number of elements copied.
-
-
-
- Defines document categories for JavaScript modules.
-
-
-
-
- Gets the document category for standard ECMAScript 6 modules.
-
-
-
-
- Gets the document category for CommonJS modules.
-
-
-
-
- Specifies that script code is to have no access to type members by default.
-
-
- This attribute is applicable to classes, enums, interfaces, structs, and assemblies. Use
- , , or
- 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.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Specifies that script code is to have no access to the target type member.
-
-
- 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.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Extends for enhanced behavior and performance in a scripting environment.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Determines whether the object has the specified named member.
-
- The member name for which to search.
- True to perform a case-insensitive search, false otherwise.
- True if the named member was found, false otherwise.
-
-
-
- Defines script access settings for type members.
-
-
-
-
- Specifies that script code is to have full access to the type member. This is the
- default setting.
-
-
-
-
- Specifies that script code is to have read-only access to the type member. This setting
- only affects fields and writable properties.
-
-
-
-
- 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.
-
-
-
-
- The exception that is thrown when an error occurs during script execution or script object access.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new with the specified error message.
-
- The error message.
-
-
-
- Initializes a new with the specified error message and nested exception.
-
- The error message.
- The exception that caused the current exception to be thrown.
-
-
-
- Initializes a new with serialized data.
-
- The object that holds the serialized data.
- The contextual information about the source or destination.
-
-
-
- Gets an HRESULT error code if one is available, zero otherwise.
-
-
-
-
- Gets the name associated with the script engine instance.
-
-
-
-
- Gets a detailed error message if one is available, null otherwise.
-
-
-
-
- Gets a value that indicates whether the exception represents a fatal error.
-
-
-
-
- Gets a value that indicates whether script code execution had started before the current exception was thrown.
-
-
-
-
- Gets the script exception that caused the current exception to be thrown, or null if one was not specified.
-
-
-
-
- Returns a string that represents the current exception.
-
- A string that represents the current exception.
-
-
-
- Populates a with the data needed to serialize the target object.
-
- The to populate with data.
- The destination (see ) for this serialization.
-
-
-
- The exception that is thrown when script execution is interrupted by the host.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new with the specified error message.
-
- The error message.
-
-
-
- Initializes a new with the specified error message and nested exception.
-
- The error message.
- The exception that caused the current exception to be thrown.
-
-
-
- Initializes a new with serialized data.
-
- The object that holds the serialized data.
- The contextual information about the source or destination.
-
-
-
- Gets an HRESULT error code if one is available, zero otherwise.
-
-
-
-
- Gets the name associated with the script engine instance.
-
-
-
-
- Gets a detailed error message if one is available, null otherwise.
-
-
-
-
- Gets a value that indicates whether the exception represents a fatal error.
-
-
-
-
- Gets a value that indicates whether script code execution had started before the current exception was thrown.
-
-
-
-
- Gets the script exception that caused the current exception to be thrown, or null if one was not specified.
-
-
-
-
- Returns a string that represents the current exception.
-
- A string that represents the current exception.
-
-
-
- Populates a with the data needed to serialize the target object.
-
- The to populate with data.
- The destination (see ) for this serialization.
-
-
-
- Defines options for exposing type members to script code.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that the field, property, or method return value is not to be restricted to
- its declared type.
-
-
-
-
- Specifies that the field, property, or method return value is to be marshaled with full
- .NET type information even if it is null. Note that such a value will always
- fail equality comparison with JavaScript's
- null,
- VBScript's
- Nothing,
- and other similar values. Instead, use or
- to perform such a comparison.
-
-
-
-
- Specifies how the target type member is to be exposed to script code. This extended version
- supports additional options.
-
-
- This attribute is applicable to events, fields, methods, and properties.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new instance with the specified name.
-
- The name that script code will use to access the target type member.
-
-
-
- Initializes a new instance with the specified script access setting.
-
- The script access setting for the target type member.
-
-
-
- Initializes a new instance with the specified name and script access setting.
-
- The name that script code will use to access the target type member.
- The script access setting for the target type member.
-
-
-
- Initializes a new instance with the specified script options.
-
- The script options for the target type member.
-
-
-
- Initializes a new instance with the specified name and script options.
-
- The name that script code will use to access the target type member.
- The script options for the target type member.
-
-
-
- Initializes a new instance with the specified script access setting and script options.
-
- The script access setting for the target type member.
- The script options for the target type member.
-
-
-
- Initializes a new instance with the specified name, script access setting, and script options.
-
- The name that script code will use to access the target type member.
- The script access setting for the target type member.
- The script options for the target type member.
-
-
-
- Gets or sets the name that script code will use to access the target type member.
-
-
- 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.
-
-
-
-
- Gets or sets the script options for the target type member.
-
-
-
-
- Represents a script object.
-
-
-
-
-
- Gets the script engine that owns the object.
-
-
-
-
- Gets the value of a named script object property.
-
- The name of the property to get.
- Optional arguments for property retrieval.
- The value of the specified property.
-
-
-
- Sets the value of a named script object property.
-
- The name of the property to set.
- An array containing optional arguments and the new property value.
-
- The array must contain at least one element. The new
- property value must be the last element of the array.
-
-
-
-
- Removes a named script object property.
-
- The name of the property to remove.
- True if the property was removed successfully, false otherwise.
-
-
-
- Enumerates the script object's property names.
-
-
-
-
- Gets or sets the value of a named script object property.
-
- The name of the property to get or set.
- Optional arguments for property access.
- The value of the specified property.
-
-
-
- Gets the value of an indexed script object property.
-
- The index of the property to get.
- The value of the specified property.
-
-
-
- Sets the value of an indexed script object property.
-
- The index of the property to set.
- The new property value.
-
-
-
- Removes an indexed script object property.
-
- The index of the property to remove.
- True if the property was removed successfully, false otherwise.
-
-
-
- Enumerates the script object's property indices.
-
-
-
-
- Gets or sets the value of an indexed script object property.
-
- The index of the property to get or set.
- The value of the specified property.
-
-
-
- Invokes the script object.
-
- True to invoke the object as a constructor, false otherwise.
- Optional arguments for object invocation.
- The invocation result value.
-
-
-
- Invokes a script object method.
-
- The name of the method to invoke.
- Optional arguments for method invocation.
- The invocation result value.
-
-
-
- Specifies how the target type member is to be exposed to script code.
-
-
- This attribute is applicable to events, fields, methods, properties, and nested types.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new instance with the specified script access setting.
-
- The script access setting for the target type member.
-
-
-
- Gets the script access setting for the target type member.
-
-
-
-
- Provides an in-memory implementation for a text document.
-
-
-
-
- Initializes a new instance.
-
- A structure containing meta-information for the document.
- A string containing the document's contents.
-
-
-
- Gets a structure containing meta-information for the document.
-
-
-
-
- Gets a stream that provides read access to the document.
-
-
- The implementation of this property returns a
- instance.
-
-
-
-
- Gets the document's character encoding.
-
-
- instances return for this property.
-
-
-
-
- Defines caching options for V8 script compilation.
-
-
-
-
- Specifies that no cache data is to be generated or consumed during V8 script
- compilation. This option results in the most efficient script compilation when no cache
- data is available.
-
-
-
-
- Selects parser caching. Parser cache data is smaller and less expensive to generate
- than code cache data, but it is less effective at accelerating recompilation.
-
-
-
-
- Selects code caching. Code cache data is larger and more expensive to generate than
- parser cache data, but it is more effective at accelerating recompilation.
-
-
-
-
- Represents a V8 CPU profile.
-
-
-
-
- Gets the profile's name.
-
-
-
-
- Gets the profile's starting timestamp in microseconds.
-
-
- The timestamp specifies an offset relative to an unspecified moment in the past. All
- timestamps within the profile are relative to the same moment.
-
-
-
-
- Gets the profile's ending timestamp in microseconds.
-
-
- The timestamp specifies an offset relative to an unspecified moment in the past. All
- timestamps within the profile are relative to the same moment.
-
-
-
-
- Gets the root node of the profile's call tree.
-
-
-
-
- Gets the profile's sample collection.
-
-
- This property returns null if the profile contains no samples.
-
-
-
-
- Returns a JSON representation of the profile.
-
-
- See the
- V8 Inspector JSON Protocol
- for schema details.
-
- A JSON representation of the profile in V8 Inspector format.
-
-
-
- Writes a JSON representation of the profile to the given text writer.
-
- The text writer to which to write the profile.
-
- See the
- V8 Inspector JSON Protocol
- for schema details.
-
-
-
-
- Represents a node in a V8 CPU profile's call tree.
-
-
-
-
- Gets the node's numeric identifier.
-
-
- This value is unique within the profile.
-
-
-
-
- Gets the numeric identifier of the document containing the node's script function.
-
-
-
-
- Gets the name or URL of the document containing the node's script function.
-
-
-
-
- Gets the name of the node's script function.
-
-
-
-
- Gets the 1-based line number of the start of the node's script function.
-
-
- A value of zero indicates that no line number is available.
-
-
-
-
-
- Gets the 1-based column number of the start of the node's script function.
-
-
- A value of zero indicates that no column number is available.
-
-
-
-
-
- Gets the node's hit count.
-
-
- This value represents the number of times the CPU profiler observed the node's
- script function at the top of the call stack.
-
-
-
-
- Gets an optional string describing the reason why the node's script function was not optimized.
-
-
-
-
- Gets the node's hit line collection.
-
-
- This property returns null if the node contains no hit lines.
-
-
-
-
- Gets the node's child node collection.
-
-
- This property returns null if the node has no child nodes.
-
-
-
-
- Represents a script line observed by the V8 CPU profiler.
-
-
-
-
- Gets the 1-based line number.
-
-
-
-
- Gets the hit count for the script line.
-
-
- This value represents the number of times the CPU profiler observed the current
- script line at the top of the call stack.
-
-
-
-
- Represents a V8 CPU profile sample.
-
-
-
-
- Gets the sample's node within the profile's call tree.
-
-
-
-
- Gets the sample's timestamp in microseconds.
-
-
- The timestamp specifies an offset relative to an unspecified moment in the past. All
- timestamps within the profile are relative to the same moment.
-
-
-
-
- Defines options for creating a V8 CPU profile.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that automatic sample collection is to be enabled.
-
-
-
-
- Contains memory usage information for a V8 runtime.
-
-
-
-
- Gets the total heap size in bytes.
-
-
-
-
- Gets the total executable heap size in bytes.
-
-
-
-
- Gets the total physical memory size in bytes.
-
-
-
-
- Gets the used heap size in bytes.
-
-
-
-
- Gets the heap size limit in bytes.
-
-
-
-
- Represents a compiled script that can be executed multiple times without recompilation.
-
-
-
-
- Gets the document name associated with the compiled script.
-
-
-
-
- Gets the document meta-information for the compiled script.
-
-
-
-
- Releases all resources used by the compiled script.
-
-
- Call Dispose() when you are finished using the compiled script. Dispose()
- leaves the compiled script in an unusable state. After calling Dispose(), you
- must release all references to the compiled script so the garbage collector can reclaim
- the memory that the compiled script was occupying.
-
-
-
-
- Specifies resource constraints for a V8 runtime.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets or sets the maximum size of the new object heap in
- MiB.
-
-
- For maximum compatibility with hosts that predate an inadvertent breaking change in
- ClearScript 5.4.1, values greater than 1048576
- (1 TiB) are assumed to be in
- bytes rather than MiB. For example, the values 16 and 16777216 both specify a limit
- of 16 MiB.
-
-
-
-
- Gets or sets the maximum size of the old object heap in
- MiB.
-
-
- For maximum compatibility with hosts that predate an inadvertent breaking change in
- ClearScript 5.4.1, values greater than 1048576
- (1 TiB) are assumed to be in
- bytes rather than MiB. For example, the values 16 and 16777216 both specify a limit
- of 16 MiB.
-
-
-
-
- Gets or sets the maximum size of the executable code heap in
- MiB.
-
-
- For maximum compatibility with hosts that predate an inadvertent breaking change in
- ClearScript 5.4.1, values greater than 1048576
- (1 TiB) are assumed to be in
- bytes rather than MiB. For example, the values 16 and 16777216 both specify a limit
- of 16 MiB.
-
-
-
-
- Gets or sets the maximum size of the young object heap in
- MiB.
-
-
- For maximum compatibility with hosts that predate an inadvertent breaking change in
- ClearScript 5.4.1, values greater than 1048576
- (1 TiB) are assumed to be in
- bytes rather than MiB. For example, the values 16 and 16777216 both specify a limit
- of 16 MiB.
-
-
-
-
- Represents an instance of the V8 runtime.
-
-
-
-
- Initializes a new V8 runtime instance.
-
-
-
-
- Initializes a new V8 runtime instance with the specified 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.
-
-
-
- Initializes a new V8 runtime instance with the specified resource constraints.
-
- Resource constraints for the instance.
-
-
-
- Initializes a new V8 runtime instance with the specified name and resource constraints.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the instance.
-
-
-
- Initializes a new V8 runtime instance with the specified options.
-
- A value that selects options for the operation.
-
-
-
- Initializes a new V8 runtime instance with the specified options and debug port.
-
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
-
-
- Initializes a new V8 runtime instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
-
-
- Initializes a new V8 runtime instance with the specified name, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
-
-
- Initializes a new V8 runtime instance with the specified resource constraints and options.
-
- Resource constraints for the instance.
- A value that selects options for the operation.
-
-
-
- Initializes a new V8 runtime instance with the specified resource constraints, options, and debug port.
-
- Resource constraints for the instance.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
-
-
- Initializes a new V8 runtime instance with the specified name, resource constraints, and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the instance.
- A value that selects options for the operation.
-
-
-
- Initializes a new V8 runtime instance with the specified name, resource constraints, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the instance.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
-
-
- Gets the name associated with the V8 runtime instance.
-
-
-
-
- Enables or disables script code formatting.
-
-
- When this property is set to true, the V8 runtime 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.
-
-
-
-
- Gets or sets a soft limit for the size of the V8 runtime's heap.
-
-
-
- This property is specified in bytes. When it is set to the default value, heap size
- monitoring is disabled, and scripts with memory leaks or excessive memory usage
- can cause unrecoverable errors and process termination.
-
-
- A V8 runtime unconditionally terminates the process when it exceeds its resource
- constraints (see ). This property enables external
- heap size monitoring that can prevent termination in some scenarios. To be effective,
- it should be set to a value that is significantly lower than
- . Note that enabling heap size
- monitoring results in slower script execution.
-
-
- Exceeding this limit causes the V8 runtime to interrupt script execution and throw an
- exception. To re-enable script execution, set this property to a new value.
-
-
-
-
-
- Gets or sets the minimum time interval between consecutive heap size samples.
-
-
- This property is effective only when heap size monitoring is enabled (see
- ).
-
-
-
-
- Gets or sets the maximum amount by which the stack is permitted to grow during script execution.
-
-
-
- This property is specified in bytes. When it is set to the default value, no stack
- usage limit is enforced, and scripts with unchecked recursion or other excessive stack
- usage can cause unrecoverable errors and process termination.
-
-
- Note that the V8 runtime does not monitor stack usage while a host call is in progress.
- Monitoring is resumed when control returns to the runtime.
-
-
-
-
-
- Gets or sets the V8 runtime's document settings.
-
-
-
-
- Creates a new V8 script engine instance.
-
- A new V8 script engine instance.
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
-
-
- Creates a new V8 script engine instance with the specified 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.
- A new V8 script engine instance.
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
-
-
- Creates a new V8 script engine instance with the specified options.
-
- A value that selects options for the operation.
- A new V8 script engine instance.
-
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
- V8 supports one script debugger per runtime. If script debugging has been enabled in
- the current runtime, additional script engine instances cannot disable it or change its
- TCP port, nor can they enable script debugging on a different port.
-
-
-
-
-
- Creates a new V8 script engine instance with the specified options and debug port.
-
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
- A new V8 script engine instance.
-
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
- V8 supports one script debugger per runtime. If script debugging has been enabled in
- the current runtime, additional script engine instances cannot disable it or change its
- TCP port, nor can they enable script debugging on a different port.
-
-
-
-
-
- Creates a new V8 script engine instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
- A new V8 script engine instance.
-
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
- V8 supports one script debugger per runtime. If script debugging has been enabled in
- the current runtime, additional script engine instances cannot disable it or change its
- TCP port, nor can they enable script debugging on a different port.
-
-
-
-
-
- Creates a new V8 script engine instance with the specified name, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
- A new V8 script engine instance.
-
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
- V8 supports one script debugger per runtime. If script debugging has been enabled in
- the current runtime, additional script engine instances cannot disable it or change its
- TCP port, nor can they enable script debugging on a different port.
-
-
-
-
-
- Creates a compiled script.
-
- The script code to compile.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Creates a compiled script with an associated document name.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Creates a compiled script with the specified document meta-information.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Creates a compiled script, generating cache data for accelerated recompilation.
-
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
-
- Creates a compiled script with an associated document name, generating cache data for accelerated recompilation.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
-
- Creates a compiled script with the specified document meta-information, generating cache data for accelerated recompilation.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
-
- Creates a compiled script, consuming previously generated cache data.
-
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Creates a compiled script with an associated document name, consuming previously generated cache data.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Creates a compiled script with the specified document meta-information, consuming previously generated cache data.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Loads and compiles a script document.
-
- A string specifying the document to be loaded and compiled.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a document with the specified category.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a document with the specified category and context callback.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a script document, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a document with the specified category, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a document with the specified category and context callback, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a script document, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Loads and compiles a document with the specified category, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Loads and compiles a document with the specified category and context callback, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Returns memory usage information.
-
- A object containing memory usage information.
-
-
-
- Performs garbage collection.
-
- True to perform exhaustive garbage collection, false to favor speed over completeness.
-
-
-
- Begins collecting a new CPU profile.
-
- A name for the profile.
- True if the profile was created successfully, false otherwise.
-
- A V8 runtime can collect multiple CPU profiles simultaneously.
-
-
-
-
- Begins collecting a new CPU profile with the specified options.
-
- A name for the profile.
- Options for creating the profile.
- True if the profile was created successfully, false otherwise.
-
- A V8 runtime can collect multiple CPU profiles simultaneously.
-
-
-
-
- Completes and returns a CPU profile.
-
- The name of the profile.
- The profile if it was found and completed successfully, null otherwise.
-
- An empty argument selects the most recently created CPU profile.
-
-
-
-
- Collects a sample in all CPU profiles active in the V8 runtime.
-
-
-
-
- Gets or sets the time interval between automatic CPU profile samples, in microseconds.
-
-
- Assigning this property has no effect on CPU profiles already active in the V8 runtime.
- The default value is 1000.
-
-
-
-
- Releases all resources used by the V8 runtime.
-
-
- Call Dispose() when you are finished using the V8 runtime. Dispose()
- leaves the V8 runtime in an unusable state. After calling Dispose(), you must
- release all references to the V8 runtime so the garbage collector can reclaim the
- memory that the V8 runtime was occupying.
-
-
-
-
- Defines options for initializing a new V8 runtime instance.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that script debugging features are to be enabled.
-
-
-
-
- Specifies that remote script debugging is to be enabled. This option is ignored if
- is not specified.
-
-
-
-
- Specifies that
- dynamic module imports
- are to be enabled. This is an experimental feature and may be removed in a future release.
-
-
-
-
- Defines options for initializing a new V8 JavaScript engine instance.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that script debugging features are to be enabled.
-
-
-
-
- Specifies that support for behavior is to be
- disabled. This option yields a significant performance benefit for global item access.
-
-
-
-
- Specifies that remote script debugging is to be enabled. This option is ignored if
- is not specified.
-
-
-
-
- Specifies that the script engine is to wait for a debugger connection and schedule a
- pause before executing the first line of application script code. This option is
- ignored if is not specified.
-
-
-
-
- Specifies that the script engine is to perform automatic conversion between
- .NET objects and JavaScript
- Date
- objects. This conversion is bidirectional and lossy. A DateTime object
- constructed from a JavaScript Date object always represents a Coordinated
- Universal Timestamp (UTC) and has its property set to
- .
-
-
-
-
- Specifies that
- dynamic module imports
- are to be enabled. This is an experimental feature and may be removed in a future release.
-
-
-
-
- Specifies that long integers with values greater than
- Number.MAX_SAFE_INTEGER
- or less than
- Number.MIN_SAFE_INTEGER
- are to be marshaled as
- BigInt.
- This option is ignored if is specified.
-
-
-
-
- Specifies that all long integers are to be marshaled as
- BigInt.
-
-
-
-
- Specifies that the script engine is to perform automatic conversion between
- .NET objects and JavaScript
- promises.
- This conversion is bidirectional and lossy. A Task object constructed from a
- JavaScript promise always has a result type of .
-
-
-
-
- Represents an instance of the V8 JavaScript engine.
-
-
- Unlike instances, V8ScriptEngine instances do not have
- thread affinity. The underlying script engine is not thread-safe, however, so this class
- uses internal locks to automatically serialize all script code execution for a given
- instance. Script delegates and event handlers are invoked on the calling thread without
- marshaling.
-
-
-
-
- Initializes a new V8 script engine instance.
-
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified 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.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified resource constraints.
-
- Resource constraints for the V8 runtime (see remarks).
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name and resource constraints.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the V8 runtime (see remarks).
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified options.
-
- A value that selects options for the operation.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified options and debug port.
-
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified resource constraints and options.
-
- Resource constraints for the V8 runtime (see remarks).
- A value that selects options for the operation.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified resource constraints, options, and debug port.
-
- Resource constraints for the V8 runtime (see remarks).
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name, resource constraints, and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the V8 runtime (see remarks).
- A value that selects options for the operation.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name, resource constraints, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the V8 runtime (see remarks).
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Gets or sets a soft limit for the size of the V8 runtime's heap.
-
-
-
- This property is specified in bytes. When it is set to the default value, heap size
- monitoring is disabled, and scripts with memory leaks or excessive memory usage
- can cause unrecoverable errors and process termination.
-
-
- A V8 runtime unconditionally terminates the process when it exceeds its resource
- constraints (see ). This property enables external
- heap size monitoring that can prevent termination in some scenarios. To be effective,
- it should be set to a value that is significantly lower than
- . Note that enabling heap size
- monitoring results in slower script execution.
-
-
- Exceeding this limit causes the V8 runtime to interrupt script execution and throw an
- exception. To re-enable script execution, set this property to a new value.
-
-
-
-
-
- Gets or sets the minimum time interval between consecutive heap size samples.
-
-
- This property is effective only when heap size monitoring is enabled (see
- ).
-
-
-
-
- Gets or sets the maximum amount by which the V8 runtime is permitted to grow the stack during script execution.
-
-
-
- This property is specified in bytes. When it is set to the default value, no stack
- usage limit is enforced, and scripts with unchecked recursion or other excessive stack
- usage can cause unrecoverable errors and process termination.
-
-
- Note that the V8 runtime does not monitor stack usage while a host call is in progress.
- Monitoring is resumed when control returns to the runtime.
-
-
-
-
-
- Enables or disables instance method enumeration.
-
-
- By default, a host object's instance methods are exposed as enumerable properties.
- Setting this property to true causes instance methods to be excluded from
- property enumeration. This affects all host objects exposed in the current script
- engine. Note that instance methods remain both retrievable and invocable regardless of
- this property's value.
-
-
-
-
- Enables or disables extension method enumeration.
-
-
-
- By default, all exposed extension methods appear as enumerable properties of all host
- objects, regardless of type. Setting this property to true causes extension
- methods to be excluded from property enumeration. This affects all host objects exposed
- in the current script engine. Note that extension methods remain both retrievable and
- invocable regardless of this property's value.
-
-
- This property has no effect if is set
- to true.
-
-
-
-
-
- Creates a compiled script.
-
- The script code to compile.
- A compiled script that can be executed multiple times without recompilation.
-
-
-
- Creates a compiled script with an associated document name.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- A compiled script that can be executed multiple times without recompilation.
-
-
-
- Creates a compiled script with the specified document meta-information.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- A compiled script that can be executed multiple times without recompilation.
-
-
-
- Creates a compiled script, generating cache data for accelerated recompilation.
-
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed multiple times without recompilation.
-
- The generated cache data can be stored externally and is usable in other V8 script
- engines and application processes.
-
-
-
-
-
- Creates a compiled script with an associated document name, generating cache data for accelerated recompilation.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed multiple times without recompilation.
-
- The generated cache data can be stored externally and is usable in other V8 script
- engines and application processes.
-
-
-
-
-
- Creates a compiled script with the specified document meta-information, generating cache data for accelerated recompilation.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed multiple times without recompilation.
-
- The generated cache data can be stored externally and is usable in other V8 script
- engines and application processes.
-
-
-
-
-
- Creates a compiled script, consuming previously generated cache data.
-
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed multiple times without recompilation.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Creates a compiled script with an associated document name, consuming previously generated cache data.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed multiple times without recompilation.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Creates a compiled script with an associated document name, consuming previously generated cache data.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed multiple times without recompilation.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Loads and compiles a script document.
-
- A string specifying the document to be loaded and compiled.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a document with the specified category.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a document with the specified category and context callback.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a script document, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a document with the specified category, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a document with the specified category and context callback, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a script document, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Loads and compiles a document with the specified category, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Loads and compiles a document with the specified category and context callback, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Evaluates a compiled script.
-
- The compiled script to evaluate.
- The result value.
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
- Executes a compiled script.
-
- The compiled script to execute.
-
- This method is similar to with the exception that it
- does not marshal a result value to the host. It can provide a performance advantage
- when the result value is not needed.
-
-
-
-
- Returns memory usage information for the V8 runtime.
-
- A object containing memory usage information for the V8 runtime.
-
-
-
- Begins collecting a new CPU profile.
-
- A name for the profile.
- True if the profile was created successfully, false otherwise.
-
- A V8 script engine can collect multiple CPU profiles simultaneously.
-
-
-
-
- Begins collecting a new CPU profile with the specified options.
-
- A name for the profile.
- Options for creating the profile.
- True if the profile was created successfully, false otherwise.
-
- A V8 script engine can collect multiple CPU profiles simultaneously.
-
-
-
-
- Completes and returns a CPU profile.
-
- The name of the profile.
- The profile if it was found and completed successfully, null otherwise.
-
- An empty argument selects the most recently created CPU profile.
-
-
-
-
- Collects a sample in all CPU profiles active in the V8 runtime.
-
-
-
-
- Gets or sets the time interval between automatic CPU profile samples, in microseconds.
-
-
- Assigning this property has no effect on CPU profiles already active in the V8 runtime.
- The default value is 1000.
-
-
-
-
- Gets the script engine's recommended file name extension for script files.
-
-
- instances return "js" for this property.
-
-
-
-
- Allows the host to access script resources directly.
-
-
- 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.
-
-
-
-
- Executes script code as a command.
-
- The script command to execute.
- The command output.
-
-
- This method is similar to 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.
-
-
- The version of this method attempts to use
- toString
- to convert the return value.
-
-
-
-
-
- Gets a string representation of the script call stack.
-
- The script call stack formatted as a string.
-
- 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.
-
-
-
-
- Interrupts script execution and causes the script engine to throw an exception.
-
-
- This method can be called safely from any thread.
-
-
-
-
- Performs garbage collection.
-
- True to perform exhaustive garbage collection, false to favor speed over completeness.
-
-
-
- Releases the unmanaged resources used by the script engine and optionally releases the managed resources.
-
- True to release both managed and unmanaged resources; false to release only unmanaged resources.
-
- This method is called by the public method and the
- Finalize method.
- invokes the protected Dispose(Boolean)
- method with the parameter set to true.
- Finalize invokes Dispose(Boolean) with
- set to false.
-
-
-
-
- Allows Windows Script engines to display dialogs within the host's user interface.
-
-
-
-
-
- Gets the handle of an owner window for displaying dialogs on behalf of script code.
-
-
-
-
- Enables or disables the host's modeless dialogs.
-
- True to enable the host's modeless dialogs, false otherwise.
-
-
-
- Represents a Windows Script object.
-
-
-
-
- Provides access to the underlying unmanaged COM object.
-
- An object that represents the underlying unmanaged COM object.
-
-
-
- Represents an empty object reference.
-
-
- When passed to a Windows Script engine, an instance of this class is marshaled as an empty
- variant of type VT_DISPATCH. VBScript interprets this as the special object
- reference
- Nothing.
- In JScript it appears as a value that is equal to, but not strictly equal to,
- undefined.
-
-
-
-
- The sole instance of the class.
-
-
-
-
- Returns a string that represents the current object.
-
- A string that represents the current object.
-
- The version of this method returns "[nothing]".
-
-
-
-
- Defines options for initializing a new Windows Script engine instance.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that script debugging features are to be enabled.
-
-
-
-
- Specifies that Just-In-Timestamp script debugging is to be enabled. This option is ignored
- if is not specified.
-
-
-
-
- Specifies that smart source document management is to be disabled. This option is
- ignored if is not specified.
-
-
-
-
- Specifies that script language features that enhance standards compliance are to be
- enabled. This option only affects .
-
-
-
-
- Specifies that null is to be marshaled as a variant of type VT_DISPATCH.
- This option does not affect field, property, or method return values declared as
- , , nullable , or nullable
- numeric types.
-
-
-
-
- Specifies that values are to be marshaled as variants of type
- VT_CY.
-
-
-
-
- Specifies that managed arrays that are passed or returned to script code are to be
- converted to script arrays and marshaled as variants of type VT_ARRAY. In
- VBScript these objects are the native array type. JScript code can use the
- VBArray
- object to access them.
-
-
-
-
- When is specified, the ClearScript library uses
- virtual method table patching to support JScript-specific
- IDispatchEx
- extensions that otherwise interfere with some host object functionality. Virtual method
- table patching is a very low-level mechanism with global effect. This option specifies
- that virtual method table patching is not to be enabled on behalf of the current
- instance.
-
-
-
-
- Specifies that values are to be marshaled as variants of type
- VT_DATE. In VBScript these objects are the native date-time type. JScript code
- can pass them to the
- Date
- constructor for property access.
-
-
-
-
- Represents an instance of the JScript engine.
-
-
-
-
- Initializes a new JScript engine instance.
-
-
-
-
- Initializes a new JScript engine instance with the specified 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.
-
-
-
- Initializes a new JScript engine instance with the specified options.
-
- A value that selects options for the operation.
-
-
-
- Initializes a new JScript engine instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
-
-
- Initializes a new JScript engine instance with the specified programmatic
- identifier, name, and options.
-
- The programmatic identifier (ProgID) of the JScript engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Initializes a new JScript engine instance with the specified programmatic
- identifier, name, list of supported file name extensions, and options.
-
- The programmatic identifier (ProgID) of the JScript engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A semicolon-delimited list of supported file name extensions.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Gets the script engine's recommended file name extension for script files.
-
-
- instances return "js" for this property.
-
-
-
-
- Executes script code as a command.
-
- The script command to execute.
- The command output.
-
-
- This method is similar to 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.
-
-
- The version of this method attempts to use
- toString
- to convert the return value.
-
-
-
-
-
- Provides the base implementation for all Windows Script engines.
-
-
- Each Windows Script engine instance has thread affinity and is bound to a
- during instantiation. Attempting to execute script code on a
- different thread results in an exception. Script delegates and event handlers are marshaled
- synchronously onto the correct thread.
-
-
-
-
- Initializes a new Windows Script engine instance.
-
- The programmatic identifier (ProgID) of the Windows Script engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Initializes a new Windows Script engine instance with the specified list of supported file name extensions.
-
- The programmatic identifier (ProgID) of the Windows Script engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A semicolon-delimited list of supported file name extensions.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Gets the associated with the current script engine.
-
-
-
-
- Determines whether the calling thread has access to the current script engine.
-
- True if the calling thread has access to the current script engine, false otherwise.
-
-
-
- Enforces that the calling thread has access to the current script engine.
-
-
-
-
- Gets or sets an interface that supports the display of dialogs on behalf of script code.
-
-
-
-
- Allows the host to access script resources directly.
-
-
- 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.
-
-
-
-
- Gets a string representation of the script call stack.
-
- The script call stack formatted as a string.
-
-
- 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.
-
-
- The version of this method returns the empty string
- if script debugging features have not been enabled for the instance.
-
-
-
-
-
- Interrupts script execution and causes the script engine to throw an exception.
-
-
- This method can be called safely from any thread.
-
-
-
-
- Performs garbage collection.
-
- True to perform exhaustive garbage collection, false to favor speed over completeness.
-
-
-
- Releases the unmanaged resources used by the script engine and optionally releases the managed resources.
-
- True to release both managed and unmanaged resources; false to release only unmanaged resources.
-
- This method is called by the public method and the
- Finalize method.
- invokes the protected Dispose(Boolean)
- method with the parameter set to true.
- Finalize invokes Dispose(Boolean) with
- set to false.
-
-
-
-
- Represents an instance of the VBScript engine.
-
-
-
-
- Initializes a new VBScript engine instance.
-
-
-
-
- Initializes a new VBScript engine instance with the specified 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.
-
-
-
- Initializes a new VBScript engine instance with the specified options.
-
- A value that selects options for the operation.
-
-
-
- Initializes a new VBScript engine instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
-
-
- Initializes a new VBScript engine instance with the specified programmatic
- identifier, name, and options.
-
- The programmatic identifier (ProgID) of the VBScript engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Initializes a new VBScript engine instance with the specified programmatic
- identifier, name, list of supported file name extensions, and options.
-
- The programmatic identifier (ProgID) of the VBScript engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A semicolon-delimited list of supported file name extensions.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Gets the script engine's recommended file name extension for script files.
-
-
- instances return "vbs" for this property.
-
-
-
-
- Executes script code as a command.
-
- The script command to execute.
- The command output.
-
-
- This method is similar to 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.
-
-
- The version of this method supports both expressions and
- statements. If the specified command begins with "eval " (not case-sensitive), the
- engine executes the remainder as an expression and attempts to use
- CStr
- to convert the result value. Otherwise, it executes the command as a statement and does
- not return a value.
-
-
-
-
-
- Provides the base implementation for all script engines.
-
-
-
-
- Initializes a new script engine instance.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
-
-
-
- Initializes a new script engine instance with the specified list of supported file name extensions.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A semicolon-delimited list of supported file name extensions.
-
-
-
- Gets the name associated with the script engine instance.
-
-
-
-
- Gets the script engine that is invoking a host member on the current thread.
-
-
- 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
- null.
-
-
-
-
- Gets the script engine's recommended file name extension for script files.
-
-
-
-
- Allows script code to access non-public host resources.
-
-
- 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.
-
-
-
-
- Gets or sets the default script access setting for all members of exposed objects.
-
-
- Use , , 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.
-
-
-
-
- Enables or disables access restrictions for anonymous types.
-
-
- Anonymous types are
- internal
- 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 , 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 true.
-
-
-
-
- Controls whether host objects provide access to the static members of their exposed types to script code.
-
-
-
-
- Enables or disables script code formatting.
-
-
- When this property is set to true, 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.
-
-
-
-
- Controls whether script code is permitted to use reflection.
-
-
- When this property is set to true, script code running in the current script
- engine is permitted to use reflection. This affects
- Object.GetType(),
- Exception.GetType(),
- Delegate.Method,
- and .
- By default, any attempt to invoke these members from script code results in an
- exception.
-
-
-
-
- Enables or disables type restriction for field, property, and method return values.
-
-
- When this property is set to true, 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 true is not recommended.
-
-
-
-
-
- Enables or disables type restriction for array and list elements retrieved by index.
-
-
- 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 true to restore the exemption if you have older script code
- that depends on it.
-
-
-
-
-
- Enables or disables null wrapping for field, property, and method return values.
-
-
- When this property is set to true, all field, property, and method return values
- are marshaled with full .NET type information even if they are null. Note that
- such values will always fail equality comparison with JavaScript's
- null,
- VBScript's
- Nothing,
- and other similar values. Instead, use or
- to perform such a comparison.
-
-
-
-
-
-
- Enables or disables the use of reflection-based method binding as a fallback.
-
-
- When this property is set to true, 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.
-
-
-
-
- Enables or disables automatic host variable tunneling for by-reference arguments to script functions and delegates.
-
-
- When this property is set to true, 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.
-
-
-
-
-
- Gets or sets the engine's undefined import value.
-
-
- Some script languages support one or more special non-null 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
- .
-
-
-
-
- Gets or sets a callback that can be used to halt script execution.
-
-
- During script execution the script engine periodically invokes this callback to
- determine whether it should continue. If the callback returns false, the script
- engine terminates script execution and throws an exception.
-
-
-
-
- Allows the host to access script resources directly.
-
-
- 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.
-
-
-
-
- Gets or sets the script engine's document settings.
-
-
-
-
- Exposes a host object to script code.
-
- A name for the new global script item that will represent the object.
- The object to expose.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Exposes a host object to script code with the specified options.
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The object to expose.
-
-
- 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.
-
-
-
-
- Member Type
- Exposed As
- Remarks
-
- -
- Constructor
- N/A
-
- To invoke a constructor from script code, call
- HostFunctions.newObj(T).
-
-
- -
- Property/Field
- Property
- N/A
-
- -
- Method
- Method
-
- Overloaded host methods are merged into a single script-callable method. At
- runtime the correct host method is selected based on the argument types.
-
-
- -
- Generic Method
- Method
-
- 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
- host type objects
- at the beginning of the argument list. Doing so for methods that do not require
- explicit type arguments is optional.
-
-
- -
- Extension Method
- Method
-
- Extension methods are available if the type that implements them has been
- exposed in the current script engine.
-
-
- -
- Indexer
- Property
-
- Indexers appear as properties named "Item" that accept one or more index values
- as arguments. In addition, objects that implement 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
- Array.GetValue
- and
- Array.SetValue
- instead.
-
-
- -
- Event
- Property
-
- Events are exposed as read-only properties of type .
-
-
-
-
-
-
-
-
- Exposes a host object to script code with the specified type restriction.
-
- The type whose members are to be made accessible from script code.
- A name for the new global script item that will represent the object.
- The object to expose.
-
-
- This method can be used to restrict script access to the members of a particular
- interface or base class.
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Exposes a host object to script code with the specified type restriction and options.
-
- The type whose members are to be made accessible from script code.
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The object to expose.
-
-
- This method can be used to restrict script access to the members of a particular
- interface or base class.
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Creates a COM/ActiveX object and exposes it to script code. The registered class is
- specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the object.
- The programmatic identifier (ProgID) of the registered class to instantiate.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Creates a COM/ActiveX object on the specified server and exposes it to script code. The
- registered class is specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the object.
- The programmatic identifier (ProgID) of the registered class to instantiate.
- The name of the server on which to create the object.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Creates a COM/ActiveX object and exposes it to script code with the specified options.
- The registered class is specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The programmatic identifier (ProgID) of the registered class to instantiate.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- 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).
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The programmatic identifier (ProgID) of the registered class to instantiate.
- The name of the server on which to create the object.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Creates a COM/ActiveX object and exposes it to script code. The registered class is
- specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the object.
- The class identifier (CLSID) of the registered class to instantiate.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Creates a COM/ActiveX object on the specified server and exposes it to script code. The
- registered class is specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the object.
- The class identifier (CLSID) of the registered class to instantiate.
- The name of the server on which to create the object.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Creates a COM/ActiveX object and exposes it to script code with the specified options.
- The registered class is specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The class identifier (CLSID) of the registered class to instantiate.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- 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).
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The class identifier (CLSID) of the registered class to instantiate.
- The name of the server on which to create the object.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Exposes a host type to script code with a default name.
-
- The type to expose.
-
-
- This method uses 's name for the new global script item that
- will represent it.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code with a default name and the specified options.
-
- A value that selects options for the operation.
- The type to expose.
-
-
- This method uses 's name for the new global script item that
- will represent it.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code.
-
- A name for the new global script item that will represent the type.
- The type to expose.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code with the specified options.
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The type to expose.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code. The type is specified by name.
-
- A name for the new global script item that will represent the type.
- The fully qualified name of the type to expose.
- Optional generic type arguments.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code with the specified options. The type is specified by name.
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The fully qualified name of the type to expose.
- Optional generic type arguments.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code. The type is specified by type name and assembly name.
-
- A name for the new global script item that will represent the type.
- The fully qualified name of the type to expose.
- The name of the assembly that contains the type to expose.
- Optional generic type arguments.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code with the specified options. The type is specified by
- type name and assembly name.
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The fully qualified name of the type to expose.
- The name of the assembly that contains the type to expose.
- Optional generic type arguments.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Imports a COM/ActiveX type and exposes it to script code. The registered class is
- specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the type.
- The programmatic identifier (ProgID) of the registered class to import.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Imports a COM/ActiveX type from the specified server and exposes it to script code. The
- registered class is specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the type.
- The programmatic identifier (ProgID) of the registered class to import.
- The name of the server from which to import the type.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Imports a COM/ActiveX type and exposes it to script code with the specified options.
- The registered class is specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The programmatic identifier (ProgID) of the registered class to import.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- 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).
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The programmatic identifier (ProgID) of the registered class to import.
- The name of the server from which to import the type.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Imports a COM/ActiveX type and exposes it to script code. The registered class is
- specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the type.
- The class identifier (CLSID) of the registered class to import.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Imports a COM/ActiveX type from the specified server and exposes it to script code. The
- registered class is specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the type.
- The class identifier (CLSID) of the registered class to import.
- The name of the server from which to import the type.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Imports a COM/ActiveX type and exposes it to script code with the specified options.
- The registered class is specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The class identifier (CLSID) of the registered class to import.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- 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).
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The class identifier (CLSID) of the registered class to import.
- The name of the server from which to import the type.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Executes script code.
-
- The script code to execute.
-
-
- 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.
-
-
- 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.
-
-
-
-
-
- Executes script code with an associated document name.
-
- A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to execute.
-
-
- 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.
-
-
- 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.
-
-
-
-
-
- Executes script code with an associated document name, optionally discarding the document after execution.
-
- A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- True to discard the script document after execution, false otherwise.
- The script code to execute.
-
-
- 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.
-
-
- 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
- .
-
-
-
-
-
- Executes script code with the specified document meta-information.
-
- A structure containing meta-information for the script document.
- The script code to execute.
-
- 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.
-
-
-
-
- Loads and executes a script document.
-
- A string specifying the document to be loaded and executed.
-
- 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.
-
-
-
-
- Loads and executes a document with the specified category.
-
- A string specifying the document to be loaded and executed.
- An optional category for the requested document.
-
- 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.
-
-
-
-
- Loads and executes a document with the specified category and context callback.
-
- A string specifying the document to be loaded and executed.
- An optional category for the requested document.
- An optional context callback for the requested document.
-
- 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.
-
-
-
-
- Executes script code as a command.
-
- The script command to execute.
- The command output.
-
- This method is similar to 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.
-
-
-
-
- Evaluates script code.
-
- The script code to evaluate.
- The result value.
-
-
- 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.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Evaluates script code with an associated document name.
-
- A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to evaluate.
- The result value.
-
-
- 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.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Evaluates script code with an associated document name, optionally discarding the document after execution.
-
- A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- True to discard the script document after execution, false otherwise.
- The script code to evaluate.
- The result value.
-
-
- 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.
-
-
- 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
- .
-
-
- The following table summarizes the types of result values that script code can return.
-
-
- Type
- Returned As
- Remarks
-
- -
- String
- System.String
- N/A
-
- -
- Boolean
- System.Boolean
- N/A
-
- -
- Number
- System.Int32 or System.Double
-
- Other numeric types are possible. The exact conversions between script and .NET
- numeric types are defined by the script engine.
-
-
- -
- Null Reference
- null
- N/A
-
- -
- Undefined
-
-
- This represents JavaScript's
- undefined,
- VBScript's
- Empty,
- etc.
-
-
- -
- Void
-
-
- This is returned when script code forwards the result of a host method that returns no value.
-
-
- -
- Host Object
- Native .NET type
-
- 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.
-
-
- -
- Script Object
-
-
- This includes all native script objects that have no .NET representation. C#'s
- dynamic
- keyword provides a convenient way to access them.
-
-
- -
- Other
- Unspecified
-
- 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.
-
-
-
-
-
-
-
-
- Evaluates script code with the specified document meta-information.
-
- A structure containing meta-information for the script document.
- The script code to evaluate.
- The result value.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Loads and evaluates a script document.
-
- A string specifying the document to be loaded and evaluated.
- The result value.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Loads and evaluates a document with the specified category.
-
- A string specifying the document to be loaded and evaluated.
- An optional category for the requested document.
- The result value.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Loads and evaluates a document with the specified category and context callback.
-
- A string specifying the document to be loaded and evaluated.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The result value.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Invokes a global function or procedure.
-
- The name of the global function or procedure to invoke.
- Optional invocation arguments.
- The return value if a function was invoked, an undefined value otherwise.
-
-
-
- Gets a string representation of the script call stack.
-
- The script call stack formatted as a string.
-
- 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.
-
-
-
-
- Interrupts script execution and causes the script engine to throw an exception.
-
-
- This method can be called safely from any thread.
-
-
-
-
- Performs garbage collection.
-
- True to perform exhaustive garbage collection, false to favor speed over completeness.
-
-
-
- Releases all resources used by the script engine.
-
-
- Call Dispose() when you are finished using the script engine. Dispose()
- leaves the script engine in an unusable state. After calling Dispose(), you must
- release all references to the script engine so the garbage collector can reclaim the
- memory that the script engine was occupying.
-
-
-
-
- Releases the unmanaged resources used by the script engine and optionally releases the managed resources.
-
- True to release both managed and unmanaged resources; false to release only unmanaged resources.
-
- This method is called by the public method and the
- Finalize method. invokes the
- protected Dispose(Boolean) method with the
- parameter set to true. Finalize invokes
- Dispose(Boolean) with set to false.
-
-
-
-
- Releases unmanaged resources and performs other cleanup operations before the script engine is reclaimed by garbage collection.
-
-
- This method overrides . Application code should not
- call this method; an object's Finalize() method is automatically invoked during
- garbage collection, unless finalization by the garbage collector has been disabled by a
- call to .
-
-
-
-
- Represents a scriptable collection of host types.
-
-
- 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 Acme.Gadgets.Button host type. Use
- AddHostObject to expose a host
- type collection to script code.
-
-
-
-
- Initializes a new host type collection.
-
-
-
-
- Initializes a new host type collection with types from one or more assemblies.
-
- The assemblies that contain the types with which to initialize the collection.
-
-
-
- Initializes a new host type collection with types from one or more assemblies. The
- assemblies are specified by name.
-
- The names of the assemblies that contain the types with which to initialize the collection.
-
-
-
- Initializes a new host type collection with selected types from one or more assemblies.
-
- A filter for selecting the types to add.
- The assemblies that contain the types with which to initialize the collection.
-
-
-
- Initializes a new host type collection with selected types from one or more assemblies.
- The assemblies are specified by name.
-
- A filter for selecting the types to add.
- The names of the assemblies that contain the types with which to initialize the collection.
-
-
-
- Adds types from an assembly to a host type collection.
-
- The assembly that contains the types to add.
-
-
-
- Adds types from an assembly to a host type collection. The assembly is specified by name.
-
- The name of the assembly that contains the types to add.
-
-
-
- Adds selected types from an assembly to a host type collection.
-
- The assembly that contains the types to add.
- A filter for selecting the types to add.
-
-
-
- Adds selected types from an assembly to a host type collection. The assembly is
- specified by name.
-
- The name of the assembly that contains the types to add.
- A filter for selecting the types to add.
-
-
-
- Adds a type to a host type collection.
-
- The type to add.
-
-
-
- Adds a type to a host type collection. The type is specified by name.
-
- The fully qualified name of the type to add.
- Optional generic type arguments.
-
-
-
- Adds a type to a host type collection. The type is specified by type name and assembly name.
-
- The fully qualified name of the type to add.
- The name of the assembly that contains the type to add.
- Optional generic type arguments.
-
-
-
- Locates a namespace within a host type collection.
-
- The full name of the namespace to locate.
- The node that represents the namespace if it was found, null otherwise.
-
-
-
- Provides optional script-callable utility functions.
-
-
- Use AddHostObject to expose a
- HostFunctions instance to script code. Each instance can only be exposed in one
- script engine.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Creates an empty host object.
-
- A new empty host object.
-
- 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 interface.
-
-
- The following code creates an empty host object and adds several properties to it.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var item = host.newObj();
- item.label = "Widget";
- item.weight = 123.45;
-
-
-
-
-
- Creates a host object of the specified type. This version is invoked if the specified
- type can be used as a type argument.
-
- The type of object to create.
- Optional constructor arguments.
- A new host object of the specified type.
-
-
- This function is provided for script languages that do not support external
- instantiation. It is overloaded with and
- selected at runtime if can be used as a type argument.
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see
- AddHostObject.
-
-
-
- The following code imports the class, creates an
- instance using the
- Random(Int32)
- constructor, and calls the method.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var RandomT = host.type("System.Random");
- var random = host.newObj(RandomT, 100);
- var value = random.NextDouble();
-
-
-
-
-
-
- Creates a host object of the specified type. This version is invoked if the specified
- type cannot be used as a type argument.
-
- The type of object to create.
- Optional constructor arguments.
- A new host object of the specified type.
-
-
- This function is provided for script languages that do not support external
- instantiation. It is overloaded with and selected at runtime if
- cannot be used as a type argument. Note that this applies
- to some host types that support instantiation, such as certain COM/ActiveX types.
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see
- AddHostObject.
-
-
-
-
-
- Performs dynamic instantiation.
-
- The dynamic host object that provides the instantiation operation to perform.
- Optional instantiation arguments.
- The result of the operation, which is usually a new dynamic host object.
-
- This function is provided for script languages that do not support external
- instantiation.
-
-
-
-
- Creates a host array with the specified element type.
-
- The element type of the array to create.
- One or more integers representing the array dimension lengths.
- A new host array with the specified element type.
-
- For information about the mapping between host members and script-callable properties
- and methods, see
- AddHostObject.
-
-
- The following code creates a 5x3 host array of strings.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var StringT = host.type("System.String");
- var array = host.newArr(StringT, 5, 3);
-
-
-
-
-
-
-
- Creates a host array with as the element type.
-
- One or more integers representing the array dimension lengths.
- A new host array with as the element type.
-
- For information about the mapping between host members and script-callable properties
- and methods, see
- AddHostObject.
-
-
-
-
-
- Creates a host variable of the specified type.
-
- The type of variable to create.
- An optional initial value for the variable.
- A new host variable of the specified type.
-
-
- 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:
-
-
-
-
- Property
- Access
- Description
-
- -
- value
- read-write
- The current value of the host variable.
-
- -
- out
- read-only
- A reference to the host variable that can be passed as an out argument.
-
- -
- ref
- read-only
- A reference to the host variable that can be passed as a ref argument.
-
-
-
-
-
- The following code demonstrates using a host variable to invoke a method with an
- out parameter.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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);
-
-
-
-
-
-
- Creates a delegate that invokes a script function.
-
- The type of delegate to create.
- The script function for which to create a delegate.
- A new delegate that invokes the specified script function.
-
- If the delegate signature includes parameters passed by reference, the corresponding
- arguments to the script function will be host variables.
- The script function can set the value of an output argument by assigning the
- corresponding host variable's value property.
-
-
- The following code demonstrates delegating a callback to a script function.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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; }));
-
-
-
-
-
-
-
- Creates a delegate that invokes a script function and returns no value.
-
- The number of arguments to pass to the script function.
- The script function for which to create a delegate.
- A new delegate that invokes the specified script function and returns no value.
-
- This function creates a delegate that accepts arguments and
- returns no value. The type of all parameters is . Such a
- delegate is often useful in strongly typed contexts because of
- contravariance.
-
-
- The following code demonstrates delegating a callback to a script function.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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); }));
-
-
-
-
-
-
-
- Creates a delegate that invokes a script function and returns a value of the specified type.
-
- The return value type.
- The number of arguments to pass to the script function.
- The script function for which to create a delegate.
- A new delegate that invokes the specified script function and returns a value of the specified type.
-
- This function creates a delegate that accepts arguments and
- returns a value of the specified type. The type of all parameters is
- . Such a delegate is often useful in strongly typed contexts
- because of
- contravariance.
-
-
- The following code demonstrates delegating a callback to a script function.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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();
-
-
-
-
-
-
-
-
- Creates a delegate that invokes a script function and returns its result value.
-
- The number of arguments to pass to the script function.
- The script function for which to create a delegate.
- A new delegate that invokes the specified script function and returns its result value.
-
-
- This function creates a delegate that accepts arguments and
- returns the result of invoking . The type of all
- parameters and the return value is . Such a delegate is
- often useful in strongly typed contexts because of
- contravariance.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
-
- Gets the for the specified host type. This version is invoked
- if the specified object can be used as a type argument.
-
- The host type for which to get the .
- The for the specified host type.
-
-
- This function is similar to C#'s
- typeof
- operator. It is overloaded with and selected at runtime if
- can be used as a type argument.
-
-
- This function throws an exception if the script engine's
- property is set to false.
-
-
-
- The following code retrieves the assembly-qualified name of a host type.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var StringT = host.type("System.String");
- var name = host.typeOf(StringT).AssemblyQualifiedName;
-
-
-
-
-
-
- Gets the for the specified host type. This version is invoked
- if the specified object cannot be used as a type argument.
-
- The host type for which to get the .
- The for the specified host type.
-
-
- This function is similar to C#'s
- typeof
- operator. It is overloaded with and selected at runtime if
- cannot be used as a type argument. Note that this applies to
- some host types; examples are static types and overloaded generic type groups.
-
-
- This function throws an exception if the script engine's
- property is set to false.
-
-
-
- The following code retrieves the assembly-qualified name of a host type.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var ConsoleT = host.type("System.Console");
- var name = host.typeOf(ConsoleT).AssemblyQualifiedName;
-
-
-
-
-
-
- Determines whether an object is compatible with the specified host type.
-
- The host type with which to test for compatibility.
- The object to test for compatibility with the specified host type.
- True if is compatible with the specified type, false otherwise.
-
- This function is similar to C#'s
- is
- operator.
-
-
- The following code defines a function that determines whether an object implements
- .
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- function isComparable(value)
- {
- var IComparableT = host.type("System.IComparable");
- return host.isType(IComparableT, value);
- }
-
-
-
-
-
-
- Casts an object to the specified host type, returning null if the cast fails.
-
- The host type to which to cast .
- The object to cast to the specified host type.
- The result of the cast if successful, null otherwise.
-
- This function is similar to C#'s
- as
- operator.
-
-
- The following code defines a function that disposes an object if it implements
- .
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- function dispose(value)
- {
- var IDisposableT = host.type("System.IDisposable");
- var disposable = host.asType(IDisposableT, value);
- if (disposable) {
- disposable.Dispose();
- }
- }
-
-
-
-
-
-
- Casts an object to the specified host type.
-
- The host type to which to cast .
- The object to cast to the specified host type.
- The result of the cast.
-
- If the cast fails, this function throws an exception.
-
-
- The following code casts a floating-point value to a 32-bit integer.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var Int32T = host.type("System.Int32");
- var intValue = host.cast(Int32T, 12.5);
-
-
-
-
-
-
- Determines whether an object is a host type. This version is invoked if the specified
- object cannot be used as a type argument.
-
- The object to test.
- True if is a host type, false otherwise.
-
- This function is overloaded with and selected at runtime if
- cannot be used as a type argument. Note that this applies to
- some host types; examples are static types and overloaded generic type groups.
-
-
-
-
- Determines whether an object is a host type. This version is invoked if the specified
- object can be used as a type argument.
-
- The host type (ignored).
- True.
-
- This function is overloaded with and selected at
- runtime if can be used as a type argument. Because type
- arguments are always host types, this method ignores its type argument and always
- returns true.
-
-
-
-
- Determines whether the specified value is null.
-
- The value to test.
- True if is null, false otherwise.
-
- Use this function to test field, property, and method return values when null
- result wrapping is in effect (see
- and
- ).
-
-
-
-
-
-
- Creates a strongly typed flag set.
-
- The type of flag set to create.
- The flags to include in the flag set.
- A strongly typed flag set containing the specified flags.
-
- This function throws an exception if is not a flag set type.
-
-
- The following code demonstrates using a strongly typed flag set.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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&y=2");
- // extract URI components
- var components = host.flags(UriComponentsT.Scheme, UriComponentsT.Host, UriComponentsT.Path);
- var result = uri.GetComponents(components, UriFormatT.Unescaped);
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Gets the value of a property in a dynamic host object that implements .
-
- The dynamic host object that contains the property to get.
- The name of the property to get.
- The value of the specified property.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Sets a property value in a dynamic host object that implements .
-
- The dynamic host object that contains the property to set.
- The name of the property to set.
- The new value of the specified property.
- The result of the operation, which is usually the value assigned to the specified property.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Removes a property from a dynamic host object that implements .
-
- The dynamic host object that contains the property to remove.
- The name of the property to remove.
- True if the property was found and removed, false otherwise.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Gets the value of a property in a dynamic host object that implements .
-
- The dynamic host object that contains the property to get.
- The name of the property to get.
- The value of the specified property.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Sets a property value in a dynamic host object that implements .
-
- The dynamic host object that contains the property to set.
- The name of the property to set.
- The new value of the specified property.
- The result of the operation, which is usually the value assigned to the specified property.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Removes a property from a dynamic host object that implements .
-
- The dynamic host object that contains the property to remove.
- The name of the property to remove.
- True if the property was found and removed, false otherwise.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Gets the value of an element in a dynamic host object that implements .
-
- The dynamic host object that contains the element to get.
- One or more indices that identify the element to get.
- The value of the specified element.
-
- This function is provided for script languages that do not support general indexing.
-
-
-
-
- Sets an element value in a dynamic host object that implements .
-
- The dynamic host object that contains the element to set.
- The new value of the element.
- One or more indices that identify the element to set.
- The result of the operation, which is usually the value assigned to the specified element.
-
- This function is provided for script languages that do not support general indexing.
-
-
-
-
- Removes an element from a dynamic host object that implements .
-
- The dynamic host object that contains the element to remove.
- One or more indices that identify the element to remove.
- True if the element was found and removed, false otherwise.
-
- This function is provided for script languages that do not support general indexing.
-
-
-
-
- Casts a dynamic host object to its static type.
-
- The object to cast to its static type.
- The specified object in its static type form, stripped of its dynamic members.
-
- A dynamic host object that implements 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.
-
-
-
-
- Allows script code to handle host exceptions.
-
- A script function that invokes one or more host methods or properties.
- A script function to invoke if throws an exception.
- An optional script function that performs cleanup for the operation.
- True if completed successfully, false if it threw an exception that was handled by .
-
- This function uses a try-catch-finally statement to invoke
- . If an exception is thrown, it is caught and passed to
- for analysis. If returns
- false, the exception is rethrown. Regardless of the outcome,
- , if specified, is invoked as a final step before the
- function exits.
-
-
- The following code demonstrates handling host exceptions in script code.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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();
- }
- );
-
-
-
-
-
-
-
- Provides optional script-callable utility functions. This extended version allows script
- code to import host types.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Imports a host type by name.
-
- The fully qualified name of the host type to import.
- Optional generic type arguments.
- The imported host type.
-
-
- 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 refers
- to a generic type, the corresponding object will be invocable with type arguments to
- yield a specific type.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see
- AddHostObject.
-
-
-
- The following code imports the
- Dictionary
- generic type and uses it to create a string dictionary.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var DictT = host.type("System.Collections.Generic.Dictionary");
- var StringT = host.type("System.String");
- var dict = host.newObj(DictT(StringT, StringT));
-
- Another way to create a string dictionary is to import the specific type directly.
-
- var StringT = host.type("System.String");
- var StringDictT = host.type("System.Collections.Generic.Dictionary", StringT, StringT);
- var dict = host.newObj(StringDictT);
-
-
-
-
-
- Imports a host type by name from the specified assembly.
-
- The fully qualified name of the host type to import.
- The name of the assembly that contains the host type to import.
- Optional generic type arguments.
- The imported host type.
-
-
- 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 refers
- to a generic type, the corresponding object will be invocable with type arguments to
- yield a specific type.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see
- AddHostObject.
-
-
-
- The following code imports and uses it to create
- an array of strings.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- 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();
-
-
-
-
-
-
- Imports the host type for the specified .
-
- The that specifies the host type to import.
- The imported host type.
-
-
- 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 refers
- to a generic type, the corresponding object will be invocable with type arguments to
- yield a specific type.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see
- AddHostObject.
-
-
-
-
-
- Imports the host array type for the specified element type.
-
- The element type for the host array type to import.
- The number of dimensions for the host array type to import.
- The imported host array type.
-
-
-
- Imports types from one or more host assemblies.
-
- The names of the assemblies that contain the types to import.
- The imported host type collection.
-
- 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 Acme.Gadgets.Button host type.
-
-
- The following code imports types from several core assemblies and uses
- to create an array of integers.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var clr = host.lib("mscorlib", "System", "System.Core");
- var array = clr.System.Linq.Enumerable.Range(0, 5).ToArray();
-
-
-
-
-
- Imports types from one or more host assemblies and merges them with an existing host type collection.
-
- The host type collection with which to merge types from the specified assemblies.
- The names of the assemblies that contain the types to import.
- A host type collection: if it is not null, a new host type collection otherwise.
-
- 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 Acme.Gadgets.Button host type.
-
-
- The following code imports types from several core assemblies and uses
- to create an array of integers.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var clr = host.lib("mscorlib");
- host.lib(clr, "System");
- host.lib(clr, "System.Core");
- var array = clr.System.Linq.Enumerable.Range(0, 5).ToArray();
-
-
-
-
-
- Imports a COM/ActiveX type.
-
- The programmatic identifier (ProgID) of the registered class to import.
- An optional name that specifies the server from which to import the type.
- The imported COM/ActiveX type.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- The following code imports the
- Scripting.Dictionary
- class and uses it to create and populate an instance.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var DictT = host.comType('Scripting.Dictionary');
- var dict = host.newObj(DictT);
- dict.Add('foo', 123);
- dict.Add('bar', 456.789);
- dict.Add('baz', 'abc');
-
-
-
-
-
- Creates a COM/ActiveX object of the specified type.
-
- The programmatic identifier (ProgID) of the registered class to instantiate.
- An optional name that specifies the server on which to create the object.
- A new COM/ActiveX object of the specified type.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- The following code creates a
- Scripting.FileSystemObject
- instance and uses it to list the drives on the local machine.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var fso = host.newComObj('Scripting.FileSystemObject');
- var ConsoleT = host.type('System.Console');
- for (en = fso.Drives.GetEnumerator(); en.MoveNext();) {
- ConsoleT.WriteLine(en.Current.Path);
- }
-
-
-
-
-
- Imports enumerations defined within or referenced from a COM/ActiveX type library.
-
- The imported type whose parent library is to be searched for relevant enumerations.
- An instance of the representative type.
- An optional host type collection with which to merge the imported enumerations.
- A host type collection: if it is not null, a new host type collection otherwise.
-
-
-
- Represents a host event source.
-
- The event handler delegate type.
-
-
-
- Connects the host event source to the specified script handler function.
-
- The script function that will handle the event.
- An that represents the connection.
-
-
-
- Represents a connection between a host event source and a script handler function.
-
- The event handler delegate type.
-
-
-
- Disconnects the host event source from the script handler function.
-
-
-
-
- Represents a scriptable collection of named properties.
-
-
- If an object that implements this interface is added to a script engine (see
- AddHostObject), 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.
-
-
-
-
- Provides a default implementation.
-
-
-
-
- Initializes a new writable .
-
-
-
-
- Initializes a new .
-
- True to make the read-only, false to make it writable.
-
- The host can modify a read-only by calling
- SetPropertyNoCheck,
- RemovePropertyNoCheck, or
- ClearNoCheck.
-
-
-
-
- Sets a property value without checking whether the is read-only.
-
- The name of the property to set.
- The property value.
-
- This operation is never exposed to script code.
-
-
-
-
- Removes a property without checking whether the is read-only.
-
- The name of the property to remove.
- True if the property was found and removed, false otherwise.
-
- This operation is never exposed to script code.
-
-
-
-
- Removes all properties without checking whether the is read-only.
-
-
- This operation is never exposed to script code.
-
-
-
-
- Determines whether the contains a property with the specified name.
-
- The name of the property to locate.
- True if the contains a property with the specified name, false otherwise.
-
-
-
- Adds a property to the .
-
- The name of the property to add.
- The property value.
-
-
-
- Removes a property from the .
-
- The name of the property to remove.
- True if the property was successfully found and removed, false otherwise.
-
-
-
- Looks up a property value in the .
-
- The name of the property to locate.
- The property value if the property was found, null otherwise.
- True if the property was found, false otherwise.
-
-
-
- Gets or sets a property value in the .
-
- The name of the property to get or set.
- The property value.
-
-
-
- Gets a collection of property names from the .
-
-
-
-
- Gets a collection of property values from the .
-
-
-
-
- Occurs when a property is added or replaced, or when the collection is cleared.
-
-
-
-
- Represents an undefined value.
-
-
- Some script languages support one or more special non-null values that represent
- nonexistent, missing, unknown, or undefined data. The ClearScript library maps such values
- to instances of this class.
-
-
-
-
- The sole instance of the class.
-
-
-
-
- Returns a string that represents the current object.
-
- A string that represents the current object.
-
- The version of this method returns "[undefined]".
-
-
-
-
- Represents the result of a host method that returns no value.
-
-
- 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# void method),
- the ClearScript library provides an instance of this class as a dummy return value.
-
-
-
-
diff --git a/lib/ClearScript/lib/netcoreapp3.1/ClearScript.dll b/lib/ClearScript/lib/netcoreapp3.1/ClearScript.dll
deleted file mode 100644
index 10df2aa1..00000000
Binary files a/lib/ClearScript/lib/netcoreapp3.1/ClearScript.dll and /dev/null differ
diff --git a/lib/ClearScript/lib/netcoreapp3.1/ClearScript.xml b/lib/ClearScript/lib/netcoreapp3.1/ClearScript.xml
deleted file mode 100644
index a48b9779..00000000
--- a/lib/ClearScript/lib/netcoreapp3.1/ClearScript.xml
+++ /dev/null
@@ -1,6084 +0,0 @@
-
-
-
- ClearScript
-
-
-
-
- Represents a method that specifies to a script engine whether script execution should continue.
-
- True to continue script execution, false to interrupt it.
-
-
-
-
- Specifies defaults for how type members are to be exposed to script code.
-
-
- This attribute is applicable to classes, enums, interfaces, structs, and assemblies. Use
- , , or
- to override it for individual type members.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new instance with the specified default script access setting.
-
- The default script access setting for type members.
-
-
-
- Gets the default script access setting for type members.
-
-
-
-
- Provides an abstract representation of a document.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets a structure containing meta-information for the document.
-
-
-
-
- Gets a stream that provides read access to the document.
-
-
-
-
- Gets the document's character encoding.
-
-
- This property returns null if the document contains binary data or if its
- character encoding is unknown.
-
-
-
-
- Defines document access options.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that documents may be loaded from the file system.
-
-
-
-
- Specifies that documents may be downloaded from the Web.
-
-
-
-
- Specifies that documents may be loaded from any location.
-
-
-
-
- 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.
-
-
-
-
- Represents a document category.
-
-
-
-
- Gets or sets the maximum cache size for the document category.
-
-
-
- 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.
-
-
- Each script engine or runtime maintains private caches for supported document
- categories. These are distinct from the caches used by document loaders.
-
-
-
-
-
-
- Gets the document category for normal scripts.
-
-
-
-
- Represents a method that retrieves context information for a document.
-
- A structure containing meta-information for the document.
- A property collection containing context information for the document.
-
-
-
- Defines document attributes.
-
-
-
-
- Indicates that no attributes are present.
-
-
-
-
- Indicates that the document is temporary and can be discarded after use. Only Windows
- Script engines honor this attribute.
-
-
-
-
- Contains meta-information for a document.
-
-
-
-
- Initializes a new structure with the specified document name.
-
- The document name.
-
-
-
- Initializes a new structure with the specified document URI.
-
- The document URI.
-
-
-
- Gets the document's name.
-
-
- 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.
-
-
-
-
- Gets the document's URI.
-
-
- This property returns null if a URI was not specified at instantiation time.
-
-
-
-
- Gets or sets an optional source map URI for the document.
-
-
-
-
- Gets or sets the document's category.
-
-
-
-
- Gets or sets optional document attributes.
-
-
-
-
- Gets or sets an optional context callback for the document.
-
-
-
- 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.
-
-
- Use
- import.meta
- to access the context information of a JavaScript
- module. In a module, use module.meta.
-
-
-
-
-
- Represents a method to be called when a document is loaded.
-
- A structure containing meta-information for the document.
-
- The callback can modify the document meta-information by specifying or overriding any of
- its mutable properties.
-
-
-
-
- Represents a document loader.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets the default document loader.
-
-
-
-
- Gets or sets the maximum size of the document loader's cache.
-
-
- 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.
-
-
-
-
-
- Loads a document.
-
- Document access settings for the operation.
- An optional structure containing meta-information for the requesting document.
- A string specifying the document to be loaded.
- An optional category for the requested document.
- An optional context callback for the requested document.
- A instance that represents the loaded document.
-
- A loaded document must have an absolute URI. Once a
- load operation has completed successfully, subsequent requests that resolve to the same
- URI are expected to return the same reference, although loaders
- are not required to manage document caches of unlimited size.
-
-
-
-
- Loads a document asynchronously.
-
- Document access settings for the operation.
- An optional structure containing meta-information for the requesting document.
- A string specifying the document to be loaded.
- An optional category for the requested document.
- An optional context callback for the requested document.
- A task that represents the asynchronous operation. Upon completion, the task's result is a instance that represents the loaded document.
-
- A loaded document must have an absolute URI. Once a
- load operation has completed successfully, subsequent requests that resolve to the same
- URI are expected to return the same reference, although loaders
- are not required to manage document caches of unlimited size.
-
-
-
-
- Discards all cached documents.
-
-
-
-
- Represents a document access configuration.
-
-
- This class can be extended to accommodate custom document loaders.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets or sets a document loader.
-
-
-
-
- Gets or sets document access options.
-
-
-
-
- Gets or sets a semicolon-delimited list of directory URLs or paths to search for documents.
-
-
-
-
- Gets or sets a semicolon-delimited list of supported file name extensions.
-
-
-
-
- Gets or set an optional method to be called when a document is loaded.
-
-
-
-
- Gets or sets an optional document context callback.
-
-
-
- This property is used as an alternative to .
- 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.
-
-
- Use
- import.meta
- to access the context information of a JavaScript
- module. In a module, use module.meta.
-
-
-
-
-
- Adds a system document to the configuration.
-
- An identifier for the document.
- A string containing the document's contents.
-
- System documents take precedence over loaded documents. Once this method is invoked,
- document access using this configuration will always map the combination of
- and to the
- specified document, bypassing the configuration's document loader.
-
-
-
-
- Adds a system document with the specified category to the configuration.
-
- An identifier for the document.
- An optional category for the document.
- A string containing the document's contents.
-
- System documents take precedence over loaded documents. Once this method is invoked,
- document access using this configuration will always map the combination of
- and to the specified
- document, bypassing the configuration's document loader.
-
-
-
-
- Adds a system document with the specified category and context callback to the configuration.
-
- An identifier for the document.
- An optional category for the document.
- A string containing the document's contents.
- An optional context callback for the document.
-
- System documents take precedence over loaded documents. Once this method is invoked,
- document access using this configuration will always map the combination of
- and to the specified
- document, bypassing the configuration's document loader.
-
-
-
-
- Adds the specified document as a system document to the configuration.
-
- An identifier for the document.
- The document to be added as a system document.
-
- System documents take precedence over loaded documents. Once this method is invoked,
- document access using this configuration will always map the combination of
- and the specified document's category to the specified
- document, bypassing the configuration's document loader.
-
-
-
-
- Extends for enhanced behavior and performance in a scripting environment.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Determines whether the object has the specified named member.
-
- The member name for which to search.
- True to perform a case-insensitive search, false otherwise.
- True if the named member was found, false otherwise.
-
-
-
- Defines extension methods for use with all script engines.
-
-
-
-
- Converts a type to a host type for use with script code currently running on the
- calling thread.
-
- The type to convert to a host type.
- A host type for use with script code.
-
-
-
- Converts a type to a host type for use with script code running in the specified
- script engine.
-
- The type to convert to a host type.
- The script engine in which the host type will be used.
- A host type for use with script code.
-
-
-
- Converts an object to a host object with the specified type restriction, for use with
- script code currently running on the calling thread.
-
- The type whose members are to be made accessible from script code.
- The object to convert to a host object for use with script code.
- A host object with the specified type restriction.
-
-
-
- Converts an object to a host object with the specified type restriction, for use with
- script code running in the specified script engine.
-
- The type whose members are to be made accessible from script code.
- The object to convert to a host object for use with script code.
- The script engine in which the host object will be used.
- A host object with the specified type restriction.
-
-
-
- Represents a host event source.
-
- The event handler delegate type.
-
-
-
- Connects the host event source to the specified script handler function.
-
- The script function that will handle the event.
- An that represents the connection.
-
-
-
- Represents a connection between a host event source and a script handler function.
-
- The event handler delegate type.
-
-
-
- Disconnects the host event source from the script handler function.
-
-
-
-
- Provides optional script-callable utility functions.
-
-
- Use AddHostObject to expose a
- HostFunctions instance to script code. Each instance can only be exposed in one
- script engine.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Creates an empty host object.
-
- A new empty host object.
-
- 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 interface.
-
-
- The following code creates an empty host object and adds several properties to it.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var item = host.newObj();
- item.label = "Widget";
- item.weight = 123.45;
-
-
-
-
-
- Creates a host object of the specified type. This version is invoked if the specified
- type can be used as a type argument.
-
- The type of object to create.
- Optional constructor arguments.
- A new host object of the specified type.
-
-
- This function is provided for script languages that do not support external
- instantiation. It is overloaded with and
- selected at runtime if can be used as a type argument.
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see
- AddHostObject.
-
-
-
- The following code imports the class, creates an
- instance using the
- Random(Int32)
- constructor, and calls the method.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var RandomT = host.type("System.Random");
- var random = host.newObj(RandomT, 100);
- var value = random.NextDouble();
-
-
-
-
-
-
- Creates a host object of the specified type. This version is invoked if the specified
- type cannot be used as a type argument.
-
- The type of object to create.
- Optional constructor arguments.
- A new host object of the specified type.
-
-
- This function is provided for script languages that do not support external
- instantiation. It is overloaded with and selected at runtime if
- cannot be used as a type argument. Note that this applies
- to some host types that support instantiation, such as certain COM/ActiveX types.
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see
- AddHostObject.
-
-
-
-
-
- Performs dynamic instantiation.
-
- The dynamic host object that provides the instantiation operation to perform.
- Optional instantiation arguments.
- The result of the operation, which is usually a new dynamic host object.
-
- This function is provided for script languages that do not support external
- instantiation.
-
-
-
-
- Creates a host array with the specified element type.
-
- The element type of the array to create.
- One or more integers representing the array dimension lengths.
- A new host array with the specified element type.
-
- For information about the mapping between host members and script-callable properties
- and methods, see
- AddHostObject.
-
-
- The following code creates a 5x3 host array of strings.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var StringT = host.type("System.String");
- var array = host.newArr(StringT, 5, 3);
-
-
-
-
-
-
-
- Creates a host array with as the element type.
-
- One or more integers representing the array dimension lengths.
- A new host array with as the element type.
-
- For information about the mapping between host members and script-callable properties
- and methods, see
- AddHostObject.
-
-
-
-
-
- Creates a host variable of the specified type.
-
- The type of variable to create.
- An optional initial value for the variable.
- A new host variable of the specified type.
-
-
- 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:
-
-
-
-
- Property
- Access
- Description
-
- -
- value
- read-write
- The current value of the host variable.
-
- -
- out
- read-only
- A reference to the host variable that can be passed as an out argument.
-
- -
- ref
- read-only
- A reference to the host variable that can be passed as a ref argument.
-
-
-
-
-
- The following code demonstrates using a host variable to invoke a method with an
- out parameter.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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);
-
-
-
-
-
-
- Creates a delegate that invokes a script function.
-
- The type of delegate to create.
- The script function for which to create a delegate.
- A new delegate that invokes the specified script function.
-
- If the delegate signature includes parameters passed by reference, the corresponding
- arguments to the script function will be host variables.
- The script function can set the value of an output argument by assigning the
- corresponding host variable's value property.
-
-
- The following code demonstrates delegating a callback to a script function.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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; }));
-
-
-
-
-
-
-
- Creates a delegate that invokes a script function and returns no value.
-
- The number of arguments to pass to the script function.
- The script function for which to create a delegate.
- A new delegate that invokes the specified script function and returns no value.
-
- This function creates a delegate that accepts arguments and
- returns no value. The type of all parameters is . Such a
- delegate is often useful in strongly typed contexts because of
- contravariance.
-
-
- The following code demonstrates delegating a callback to a script function.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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); }));
-
-
-
-
-
-
-
- Creates a delegate that invokes a script function and returns a value of the specified type.
-
- The return value type.
- The number of arguments to pass to the script function.
- The script function for which to create a delegate.
- A new delegate that invokes the specified script function and returns a value of the specified type.
-
- This function creates a delegate that accepts arguments and
- returns a value of the specified type. The type of all parameters is
- . Such a delegate is often useful in strongly typed contexts
- because of
- contravariance.
-
-
- The following code demonstrates delegating a callback to a script function.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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();
-
-
-
-
-
-
-
-
- Creates a delegate that invokes a script function and returns its result value.
-
- The number of arguments to pass to the script function.
- The script function for which to create a delegate.
- A new delegate that invokes the specified script function and returns its result value.
-
-
- This function creates a delegate that accepts arguments and
- returns the result of invoking . The type of all
- parameters and the return value is . Such a delegate is
- often useful in strongly typed contexts because of
- contravariance.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
-
- Gets the for the specified host type. This version is invoked
- if the specified object can be used as a type argument.
-
- The host type for which to get the .
- The for the specified host type.
-
-
- This function is similar to C#'s
- typeof
- operator. It is overloaded with and selected at runtime if
- can be used as a type argument.
-
-
- This function throws an exception if the script engine's
- property is set to false.
-
-
-
- The following code retrieves the assembly-qualified name of a host type.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var StringT = host.type("System.String");
- var name = host.typeOf(StringT).AssemblyQualifiedName;
-
-
-
-
-
-
- Gets the for the specified host type. This version is invoked
- if the specified object cannot be used as a type argument.
-
- The host type for which to get the .
- The for the specified host type.
-
-
- This function is similar to C#'s
- typeof
- operator. It is overloaded with and selected at runtime if
- cannot be used as a type argument. Note that this applies to
- some host types; examples are static types and overloaded generic type groups.
-
-
- This function throws an exception if the script engine's
- property is set to false.
-
-
-
- The following code retrieves the assembly-qualified name of a host type.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var ConsoleT = host.type("System.Console");
- var name = host.typeOf(ConsoleT).AssemblyQualifiedName;
-
-
-
-
-
-
- Determines whether an object is compatible with the specified host type.
-
- The host type with which to test for compatibility.
- The object to test for compatibility with the specified host type.
- True if is compatible with the specified type, false otherwise.
-
- This function is similar to C#'s
- is
- operator.
-
-
- The following code defines a function that determines whether an object implements
- .
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- function isComparable(value)
- {
- var IComparableT = host.type("System.IComparable");
- return host.isType(IComparableT, value);
- }
-
-
-
-
-
-
- Casts an object to the specified host type, returning null if the cast fails.
-
- The host type to which to cast .
- The object to cast to the specified host type.
- The result of the cast if successful, null otherwise.
-
- This function is similar to C#'s
- as
- operator.
-
-
- The following code defines a function that disposes an object if it implements
- .
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- function dispose(value)
- {
- var IDisposableT = host.type("System.IDisposable");
- var disposable = host.asType(IDisposableT, value);
- if (disposable) {
- disposable.Dispose();
- }
- }
-
-
-
-
-
-
- Casts an object to the specified host type.
-
- The host type to which to cast .
- The object to cast to the specified host type.
- The result of the cast.
-
- If the cast fails, this function throws an exception.
-
-
- The following code casts a floating-point value to a 32-bit integer.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var Int32T = host.type("System.Int32");
- var intValue = host.cast(Int32T, 12.5);
-
-
-
-
-
-
- Determines whether an object is a host type. This version is invoked if the specified
- object cannot be used as a type argument.
-
- The object to test.
- True if is a host type, false otherwise.
-
- This function is overloaded with and selected at runtime if
- cannot be used as a type argument. Note that this applies to
- some host types; examples are static types and overloaded generic type groups.
-
-
-
-
- Determines whether an object is a host type. This version is invoked if the specified
- object can be used as a type argument.
-
- The host type (ignored).
- True.
-
- This function is overloaded with and selected at
- runtime if can be used as a type argument. Because type
- arguments are always host types, this method ignores its type argument and always
- returns true.
-
-
-
-
- Determines whether the specified value is null.
-
- The value to test.
- True if is null, false otherwise.
-
- Use this function to test field, property, and method return values when null
- result wrapping is in effect (see
- and
- ).
-
-
-
-
-
-
- Creates a strongly typed flag set.
-
- The type of flag set to create.
- The flags to include in the flag set.
- A strongly typed flag set containing the specified flags.
-
- This function throws an exception if is not a flag set type.
-
-
- The following code demonstrates using a strongly typed flag set.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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&y=2");
- // extract URI components
- var components = host.flags(UriComponentsT.Scheme, UriComponentsT.Host, UriComponentsT.Path);
- var result = uri.GetComponents(components, UriFormatT.Unescaped);
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Converts the specified value to a strongly typed instance.
-
- The value to convert.
- An object that can be passed to a parameter of type .
-
- This function converts to and
- packages the result to retain its numeric type across the host-script boundary. It may
- be useful for passing arguments to parameters if the script
- engine does not support that type natively.
-
-
- The following code adds an element of type to a strongly
- typed list.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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));
-
-
-
-
-
-
- Gets the value of a property in a dynamic host object that implements .
-
- The dynamic host object that contains the property to get.
- The name of the property to get.
- The value of the specified property.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Sets a property value in a dynamic host object that implements .
-
- The dynamic host object that contains the property to set.
- The name of the property to set.
- The new value of the specified property.
- The result of the operation, which is usually the value assigned to the specified property.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Removes a property from a dynamic host object that implements .
-
- The dynamic host object that contains the property to remove.
- The name of the property to remove.
- True if the property was found and removed, false otherwise.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Gets the value of a property in a dynamic host object that implements .
-
- The dynamic host object that contains the property to get.
- The name of the property to get.
- The value of the specified property.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Sets a property value in a dynamic host object that implements .
-
- The dynamic host object that contains the property to set.
- The name of the property to set.
- The new value of the specified property.
- The result of the operation, which is usually the value assigned to the specified property.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Removes a property from a dynamic host object that implements .
-
- The dynamic host object that contains the property to remove.
- The name of the property to remove.
- True if the property was found and removed, false otherwise.
-
- This function is provided for script languages that do not support dynamic properties.
-
-
-
-
- Gets the value of an element in a dynamic host object that implements .
-
- The dynamic host object that contains the element to get.
- One or more indices that identify the element to get.
- The value of the specified element.
-
- This function is provided for script languages that do not support general indexing.
-
-
-
-
- Sets an element value in a dynamic host object that implements .
-
- The dynamic host object that contains the element to set.
- The new value of the element.
- One or more indices that identify the element to set.
- The result of the operation, which is usually the value assigned to the specified element.
-
- This function is provided for script languages that do not support general indexing.
-
-
-
-
- Removes an element from a dynamic host object that implements .
-
- The dynamic host object that contains the element to remove.
- One or more indices that identify the element to remove.
- True if the element was found and removed, false otherwise.
-
- This function is provided for script languages that do not support general indexing.
-
-
-
-
- Casts a dynamic host object to its static type.
-
- The object to cast to its static type.
- The specified object in its static type form, stripped of its dynamic members.
-
- A dynamic host object that implements 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.
-
-
-
-
- Allows script code to handle host exceptions.
-
- A script function that invokes one or more host methods or properties.
- A script function to invoke if throws an exception.
- An optional script function that performs cleanup for the operation.
- True if completed successfully, false if it threw an exception that was handled by .
-
- This function uses a try-catch-finally statement to invoke
- . If an exception is thrown, it is caught and passed to
- for analysis. If returns
- false, the exception is rethrown. Regardless of the outcome,
- , if specified, is invoked as a final step before the
- function exits.
-
-
- The following code demonstrates handling host exceptions in script code.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- // 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();
- }
- );
-
-
-
-
-
-
-
- Provides optional script-callable utility functions. This extended version allows script
- code to import host types.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Imports a host type by name.
-
- The fully qualified name of the host type to import.
- Optional generic type arguments.
- The imported host type.
-
-
- 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 refers
- to a generic type, the corresponding object will be invocable with type arguments to
- yield a specific type.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see
- AddHostObject.
-
-
-
- The following code imports the
- Dictionary
- generic type and uses it to create a string dictionary.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var DictT = host.type("System.Collections.Generic.Dictionary");
- var StringT = host.type("System.String");
- var dict = host.newObj(DictT(StringT, StringT));
-
- Another way to create a string dictionary is to import the specific type directly.
-
- var StringT = host.type("System.String");
- var StringDictT = host.type("System.Collections.Generic.Dictionary", StringT, StringT);
- var dict = host.newObj(StringDictT);
-
-
-
-
-
- Imports a host type by name from the specified assembly.
-
- The fully qualified name of the host type to import.
- The name of the assembly that contains the host type to import.
- Optional generic type arguments.
- The imported host type.
-
-
- 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 refers
- to a generic type, the corresponding object will be invocable with type arguments to
- yield a specific type.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see
- AddHostObject.
-
-
-
- The following code imports and uses it to create
- an array of strings.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- 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();
-
-
-
-
-
-
- Imports the host type for the specified .
-
- The that specifies the host type to import.
- The imported host type.
-
-
- 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 refers
- to a generic type, the corresponding object will be invocable with type arguments to
- yield a specific type.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see
- AddHostObject.
-
-
-
-
-
- Imports the host array type for the specified element type.
-
- The element type for the host array type to import.
- The number of dimensions for the host array type to import.
- The imported host array type.
-
-
-
- Imports types from one or more host assemblies.
-
- The names of the assemblies that contain the types to import.
- The imported host type collection.
-
- 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 Acme.Gadgets.Button host type.
-
-
- The following code imports types from several core assemblies and uses
- to create an array of integers.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var clr = host.lib("mscorlib", "System", "System.Core");
- var array = clr.System.Linq.Enumerable.Range(0, 5).ToArray();
-
-
-
-
-
- Imports types from one or more host assemblies and merges them with an existing host type collection.
-
- The host type collection with which to merge types from the specified assemblies.
- The names of the assemblies that contain the types to import.
- A host type collection: if it is not null, a new host type collection otherwise.
-
- 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 Acme.Gadgets.Button host type.
-
-
- The following code imports types from several core assemblies and uses
- to create an array of integers.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var clr = host.lib("mscorlib");
- host.lib(clr, "System");
- host.lib(clr, "System.Core");
- var array = clr.System.Linq.Enumerable.Range(0, 5).ToArray();
-
-
-
-
-
- Imports a COM/ActiveX type.
-
- The programmatic identifier (ProgID) of the registered class to import.
- An optional name that specifies the server from which to import the type.
- The imported COM/ActiveX type.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- The following code imports the
- Scripting.Dictionary
- class and uses it to create and populate an instance.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var DictT = host.comType('Scripting.Dictionary');
- var dict = host.newObj(DictT);
- dict.Add('foo', 123);
- dict.Add('bar', 456.789);
- dict.Add('baz', 'abc');
-
-
-
-
-
- Creates a COM/ActiveX object of the specified type.
-
- The programmatic identifier (ProgID) of the registered class to instantiate.
- An optional name that specifies the server on which to create the object.
- A new COM/ActiveX object of the specified type.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- The following code creates a
- Scripting.FileSystemObject
- instance and uses it to list the drives on the local machine.
- It assumes that an instance of is exposed under
- the name "host"
- (see AddHostObject).
-
- var fso = host.newComObj('Scripting.FileSystemObject');
- var ConsoleT = host.type('System.Console');
- for (en = fso.Drives.GetEnumerator(); en.MoveNext();) {
- ConsoleT.WriteLine(en.Current.Path);
- }
-
-
-
-
-
- Imports enumerations defined within or referenced from a COM/ActiveX type library.
-
- The imported type whose parent library is to be searched for relevant enumerations.
- An instance of the representative type.
- An optional host type collection with which to merge the imported enumerations.
- A host type collection: if it is not null, a new host type collection otherwise.
-
-
-
- Defines options for exposing host resources to script code.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that the host resource's members are to be exposed as global items in the
- script engine's root namespace.
-
-
-
-
- Specifies that the host resource's non-public members are to be exposed.
-
-
-
-
- Specifies that the host resource's dynamic members are not to be exposed. This option
- applies only to objects that implement .
-
-
-
-
- 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 COM-visible
- objects exposed in Windows Script engines.
-
-
-
-
- Defines properties that comprise ClearScript's global configuration.
-
-
-
-
- Enables or disables assembly table usage.
-
-
-
- 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.
-
-
- The assembly table feature is only available on .NET Framework. This property has no
- effect on other platforms.
-
-
-
-
-
- Represents a scriptable collection of host types.
-
-
- 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 Acme.Gadgets.Button host type. Use
- AddHostObject to expose a host
- type collection to script code.
-
-
-
-
- Initializes a new host type collection.
-
-
-
-
- Initializes a new host type collection with types from one or more assemblies.
-
- The assemblies that contain the types with which to initialize the collection.
-
-
-
- Initializes a new host type collection with types from one or more assemblies. The
- assemblies are specified by name.
-
- The names of the assemblies that contain the types with which to initialize the collection.
-
-
-
- Initializes a new host type collection with selected types from one or more assemblies.
-
- A filter for selecting the types to add.
- The assemblies that contain the types with which to initialize the collection.
-
-
-
- Initializes a new host type collection with selected types from one or more assemblies.
- The assemblies are specified by name.
-
- A filter for selecting the types to add.
- The names of the assemblies that contain the types with which to initialize the collection.
-
-
-
- Adds types from an assembly to a host type collection.
-
- The assembly that contains the types to add.
-
-
-
- Adds types from an assembly to a host type collection. The assembly is specified by name.
-
- The name of the assembly that contains the types to add.
-
-
-
- Adds selected types from an assembly to a host type collection.
-
- The assembly that contains the types to add.
- A filter for selecting the types to add.
-
-
-
- Adds selected types from an assembly to a host type collection. The assembly is
- specified by name.
-
- The name of the assembly that contains the types to add.
- A filter for selecting the types to add.
-
-
-
- Adds a type to a host type collection.
-
- The type to add.
-
-
-
- Adds a type to a host type collection. The type is specified by name.
-
- The fully qualified name of the type to add.
- Optional generic type arguments.
-
-
-
- Adds a type to a host type collection. The type is specified by type name and assembly name.
-
- The fully qualified name of the type to add.
- The name of the assembly that contains the type to add.
- Optional generic type arguments.
-
-
-
- Locates a namespace within a host type collection.
-
- The full name of the namespace to locate.
- The node that represents the namespace if it was found, null otherwise.
-
-
-
- Specifies that instances of the target struct are immutable.
-
-
- 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, ,
- , and .
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Defines a method to be called when a host object is exposed to script code.
-
-
-
-
- Notifies the host object that it has been exposed to script code.
-
- The script engine in which the host object was exposed.
-
- 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.
-
-
-
-
- Defines common script engine exception properties.
-
-
-
-
- Gets the error message.
-
-
-
-
- Gets an HRESULT error code if one is available, zero otherwise.
-
-
-
-
- Gets the name associated with the script engine instance.
-
-
-
-
- Gets a detailed error message if one is available, null otherwise.
-
-
-
-
- Gets a value that indicates whether the exception represents a fatal error.
-
-
-
-
- Gets a value that indicates whether script code execution had started before the current exception was thrown.
-
-
-
-
- Gets the script exception that caused the current exception to be thrown, or null if one was not specified.
-
-
-
-
- Gets the host exception that caused the current exception to be thrown, or null if one was not specified.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Represents a JavaScript
- ArrayBuffer.
-
-
-
-
- Gets the size of the ArrayBuffer in bytes.
-
-
-
-
- Creates a byte array containing a copy of the ArrayBuffer's contents.
-
- A new byte array containing a copy of the ArrayBuffer's contents.
-
-
-
- Copies bytes from the ArrayBuffer into the specified byte array.
-
- The offset within the ArrayBuffer of the first byte to copy.
- The maximum number of bytes to copy.
- The byte array into which to copy the bytes.
- The index within at which to store the first copied byte.
- The number of bytes copied.
-
-
-
- Copies bytes from the specified byte array into the ArrayBuffer.
-
- The byte array from which to copy the bytes.
- The index within of the first byte to copy.
- The maximum number of bytes to copy.
- The offset within the ArrayBuffer at which to store the first copied byte.
- The number of bytes copied.
-
-
-
- Defines properties and methods common to all
- ArrayBuffer
- views.
-
-
-
-
- Gets view's underlying ArrayBuffer.
-
-
-
-
- Gets the view's offset within the underlying ArrayBuffer.
-
-
-
-
- Gets the view's size in bytes.
-
-
-
-
- Creates a byte array containing a copy of the view's contents.
-
- A new byte array containing a copy of the view's contents.
-
-
-
- Copies bytes from the view into the specified byte array.
-
- The offset within the view of the first byte to copy.
- The maximum number of bytes to copy.
- The byte array into which to copy the bytes.
- The index within at which to store the first copied byte.
- The number of bytes copied.
-
-
-
- Copies bytes from the specified byte array into the view.
-
- The byte array from which to copy the bytes.
- The index within of the first byte to copy.
- The maximum number of bytes to copy.
- The offset within the view at which to store the first copied byte.
- The number of bytes copied.
-
-
-
- Represents a JavaScript
- DataView.
-
-
-
-
- Defines properties and methods common to all JavaScript
- typed arrays.
-
-
-
-
- Gets the typed array's length.
-
-
-
-
- Represents a JavaScript typed array.
-
- The typed array's element type.
-
-
- The following table lists the specific interfaces implemented by JavaScript typed arrays:
-
-
-
-
- Typed Array
- Interface(s) (C#)
-
- -
- Uint8Array
- ITypedArray<byte>
-
- -
- Uint8ClampedArray
- ITypedArray<byte>
-
- -
- Int8Array
- ITypedArray<sbyte>
-
- -
- Uint16Array
- ITypedArray<ushort> and ITypedArray<char>
-
- -
- Int16Array
- ITypedArray<short>
-
- -
- Uint32Array
- ITypedArray<uint>
-
- -
- Int32Array
- ITypedArray<int>
-
- -
- Float32Array
- ITypedArray<float>
-
- -
- Float64Array
- ITypedArray<double>
-
-
-
-
-
-
-
- Creates an array containing a copy of the typed array's contents.
-
- A new array containing a copy of the typed array's contents.
-
-
-
- Copies elements from the typed array into the specified array.
-
- The index within the typed array of the first element to copy.
- The maximum number of elements to copy.
- The array into which to copy the elements.
- The index within at which to store the first copied element.
- The number of elements copied.
-
-
-
- Copies elements from the specified array into the typed array.
-
- The array from which to copy the elements.
- The index within of the first element to copy.
- The maximum number of elements to copy.
- The index within the typed array at which to store the first copied element.
- The number of elements copied.
-
-
-
- Defines extension methods for use with JavaScript engines.
-
-
-
-
- Converts a instance to a
- promise
- for use with script code currently running on the calling thread.
-
- The task's result type.
- The task to convert to a promise.
- A promise that represents the task's asynchronous operation.
-
-
-
- Converts a instance to a
- promise
- for use with script code running in the specified script engine.
-
- The task's result type.
- The task to convert to a promise.
- The script engine in which the promise will be used.
- A promise that represents the task's asynchronous operation.
-
-
-
- Converts a instance to a
- promise
- for use with script code currently running on the calling thread.
-
- The task to convert to a promise.
- A promise that represents the task's asynchronous operation.
-
-
-
- Converts a instance to a
- promise
- for use with script code running in the specified script engine.
-
- The task to convert to a promise.
- The script engine in which the promise will be used.
- A promise that represents the task's asynchronous operation.
-
-
-
- Converts a
- promise
- to a instance.
-
- The promise to convert to a task.
- A task that represents the promise's asynchronous operation.
-
-
-
- Defines document categories for JavaScript modules.
-
-
-
-
- Gets the document category for standard ECMAScript 6 modules.
-
-
-
-
- Gets the document category for CommonJS modules.
-
-
-
-
- Specifies that script code is to have no access to type members by default.
-
-
- This attribute is applicable to classes, enums, interfaces, structs, and assemblies. Use
- , , or
- 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.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Specifies that script code is to have no access to the target type member.
-
-
- 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.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Represents a scriptable collection of named properties.
-
-
- If an object that implements this interface is added to a script engine (see
- AddHostObject), 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.
-
-
-
-
- Provides a default implementation.
-
-
-
-
- Initializes a new writable .
-
-
-
-
- Initializes a new .
-
- True to make the read-only, false to make it writable.
-
- The host can modify a read-only by calling
- SetPropertyNoCheck,
- RemovePropertyNoCheck, or
- ClearNoCheck.
-
-
-
-
- Sets a property value without checking whether the is read-only.
-
- The name of the property to set.
- The property value.
-
- This operation is never exposed to script code.
-
-
-
-
- Removes a property without checking whether the is read-only.
-
- The name of the property to remove.
- True if the property was found and removed, false otherwise.
-
- This operation is never exposed to script code.
-
-
-
-
- Removes all properties without checking whether the is read-only.
-
-
- This operation is never exposed to script code.
-
-
-
-
- Determines whether the contains a property with the specified name.
-
- The name of the property to locate.
- True if the contains a property with the specified name, false otherwise.
-
-
-
- Adds a property to the .
-
- The name of the property to add.
- The property value.
-
-
-
- Removes a property from the .
-
- The name of the property to remove.
- True if the property was successfully found and removed, false otherwise.
-
-
-
- Looks up a property value in the .
-
- The name of the property to locate.
- The property value if the property was found, null otherwise.
- True if the property was found, false otherwise.
-
-
-
- Gets or sets a property value in the .
-
- The name of the property to get or set.
- The property value.
-
-
-
- Gets a collection of property names from the .
-
-
-
-
- Gets a collection of property values from the .
-
-
-
-
- Occurs when a property is added or replaced, or when the collection is cleared.
-
-
-
-
- Defines script access settings for type members.
-
-
-
-
- Specifies that script code is to have full access to the type member. This is the
- default setting.
-
-
-
-
- Specifies that script code is to have read-only access to the type member. This setting
- only affects fields and writable properties.
-
-
-
-
- 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.
-
-
-
-
- Provides the base implementation for all script engines.
-
-
-
-
- Initializes a new script engine instance.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
-
-
-
- Initializes a new script engine instance with the specified list of supported file name extensions.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A semicolon-delimited list of supported file name extensions.
-
-
-
- Gets the name associated with the script engine instance.
-
-
-
-
- Gets the script engine that is invoking a host member on the current thread.
-
-
- 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
- null.
-
-
-
-
- Gets the script engine's recommended file name extension for script files.
-
-
-
-
- Allows script code to access non-public host resources.
-
-
- 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.
-
-
-
-
- Gets or sets the default script access setting for all members of exposed objects.
-
-
- Use , , 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.
-
-
-
-
- Enables or disables access restrictions for anonymous types.
-
-
- Anonymous types are
- internal
- 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 , 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 true.
-
-
-
-
- Controls whether host objects provide access to the static members of their exposed types to script code.
-
-
-
-
- Enables or disables script code formatting.
-
-
- When this property is set to true, 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.
-
-
-
-
- Controls whether script code is permitted to use reflection.
-
-
- When this property is set to true, script code running in the current script
- engine is permitted to use reflection. This affects
- Object.GetType(),
- Exception.GetType(),
- Delegate.Method,
- and .
- By default, any attempt to invoke these members from script code results in an
- exception.
-
-
-
-
- Enables or disables type restriction for field, property, and method return values.
-
-
- When this property is set to true, 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 true is not recommended.
-
-
-
-
-
- Enables or disables type restriction for array and list elements retrieved by index.
-
-
- 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 true to restore the exemption if you have older script code
- that depends on it.
-
-
-
-
-
- Enables or disables null wrapping for field, property, and method return values.
-
-
- When this property is set to true, all field, property, and method return values
- are marshaled with full .NET type information even if they are null. Note that
- such values will always fail equality comparison with JavaScript's
- null,
- VBScript's
- Nothing,
- and other similar values. Instead, use or
- to perform such a comparison.
-
-
-
-
-
-
- Enables or disables the use of reflection-based method binding as a fallback.
-
-
- When this property is set to true, 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.
-
-
-
-
- Enables or disables automatic host variable tunneling for by-reference arguments to script functions and delegates.
-
-
- When this property is set to true, 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.
-
-
-
-
-
- Gets or sets the engine's undefined import value.
-
-
- Some script languages support one or more special non-null 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
- .
-
-
-
-
- Gets or sets a callback that can be used to halt script execution.
-
-
- During script execution the script engine periodically invokes this callback to
- determine whether it should continue. If the callback returns false, the script
- engine terminates script execution and throws an exception.
-
-
-
-
- Allows the host to access script resources directly.
-
-
- 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.
-
-
-
-
- Gets or sets the script engine's document settings.
-
-
-
-
- Exposes a host object to script code.
-
- A name for the new global script item that will represent the object.
- The object to expose.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Exposes a host object to script code with the specified options.
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The object to expose.
-
-
- 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.
-
-
-
-
- Member Type
- Exposed As
- Remarks
-
- -
- Constructor
- N/A
-
- To invoke a constructor from script code, call
- HostFunctions.newObj(T).
-
-
- -
- Property/Field
- Property
- N/A
-
- -
- Method
- Method
-
- Overloaded host methods are merged into a single script-callable method. At
- runtime the correct host method is selected based on the argument types.
-
-
- -
- Generic Method
- Method
-
- 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
- host type objects
- at the beginning of the argument list. Doing so for methods that do not require
- explicit type arguments is optional.
-
-
- -
- Extension Method
- Method
-
- Extension methods are available if the type that implements them has been
- exposed in the current script engine.
-
-
- -
- Indexer
- Property
-
- Indexers appear as properties named "Item" that accept one or more index values
- as arguments. In addition, objects that implement 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
- Array.GetValue
- and
- Array.SetValue
- instead.
-
-
- -
- Event
- Property
-
- Events are exposed as read-only properties of type .
-
-
-
-
-
-
-
-
- Exposes a host object to script code with the specified type restriction.
-
- The type whose members are to be made accessible from script code.
- A name for the new global script item that will represent the object.
- The object to expose.
-
-
- This method can be used to restrict script access to the members of a particular
- interface or base class.
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Exposes a host object to script code with the specified type restriction and options.
-
- The type whose members are to be made accessible from script code.
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The object to expose.
-
-
- This method can be used to restrict script access to the members of a particular
- interface or base class.
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Creates a COM/ActiveX object and exposes it to script code. The registered class is
- specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the object.
- The programmatic identifier (ProgID) of the registered class to instantiate.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Creates a COM/ActiveX object on the specified server and exposes it to script code. The
- registered class is specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the object.
- The programmatic identifier (ProgID) of the registered class to instantiate.
- The name of the server on which to create the object.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Creates a COM/ActiveX object and exposes it to script code with the specified options.
- The registered class is specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The programmatic identifier (ProgID) of the registered class to instantiate.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- 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).
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The programmatic identifier (ProgID) of the registered class to instantiate.
- The name of the server on which to create the object.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Creates a COM/ActiveX object and exposes it to script code. The registered class is
- specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the object.
- The class identifier (CLSID) of the registered class to instantiate.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Creates a COM/ActiveX object on the specified server and exposes it to script code. The
- registered class is specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the object.
- The class identifier (CLSID) of the registered class to instantiate.
- The name of the server on which to create the object.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Creates a COM/ActiveX object and exposes it to script code with the specified options.
- The registered class is specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The class identifier (CLSID) of the registered class to instantiate.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- 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).
-
- A name for the new global script item that will represent the object.
- A value that selects options for the operation.
- The class identifier (CLSID) of the registered class to instantiate.
- The name of the server on which to create the object.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Exposes a host type to script code with a default name.
-
- The type to expose.
-
-
- This method uses 's name for the new global script item that
- will represent it.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code with a default name and the specified options.
-
- A value that selects options for the operation.
- The type to expose.
-
-
- This method uses 's name for the new global script item that
- will represent it.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code.
-
- A name for the new global script item that will represent the type.
- The type to expose.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code with the specified options.
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The type to expose.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code. The type is specified by name.
-
- A name for the new global script item that will represent the type.
- The fully qualified name of the type to expose.
- Optional generic type arguments.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code with the specified options. The type is specified by name.
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The fully qualified name of the type to expose.
- Optional generic type arguments.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code. The type is specified by type name and assembly name.
-
- A name for the new global script item that will represent the type.
- The fully qualified name of the type to expose.
- The name of the assembly that contains the type to expose.
- Optional generic type arguments.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Exposes a host type to script code with the specified options. The type is specified by
- type name and assembly name.
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The fully qualified name of the type to expose.
- The name of the assembly that contains the type to expose.
- Optional generic type arguments.
-
-
- 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.
-
-
- For more information about the mapping between host members and script-callable
- properties and methods, see .
-
-
-
-
-
- Imports a COM/ActiveX type and exposes it to script code. The registered class is
- specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the type.
- The programmatic identifier (ProgID) of the registered class to import.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Imports a COM/ActiveX type from the specified server and exposes it to script code. The
- registered class is specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the type.
- The programmatic identifier (ProgID) of the registered class to import.
- The name of the server from which to import the type.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Imports a COM/ActiveX type and exposes it to script code with the specified options.
- The registered class is specified by programmatic identifier (ProgID).
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The programmatic identifier (ProgID) of the registered class to import.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- 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).
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The programmatic identifier (ProgID) of the registered class to import.
- The name of the server from which to import the type.
-
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
-
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
-
- Imports a COM/ActiveX type and exposes it to script code. The registered class is
- specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the type.
- The class identifier (CLSID) of the registered class to import.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Imports a COM/ActiveX type from the specified server and exposes it to script code. The
- registered class is specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the type.
- The class identifier (CLSID) of the registered class to import.
- The name of the server from which to import the type.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Imports a COM/ActiveX type and exposes it to script code with the specified options.
- The registered class is specified by class identifier (CLSID).
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The class identifier (CLSID) of the registered class to import.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- 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).
-
- A name for the new global script item that will represent the type.
- A value that selects options for the operation.
- The class identifier (CLSID) of the registered class to import.
- The name of the server from which to import the type.
-
- For information about the mapping between host members and script-callable properties
- and methods, see .
-
-
-
-
- Executes script code.
-
- The script code to execute.
-
-
- 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.
-
-
- 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.
-
-
-
-
-
- Executes script code with an associated document name.
-
- A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to execute.
-
-
- 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.
-
-
- 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.
-
-
-
-
-
- Executes script code with an associated document name, optionally discarding the document after execution.
-
- A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- True to discard the script document after execution, false otherwise.
- The script code to execute.
-
-
- 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.
-
-
- 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
- .
-
-
-
-
-
- Executes script code with the specified document meta-information.
-
- A structure containing meta-information for the script document.
- The script code to execute.
-
- 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.
-
-
-
-
- Loads and executes a script document.
-
- A string specifying the document to be loaded and executed.
-
- 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.
-
-
-
-
- Loads and executes a document with the specified category.
-
- A string specifying the document to be loaded and executed.
- An optional category for the requested document.
-
- 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.
-
-
-
-
- Loads and executes a document with the specified category and context callback.
-
- A string specifying the document to be loaded and executed.
- An optional category for the requested document.
- An optional context callback for the requested document.
-
- 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.
-
-
-
-
- Executes script code as a command.
-
- The script command to execute.
- The command output.
-
- This method is similar to 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.
-
-
-
-
- Evaluates script code.
-
- The script code to evaluate.
- The result value.
-
-
- 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.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Evaluates script code with an associated document name.
-
- A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to evaluate.
- The result value.
-
-
- 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.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Evaluates script code with an associated document name, optionally discarding the document after execution.
-
- A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- True to discard the script document after execution, false otherwise.
- The script code to evaluate.
- The result value.
-
-
- 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.
-
-
- 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
- .
-
-
- The following table summarizes the types of result values that script code can return.
-
-
- Type
- Returned As
- Remarks
-
- -
- String
- System.String
- N/A
-
- -
- Boolean
- System.Boolean
- N/A
-
- -
- Number
- System.Int32 or System.Double
-
- Other numeric types are possible. The exact conversions between script and .NET
- numeric types are defined by the script engine.
-
-
- -
- Null Reference
- null
- N/A
-
- -
- Undefined
-
-
- This represents JavaScript's
- undefined,
- VBScript's
- Empty,
- etc.
-
-
- -
- Void
-
-
- This is returned when script code forwards the result of a host method that returns no value.
-
-
- -
- Host Object
- Native .NET type
-
- 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.
-
-
- -
- Script Object
-
-
- This includes all native script objects that have no .NET representation. C#'s
- dynamic
- keyword provides a convenient way to access them.
-
-
- -
- Other
- Unspecified
-
- 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.
-
-
-
-
-
-
-
-
- Evaluates script code with the specified document meta-information.
-
- A structure containing meta-information for the script document.
- The script code to evaluate.
- The result value.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Loads and evaluates a script document.
-
- A string specifying the document to be loaded and evaluated.
- The result value.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Loads and evaluates a document with the specified category.
-
- A string specifying the document to be loaded and evaluated.
- An optional category for the requested document.
- The result value.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Loads and evaluates a document with the specified category and context callback.
-
- A string specifying the document to be loaded and evaluated.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The result value.
-
-
- 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.
-
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
-
- Invokes a global function or procedure.
-
- The name of the global function or procedure to invoke.
- Optional invocation arguments.
- The return value if a function was invoked, an undefined value otherwise.
-
-
-
- Gets a string representation of the script call stack.
-
- The script call stack formatted as a string.
-
- 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.
-
-
-
-
- Interrupts script execution and causes the script engine to throw an exception.
-
-
- This method can be called safely from any thread.
-
-
-
-
- Performs garbage collection.
-
- True to perform exhaustive garbage collection, false to favor speed over completeness.
-
-
-
- Releases all resources used by the script engine.
-
-
- Call Dispose() when you are finished using the script engine. Dispose()
- leaves the script engine in an unusable state. After calling Dispose(), you must
- release all references to the script engine so the garbage collector can reclaim the
- memory that the script engine was occupying.
-
-
-
-
- Releases the unmanaged resources used by the script engine and optionally releases the managed resources.
-
- True to release both managed and unmanaged resources; false to release only unmanaged resources.
-
- This method is called by the public method and the
- Finalize method. invokes the
- protected Dispose(Boolean) method with the
- parameter set to true. Finalize invokes
- Dispose(Boolean) with set to false.
-
-
-
-
- Releases unmanaged resources and performs other cleanup operations before the script engine is reclaimed by garbage collection.
-
-
- This method overrides . Application code should not
- call this method; an object's Finalize() method is automatically invoked during
- garbage collection, unless finalization by the garbage collector has been disabled by a
- call to .
-
-
-
-
- The exception that is thrown when an error occurs during script execution or script object access.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new with the specified error message.
-
- The error message.
-
-
-
- Initializes a new with the specified error message and nested exception.
-
- The error message.
- The exception that caused the current exception to be thrown.
-
-
-
- Initializes a new with serialized data.
-
- The object that holds the serialized data.
- The contextual information about the source or destination.
-
-
-
- Gets an HRESULT error code if one is available, zero otherwise.
-
-
-
-
- Gets the name associated with the script engine instance.
-
-
-
-
- Gets a detailed error message if one is available, null otherwise.
-
-
-
-
- Gets a value that indicates whether the exception represents a fatal error.
-
-
-
-
- Gets a value that indicates whether script code execution had started before the current exception was thrown.
-
-
-
-
- Gets the script exception that caused the current exception to be thrown, or null if one was not specified.
-
-
-
-
- Returns a string that represents the current exception.
-
- A string that represents the current exception.
-
-
-
- Populates a with the data needed to serialize the target object.
-
- The to populate with data.
- The destination (see ) for this serialization.
-
-
-
- The exception that is thrown when script execution is interrupted by the host.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new with the specified error message.
-
- The error message.
-
-
-
- Initializes a new with the specified error message and nested exception.
-
- The error message.
- The exception that caused the current exception to be thrown.
-
-
-
- Initializes a new with serialized data.
-
- The object that holds the serialized data.
- The contextual information about the source or destination.
-
-
-
- Gets an HRESULT error code if one is available, zero otherwise.
-
-
-
-
- Gets the name associated with the script engine instance.
-
-
-
-
- Gets a detailed error message if one is available, null otherwise.
-
-
-
-
- Gets a value that indicates whether the exception represents a fatal error.
-
-
-
-
- Gets a value that indicates whether script code execution had started before the current exception was thrown.
-
-
-
-
- Gets the script exception that caused the current exception to be thrown, or null if one was not specified.
-
-
-
-
- Returns a string that represents the current exception.
-
- A string that represents the current exception.
-
-
-
- Populates a with the data needed to serialize the target object.
-
- The to populate with data.
- The destination (see ) for this serialization.
-
-
-
- Specifies how the target type member is to be exposed to script code. This extended version
- supports additional options.
-
-
- This attribute is applicable to events, fields, methods, and properties.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new instance with the specified name.
-
- The name that script code will use to access the target type member.
-
-
-
- Initializes a new instance with the specified script access setting.
-
- The script access setting for the target type member.
-
-
-
- Initializes a new instance with the specified name and script access setting.
-
- The name that script code will use to access the target type member.
- The script access setting for the target type member.
-
-
-
- Initializes a new instance with the specified script options.
-
- The script options for the target type member.
-
-
-
- Initializes a new instance with the specified name and script options.
-
- The name that script code will use to access the target type member.
- The script options for the target type member.
-
-
-
- Initializes a new instance with the specified script access setting and script options.
-
- The script access setting for the target type member.
- The script options for the target type member.
-
-
-
- Initializes a new instance with the specified name, script access setting, and script options.
-
- The name that script code will use to access the target type member.
- The script access setting for the target type member.
- The script options for the target type member.
-
-
-
- Gets or sets the name that script code will use to access the target type member.
-
-
- 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.
-
-
-
-
- Gets or sets the script options for the target type member.
-
-
-
-
- Defines options for exposing type members to script code.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that the field, property, or method return value is not to be restricted to
- its declared type.
-
-
-
-
- Specifies that the field, property, or method return value is to be marshaled with full
- .NET type information even if it is null. Note that such a value will always
- fail equality comparison with JavaScript's
- null,
- VBScript's
- Nothing,
- and other similar values. Instead, use or
- to perform such a comparison.
-
-
-
-
- Represents a script object.
-
-
-
-
-
- Gets the script engine that owns the object.
-
-
-
-
- Gets the value of a named script object property.
-
- The name of the property to get.
- Optional arguments for property retrieval.
- The value of the specified property.
-
-
-
- Sets the value of a named script object property.
-
- The name of the property to set.
- An array containing optional arguments and the new property value.
-
- The array must contain at least one element. The new
- property value must be the last element of the array.
-
-
-
-
- Removes a named script object property.
-
- The name of the property to remove.
- True if the property was removed successfully, false otherwise.
-
-
-
- Enumerates the script object's property names.
-
-
-
-
- Gets or sets the value of a named script object property.
-
- The name of the property to get or set.
- Optional arguments for property access.
- The value of the specified property.
-
-
-
- Gets the value of an indexed script object property.
-
- The index of the property to get.
- The value of the specified property.
-
-
-
- Sets the value of an indexed script object property.
-
- The index of the property to set.
- The new property value.
-
-
-
- Removes an indexed script object property.
-
- The index of the property to remove.
- True if the property was removed successfully, false otherwise.
-
-
-
- Enumerates the script object's property indices.
-
-
-
-
- Gets or sets the value of an indexed script object property.
-
- The index of the property to get or set.
- The value of the specified property.
-
-
-
- Invokes the script object.
-
- True to invoke the object as a constructor, false otherwise.
- Optional arguments for object invocation.
- The invocation result value.
-
-
-
- Invokes a script object method.
-
- The name of the method to invoke.
- Optional arguments for method invocation.
- The invocation result value.
-
-
-
- Specifies how the target type member is to be exposed to script code.
-
-
- This attribute is applicable to events, fields, methods, properties, and nested types.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new instance with the specified script access setting.
-
- The script access setting for the target type member.
-
-
-
- Gets the script access setting for the target type member.
-
-
-
-
- Provides an in-memory implementation for a text document.
-
-
-
-
- Initializes a new instance.
-
- A structure containing meta-information for the document.
- A string containing the document's contents.
-
-
-
- Gets a structure containing meta-information for the document.
-
-
-
-
- Gets a stream that provides read access to the document.
-
-
- The implementation of this property returns a
- instance.
-
-
-
-
- Gets the document's character encoding.
-
-
- instances return for this property.
-
-
-
-
- Represents an undefined value.
-
-
- Some script languages support one or more special non-null values that represent
- nonexistent, missing, unknown, or undefined data. The ClearScript library maps such values
- to instances of this class.
-
-
-
-
- The sole instance of the class.
-
-
-
-
- Returns a string that represents the current object.
-
- A string that represents the current object.
-
- The version of this method returns "[undefined]".
-
-
-
-
- Defines caching options for V8 script compilation.
-
-
-
-
- Specifies that no cache data is to be generated or consumed during V8 script
- compilation. This option results in the most efficient script compilation when no cache
- data is available.
-
-
-
-
- Selects parser caching. Parser cache data is smaller and less expensive to generate
- than code cache data, but it is less effective at accelerating recompilation.
-
-
-
-
- Selects code caching. Code cache data is larger and more expensive to generate than
- parser cache data, but it is more effective at accelerating recompilation.
-
-
-
-
- Represents a V8 CPU profile.
-
-
-
-
- Gets the profile's name.
-
-
-
-
- Gets the profile's starting timestamp in microseconds.
-
-
- The timestamp specifies an offset relative to an unspecified moment in the past. All
- timestamps within the profile are relative to the same moment.
-
-
-
-
- Gets the profile's ending timestamp in microseconds.
-
-
- The timestamp specifies an offset relative to an unspecified moment in the past. All
- timestamps within the profile are relative to the same moment.
-
-
-
-
- Gets the root node of the profile's call tree.
-
-
-
-
- Gets the profile's sample collection.
-
-
- This property returns null if the profile contains no samples.
-
-
-
-
- Returns a JSON representation of the profile.
-
-
- See the
- V8 Inspector JSON Protocol
- for schema details.
-
- A JSON representation of the profile in V8 Inspector format.
-
-
-
- Writes a JSON representation of the profile to the given text writer.
-
- The text writer to which to write the profile.
-
- See the
- V8 Inspector JSON Protocol
- for schema details.
-
-
-
-
- Represents a node in a V8 CPU profile's call tree.
-
-
-
-
- Gets the node's numeric identifier.
-
-
- This value is unique within the profile.
-
-
-
-
- Gets the numeric identifier of the document containing the node's script function.
-
-
-
-
- Gets the name or URL of the document containing the node's script function.
-
-
-
-
- Gets the name of the node's script function.
-
-
-
-
- Gets the 1-based line number of the start of the node's script function.
-
-
- A value of zero indicates that no line number is available.
-
-
-
-
-
- Gets the 1-based column number of the start of the node's script function.
-
-
- A value of zero indicates that no column number is available.
-
-
-
-
-
- Gets the node's hit count.
-
-
- This value represents the number of times the CPU profiler observed the node's
- script function at the top of the call stack.
-
-
-
-
- Gets an optional string describing the reason why the node's script function was not optimized.
-
-
-
-
- Gets the node's hit line collection.
-
-
- This property returns null if the node contains no hit lines.
-
-
-
-
- Gets the node's child node collection.
-
-
- This property returns null if the node has no child nodes.
-
-
-
-
- Represents a script line observed by the V8 CPU profiler.
-
-
-
-
- Gets the 1-based line number.
-
-
-
-
- Gets the hit count for the script line.
-
-
- This value represents the number of times the CPU profiler observed the current
- script line at the top of the call stack.
-
-
-
-
- Represents a V8 CPU profile sample.
-
-
-
-
- Gets the sample's node within the profile's call tree.
-
-
-
-
- Gets the sample's timestamp in microseconds.
-
-
- The timestamp specifies an offset relative to an unspecified moment in the past. All
- timestamps within the profile are relative to the same moment.
-
-
-
-
- Defines options for creating a V8 CPU profile.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that automatic sample collection is to be enabled.
-
-
-
-
- Represents an instance of the V8 runtime.
-
-
-
-
- Initializes a new V8 runtime instance.
-
-
-
-
- Initializes a new V8 runtime instance with the specified 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.
-
-
-
- Initializes a new V8 runtime instance with the specified resource constraints.
-
- Resource constraints for the instance.
-
-
-
- Initializes a new V8 runtime instance with the specified name and resource constraints.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the instance.
-
-
-
- Initializes a new V8 runtime instance with the specified options.
-
- A value that selects options for the operation.
-
-
-
- Initializes a new V8 runtime instance with the specified options and debug port.
-
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
-
-
- Initializes a new V8 runtime instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
-
-
- Initializes a new V8 runtime instance with the specified name, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
-
-
- Initializes a new V8 runtime instance with the specified resource constraints and options.
-
- Resource constraints for the instance.
- A value that selects options for the operation.
-
-
-
- Initializes a new V8 runtime instance with the specified resource constraints, options, and debug port.
-
- Resource constraints for the instance.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
-
-
- Initializes a new V8 runtime instance with the specified name, resource constraints, and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the instance.
- A value that selects options for the operation.
-
-
-
- Initializes a new V8 runtime instance with the specified name, resource constraints, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the instance.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
-
-
- Gets the name associated with the V8 runtime instance.
-
-
-
-
- Enables or disables script code formatting.
-
-
- When this property is set to true, the V8 runtime 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.
-
-
-
-
- Gets or sets a soft limit for the size of the V8 runtime's heap.
-
-
-
- This property is specified in bytes. When it is set to the default value, heap size
- monitoring is disabled, and scripts with memory leaks or excessive memory usage
- can cause unrecoverable errors and process termination.
-
-
- A V8 runtime unconditionally terminates the process when it exceeds its resource
- constraints (see ). This property enables external
- heap size monitoring that can prevent termination in some scenarios. To be effective,
- it should be set to a value that is significantly lower than
- . Note that enabling heap size
- monitoring results in slower script execution.
-
-
- Exceeding this limit causes the V8 runtime to interrupt script execution and throw an
- exception. To re-enable script execution, set this property to a new value.
-
-
-
-
-
- Gets or sets the minimum time interval between consecutive heap size samples.
-
-
- This property is effective only when heap size monitoring is enabled (see
- ).
-
-
-
-
- Gets or sets the maximum amount by which the stack is permitted to grow during script execution.
-
-
-
- This property is specified in bytes. When it is set to the default value, no stack
- usage limit is enforced, and scripts with unchecked recursion or other excessive stack
- usage can cause unrecoverable errors and process termination.
-
-
- Note that the V8 runtime does not monitor stack usage while a host call is in progress.
- Monitoring is resumed when control returns to the runtime.
-
-
-
-
-
- Gets or sets the V8 runtime's document settings.
-
-
-
-
- Creates a new V8 script engine instance.
-
- A new V8 script engine instance.
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
-
-
- Creates a new V8 script engine instance with the specified 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.
- A new V8 script engine instance.
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
-
-
- Creates a new V8 script engine instance with the specified options.
-
- A value that selects options for the operation.
- A new V8 script engine instance.
-
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
- V8 supports one script debugger per runtime. If script debugging has been enabled in
- the current runtime, additional script engine instances cannot disable it or change its
- TCP port, nor can they enable script debugging on a different port.
-
-
-
-
-
- Creates a new V8 script engine instance with the specified options and debug port.
-
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
- A new V8 script engine instance.
-
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
- V8 supports one script debugger per runtime. If script debugging has been enabled in
- the current runtime, additional script engine instances cannot disable it or change its
- TCP port, nor can they enable script debugging on a different port.
-
-
-
-
-
- Creates a new V8 script engine instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
- A new V8 script engine instance.
-
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
- V8 supports one script debugger per runtime. If script debugging has been enabled in
- the current runtime, additional script engine instances cannot disable it or change its
- TCP port, nor can they enable script debugging on a different port.
-
-
-
-
-
- Creates a new V8 script engine instance with the specified name, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
- A new V8 script engine instance.
-
-
- The new script engine instance shares the V8 runtime with other instances created by
- this method and any of its overloads.
-
-
- V8 supports one script debugger per runtime. If script debugging has been enabled in
- the current runtime, additional script engine instances cannot disable it or change its
- TCP port, nor can they enable script debugging on a different port.
-
-
-
-
-
- Creates a compiled script.
-
- The script code to compile.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Creates a compiled script with an associated document name.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Creates a compiled script with the specified document meta-information.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Creates a compiled script, generating cache data for accelerated recompilation.
-
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
-
- Creates a compiled script with an associated document name, generating cache data for accelerated recompilation.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
-
- Creates a compiled script with the specified document meta-information, generating cache data for accelerated recompilation.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
-
- Creates a compiled script, consuming previously generated cache data.
-
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Creates a compiled script with an associated document name, consuming previously generated cache data.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Creates a compiled script with the specified document meta-information, consuming previously generated cache data.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Loads and compiles a script document.
-
- A string specifying the document to be loaded and compiled.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a document with the specified category.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a document with the specified category and context callback.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a script document, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a document with the specified category, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a document with the specified category and context callback, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a script document, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Loads and compiles a document with the specified category, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Loads and compiles a document with the specified category and context callback, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Returns memory usage information.
-
- A object containing memory usage information.
-
-
-
- Performs garbage collection.
-
- True to perform exhaustive garbage collection, false to favor speed over completeness.
-
-
-
- Begins collecting a new CPU profile.
-
- A name for the profile.
- True if the profile was created successfully, false otherwise.
-
- A V8 runtime can collect multiple CPU profiles simultaneously.
-
-
-
-
- Begins collecting a new CPU profile with the specified options.
-
- A name for the profile.
- Options for creating the profile.
- True if the profile was created successfully, false otherwise.
-
- A V8 runtime can collect multiple CPU profiles simultaneously.
-
-
-
-
- Completes and returns a CPU profile.
-
- The name of the profile.
- The profile if it was found and completed successfully, null otherwise.
-
- An empty argument selects the most recently created CPU profile.
-
-
-
-
- Collects a sample in all CPU profiles active in the V8 runtime.
-
-
-
-
- Gets or sets the time interval between automatic CPU profile samples, in microseconds.
-
-
- Assigning this property has no effect on CPU profiles already active in the V8 runtime.
- The default value is 1000.
-
-
-
-
- Releases all resources used by the V8 runtime.
-
-
- Call Dispose() when you are finished using the V8 runtime. Dispose()
- leaves the V8 runtime in an unusable state. After calling Dispose(), you must
- release all references to the V8 runtime so the garbage collector can reclaim the
- memory that the V8 runtime was occupying.
-
-
-
-
- Specifies resource constraints for a V8 runtime.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets or sets the maximum size of the new object heap in
- MiB.
-
-
- For maximum compatibility with hosts that predate an inadvertent breaking change in
- ClearScript 5.4.1, values greater than 1048576
- (1 TiB) are assumed to be in
- bytes rather than MiB. For example, the values 16 and 16777216 both specify a limit
- of 16 MiB.
-
-
-
-
- Gets or sets the maximum size of the old object heap in
- MiB.
-
-
- For maximum compatibility with hosts that predate an inadvertent breaking change in
- ClearScript 5.4.1, values greater than 1048576
- (1 TiB) are assumed to be in
- bytes rather than MiB. For example, the values 16 and 16777216 both specify a limit
- of 16 MiB.
-
-
-
-
- Gets or sets the maximum size of the executable code heap in
- MiB.
-
-
- For maximum compatibility with hosts that predate an inadvertent breaking change in
- ClearScript 5.4.1, values greater than 1048576
- (1 TiB) are assumed to be in
- bytes rather than MiB. For example, the values 16 and 16777216 both specify a limit
- of 16 MiB.
-
-
-
-
- Gets or sets the maximum size of the young object heap in
- MiB.
-
-
- For maximum compatibility with hosts that predate an inadvertent breaking change in
- ClearScript 5.4.1, values greater than 1048576
- (1 TiB) are assumed to be in
- bytes rather than MiB. For example, the values 16 and 16777216 both specify a limit
- of 16 MiB.
-
-
-
-
- Defines options for initializing a new V8 runtime instance.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that script debugging features are to be enabled.
-
-
-
-
- Specifies that remote script debugging is to be enabled. This option is ignored if
- is not specified.
-
-
-
-
- Specifies that
- dynamic module imports
- are to be enabled. This is an experimental feature and may be removed in a future release.
-
-
-
-
- Contains memory usage information for a V8 runtime.
-
-
-
-
- Gets the total heap size in bytes.
-
-
-
-
- Gets the total executable heap size in bytes.
-
-
-
-
- Gets the total physical memory size in bytes.
-
-
-
-
- Gets the used heap size in bytes.
-
-
-
-
- Gets the heap size limit in bytes.
-
-
-
-
- Represents a compiled script that can be executed multiple times without recompilation.
-
-
-
-
- Gets the document name associated with the compiled script.
-
-
-
-
- Gets the document meta-information for the compiled script.
-
-
-
-
- Releases all resources used by the compiled script.
-
-
- Call Dispose() when you are finished using the compiled script. Dispose()
- leaves the compiled script in an unusable state. After calling Dispose(), you
- must release all references to the compiled script so the garbage collector can reclaim
- the memory that the compiled script was occupying.
-
-
-
-
- Represents an instance of the V8 JavaScript engine.
-
-
- Unlike instances, V8ScriptEngine instances do not have
- thread affinity. The underlying script engine is not thread-safe, however, so this class
- uses internal locks to automatically serialize all script code execution for a given
- instance. Script delegates and event handlers are invoked on the calling thread without
- marshaling.
-
-
-
-
- Initializes a new V8 script engine instance.
-
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified 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.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified resource constraints.
-
- Resource constraints for the V8 runtime (see remarks).
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name and resource constraints.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the V8 runtime (see remarks).
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified options.
-
- A value that selects options for the operation.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified options and debug port.
-
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified resource constraints and options.
-
- Resource constraints for the V8 runtime (see remarks).
- A value that selects options for the operation.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified resource constraints, options, and debug port.
-
- Resource constraints for the V8 runtime (see remarks).
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name, resource constraints, and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the V8 runtime (see remarks).
- A value that selects options for the operation.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Initializes a new V8 script engine instance with the specified name, resource constraints, options, and debug port.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- Resource constraints for the V8 runtime (see remarks).
- A value that selects options for the operation.
- A TCP port on which to listen for a debugger connection.
-
- A separate V8 runtime is created for the new script engine instance.
-
-
-
-
- Gets or sets a soft limit for the size of the V8 runtime's heap.
-
-
-
- This property is specified in bytes. When it is set to the default value, heap size
- monitoring is disabled, and scripts with memory leaks or excessive memory usage
- can cause unrecoverable errors and process termination.
-
-
- A V8 runtime unconditionally terminates the process when it exceeds its resource
- constraints (see ). This property enables external
- heap size monitoring that can prevent termination in some scenarios. To be effective,
- it should be set to a value that is significantly lower than
- . Note that enabling heap size
- monitoring results in slower script execution.
-
-
- Exceeding this limit causes the V8 runtime to interrupt script execution and throw an
- exception. To re-enable script execution, set this property to a new value.
-
-
-
-
-
- Gets or sets the minimum time interval between consecutive heap size samples.
-
-
- This property is effective only when heap size monitoring is enabled (see
- ).
-
-
-
-
- Gets or sets the maximum amount by which the V8 runtime is permitted to grow the stack during script execution.
-
-
-
- This property is specified in bytes. When it is set to the default value, no stack
- usage limit is enforced, and scripts with unchecked recursion or other excessive stack
- usage can cause unrecoverable errors and process termination.
-
-
- Note that the V8 runtime does not monitor stack usage while a host call is in progress.
- Monitoring is resumed when control returns to the runtime.
-
-
-
-
-
- Enables or disables instance method enumeration.
-
-
- By default, a host object's instance methods are exposed as enumerable properties.
- Setting this property to true causes instance methods to be excluded from
- property enumeration. This affects all host objects exposed in the current script
- engine. Note that instance methods remain both retrievable and invocable regardless of
- this property's value.
-
-
-
-
- Enables or disables extension method enumeration.
-
-
-
- By default, all exposed extension methods appear as enumerable properties of all host
- objects, regardless of type. Setting this property to true causes extension
- methods to be excluded from property enumeration. This affects all host objects exposed
- in the current script engine. Note that extension methods remain both retrievable and
- invocable regardless of this property's value.
-
-
- This property has no effect if is set
- to true.
-
-
-
-
-
- Creates a compiled script.
-
- The script code to compile.
- A compiled script that can be executed multiple times without recompilation.
-
-
-
- Creates a compiled script with an associated document name.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- A compiled script that can be executed multiple times without recompilation.
-
-
-
- Creates a compiled script with the specified document meta-information.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- A compiled script that can be executed multiple times without recompilation.
-
-
-
- Creates a compiled script, generating cache data for accelerated recompilation.
-
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed multiple times without recompilation.
-
- The generated cache data can be stored externally and is usable in other V8 script
- engines and application processes.
-
-
-
-
-
- Creates a compiled script with an associated document name, generating cache data for accelerated recompilation.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed multiple times without recompilation.
-
- The generated cache data can be stored externally and is usable in other V8 script
- engines and application processes.
-
-
-
-
-
- Creates a compiled script with the specified document meta-information, generating cache data for accelerated recompilation.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed multiple times without recompilation.
-
- The generated cache data can be stored externally and is usable in other V8 script
- engines and application processes.
-
-
-
-
-
- Creates a compiled script, consuming previously generated cache data.
-
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed multiple times without recompilation.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Creates a compiled script with an associated document name, consuming previously generated cache data.
-
- A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed multiple times without recompilation.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Creates a compiled script with an associated document name, consuming previously generated cache data.
-
- A structure containing meta-information for the script document.
- The script code to compile.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed multiple times without recompilation.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
-
- Loads and compiles a script document.
-
- A string specifying the document to be loaded and compiled.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a document with the specified category.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a document with the specified category and context callback.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- A compiled script that can be executed by multiple V8 script engine instances.
-
-
-
- Loads and compiles a script document, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a document with the specified category, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a document with the specified category and context callback, generating cache data for accelerated recompilation.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The kind of cache data to be generated.
- Cache data for accelerated recompilation.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- The generated cache data can be stored externally and is usable in other V8 runtimes
- and application processes.
-
-
-
-
- Loads and compiles a script document, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Loads and compiles a document with the specified category, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Loads and compiles a document with the specified category and context callback, consuming previously generated cache data.
-
- A string specifying the document to be loaded and compiled.
- An optional category for the requested document.
- An optional context callback for the requested document.
- The kind of cache data to be consumed.
- Cache data for accelerated compilation.
- True if was accepted, false otherwise.
- A compiled script that can be executed by multiple V8 script engine instances.
-
- To be accepted, the cache data must have been generated for identical script code by
- the same V8 build.
-
-
-
-
- Evaluates a compiled script.
-
- The compiled script to evaluate.
- The result value.
-
- For information about the types of result values that script code can return, see
- .
-
-
-
-
- Executes a compiled script.
-
- The compiled script to execute.
-
- This method is similar to with the exception that it
- does not marshal a result value to the host. It can provide a performance advantage
- when the result value is not needed.
-
-
-
-
- Returns memory usage information for the V8 runtime.
-
- A object containing memory usage information for the V8 runtime.
-
-
-
- Begins collecting a new CPU profile.
-
- A name for the profile.
- True if the profile was created successfully, false otherwise.
-
- A V8 script engine can collect multiple CPU profiles simultaneously.
-
-
-
-
- Begins collecting a new CPU profile with the specified options.
-
- A name for the profile.
- Options for creating the profile.
- True if the profile was created successfully, false otherwise.
-
- A V8 script engine can collect multiple CPU profiles simultaneously.
-
-
-
-
- Completes and returns a CPU profile.
-
- The name of the profile.
- The profile if it was found and completed successfully, null otherwise.
-
- An empty argument selects the most recently created CPU profile.
-
-
-
-
- Collects a sample in all CPU profiles active in the V8 runtime.
-
-
-
-
- Gets or sets the time interval between automatic CPU profile samples, in microseconds.
-
-
- Assigning this property has no effect on CPU profiles already active in the V8 runtime.
- The default value is 1000.
-
-
-
-
- Gets the script engine's recommended file name extension for script files.
-
-
- instances return "js" for this property.
-
-
-
-
- Allows the host to access script resources directly.
-
-
- 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.
-
-
-
-
- Executes script code as a command.
-
- The script command to execute.
- The command output.
-
-
- This method is similar to 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.
-
-
- The version of this method attempts to use
- toString
- to convert the return value.
-
-
-
-
-
- Gets a string representation of the script call stack.
-
- The script call stack formatted as a string.
-
- 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.
-
-
-
-
- Interrupts script execution and causes the script engine to throw an exception.
-
-
- This method can be called safely from any thread.
-
-
-
-
- Performs garbage collection.
-
- True to perform exhaustive garbage collection, false to favor speed over completeness.
-
-
-
- Releases the unmanaged resources used by the script engine and optionally releases the managed resources.
-
- True to release both managed and unmanaged resources; false to release only unmanaged resources.
-
- This method is called by the public method and the
- Finalize method.
- invokes the protected Dispose(Boolean)
- method with the parameter set to true.
- Finalize invokes Dispose(Boolean) with
- set to false.
-
-
-
-
- Defines options for initializing a new V8 JavaScript engine instance.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that script debugging features are to be enabled.
-
-
-
-
- Specifies that support for behavior is to be
- disabled. This option yields a significant performance benefit for global item access.
-
-
-
-
- Specifies that remote script debugging is to be enabled. This option is ignored if
- is not specified.
-
-
-
-
- Specifies that the script engine is to wait for a debugger connection and schedule a
- pause before executing the first line of application script code. This option is
- ignored if is not specified.
-
-
-
-
- Specifies that the script engine is to perform automatic conversion between
- .NET objects and JavaScript
- Date
- objects. This conversion is bidirectional and lossy. A DateTime object
- constructed from a JavaScript Date object always represents a Coordinated
- Universal Timestamp (UTC) and has its property set to
- .
-
-
-
-
- Specifies that
- dynamic module imports
- are to be enabled. This is an experimental feature and may be removed in a future release.
-
-
-
-
- Specifies that long integers with values greater than
- Number.MAX_SAFE_INTEGER
- or less than
- Number.MIN_SAFE_INTEGER
- are to be marshaled as
- BigInt.
- This option is ignored if is specified.
-
-
-
-
- Specifies that all long integers are to be marshaled as
- BigInt.
-
-
-
-
- Specifies that the script engine is to perform automatic conversion between
- .NET objects and JavaScript
- promises.
- This conversion is bidirectional and lossy. A Task object constructed from a
- JavaScript promise always has a result type of .
-
-
-
-
- Represents the result of a host method that returns no value.
-
-
- 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# void method),
- the ClearScript library provides an instance of this class as a dummy return value.
-
-
-
-
- Allows Windows Script engines to display dialogs within the host's user interface.
-
-
-
-
-
- Gets the handle of an owner window for displaying dialogs on behalf of script code.
-
-
-
-
- Enables or disables the host's modeless dialogs.
-
- True to enable the host's modeless dialogs, false otherwise.
-
-
-
- Represents a Windows Script object.
-
-
-
-
- Provides access to the underlying unmanaged COM object.
-
- An object that represents the underlying unmanaged COM object.
-
-
-
- Represents an instance of the JScript engine.
-
-
-
-
- Initializes a new JScript engine instance.
-
-
-
-
- Initializes a new JScript engine instance with the specified 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.
-
-
-
- Initializes a new JScript engine instance with the specified options.
-
- A value that selects options for the operation.
-
-
-
- Initializes a new JScript engine instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
-
-
- Initializes a new JScript engine instance with the specified programmatic
- identifier, name, and options.
-
- The programmatic identifier (ProgID) of the JScript engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Initializes a new JScript engine instance with the specified programmatic
- identifier, name, list of supported file name extensions, and options.
-
- The programmatic identifier (ProgID) of the JScript engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A semicolon-delimited list of supported file name extensions.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Gets the script engine's recommended file name extension for script files.
-
-
- instances return "js" for this property.
-
-
-
-
- Executes script code as a command.
-
- The script command to execute.
- The command output.
-
-
- This method is similar to 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.
-
-
- The version of this method attempts to use
- toString
- to convert the return value.
-
-
-
-
-
- Represents an empty object reference.
-
-
- When passed to a Windows Script engine, an instance of this class is marshaled as an empty
- variant of type VT_DISPATCH. VBScript interprets this as the special object
- reference
- Nothing.
- In JScript it appears as a value that is equal to, but not strictly equal to,
- undefined.
-
-
-
-
- The sole instance of the class.
-
-
-
-
- Returns a string that represents the current object.
-
- A string that represents the current object.
-
- The version of this method returns "[nothing]".
-
-
-
-
- Represents an instance of the VBScript engine.
-
-
-
-
- Initializes a new VBScript engine instance.
-
-
-
-
- Initializes a new VBScript engine instance with the specified 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.
-
-
-
- Initializes a new VBScript engine instance with the specified options.
-
- A value that selects options for the operation.
-
-
-
- Initializes a new VBScript engine instance with the specified name and options.
-
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
-
-
- Initializes a new VBScript engine instance with the specified programmatic
- identifier, name, and options.
-
- The programmatic identifier (ProgID) of the VBScript engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Initializes a new VBScript engine instance with the specified programmatic
- identifier, name, list of supported file name extensions, and options.
-
- The programmatic identifier (ProgID) of the VBScript engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A semicolon-delimited list of supported file name extensions.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Gets the script engine's recommended file name extension for script files.
-
-
- instances return "vbs" for this property.
-
-
-
-
- Executes script code as a command.
-
- The script command to execute.
- The command output.
-
-
- This method is similar to 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.
-
-
- The version of this method supports both expressions and
- statements. If the specified command begins with "eval " (not case-sensitive), the
- engine executes the remainder as an expression and attempts to use
- CStr
- to convert the result value. Otherwise, it executes the command as a statement and does
- not return a value.
-
-
-
-
-
- Provides the base implementation for all Windows Script engines.
-
-
- Each Windows Script engine instance has thread affinity and is bound to a
- during instantiation. Attempting to execute script code on a
- different thread results in an exception. Script delegates and event handlers are marshaled
- synchronously onto the correct thread.
-
-
-
-
- Initializes a new Windows Script engine instance.
-
- The programmatic identifier (ProgID) of the Windows Script engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Initializes a new Windows Script engine instance with the specified list of supported file name extensions.
-
- The programmatic identifier (ProgID) of the Windows Script engine class.
- A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
- A semicolon-delimited list of supported file name extensions.
- A value that selects options for the operation.
-
- The argument can be a class identifier (CLSID) in standard
- GUID format with braces (e.g., "{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}").
-
-
-
-
- Gets the associated with the current script engine.
-
-
-
-
- Determines whether the calling thread has access to the current script engine.
-
- True if the calling thread has access to the current script engine, false otherwise.
-
-
-
- Enforces that the calling thread has access to the current script engine.
-
-
-
-
- Gets or sets an interface that supports the display of dialogs on behalf of script code.
-
-
-
-
- Allows the host to access script resources directly.
-
-
- 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.
-
-
-
-
- Gets a string representation of the script call stack.
-
- The script call stack formatted as a string.
-
-
- 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.
-
-
- The version of this method returns the empty string
- if script debugging features have not been enabled for the instance.
-
-
-
-
-
- Interrupts script execution and causes the script engine to throw an exception.
-
-
- This method can be called safely from any thread.
-
-
-
-
- Performs garbage collection.
-
- True to perform exhaustive garbage collection, false to favor speed over completeness.
-
-
-
- Releases the unmanaged resources used by the script engine and optionally releases the managed resources.
-
- True to release both managed and unmanaged resources; false to release only unmanaged resources.
-
- This method is called by the public method and the
- Finalize method.
- invokes the protected Dispose(Boolean)
- method with the parameter set to true.
- Finalize invokes Dispose(Boolean) with
- set to false.
-
-
-
-
- Defines options for initializing a new Windows Script engine instance.
-
-
-
-
- Specifies that no options are selected.
-
-
-
-
- Specifies that script debugging features are to be enabled.
-
-
-
-
- Specifies that Just-In-Timestamp script debugging is to be enabled. This option is ignored
- if is not specified.
-
-
-
-
- Specifies that smart source document management is to be disabled. This option is
- ignored if is not specified.
-
-
-
-
- Specifies that script language features that enhance standards compliance are to be
- enabled. This option only affects .
-
-
-
-
- Specifies that null is to be marshaled as a variant of type VT_DISPATCH.
- This option does not affect field, property, or method return values declared as
- , , nullable , or nullable
- numeric types.
-
-
-
-
- Specifies that values are to be marshaled as variants of type
- VT_CY.
-
-
-
-
- Specifies that managed arrays that are passed or returned to script code are to be
- converted to script arrays and marshaled as variants of type VT_ARRAY. In
- VBScript these objects are the native array type. JScript code can use the
- VBArray
- object to access them.
-
-
-
-
- When is specified, the ClearScript library uses
- virtual method table patching to support JScript-specific
- IDispatchEx
- extensions that otherwise interfere with some host object functionality. Virtual method
- table patching is a very low-level mechanism with global effect. This option specifies
- that virtual method table patching is not to be enabled on behalf of the current
- instance.
-
-
-
-
- Specifies that values are to be marshaled as variants of type
- VT_DATE. In VBScript these objects are the native date-time type. JScript code
- can pass them to the
- Date
- constructor for property access.
-
-
-
-
diff --git a/lib/ClearScript/runtimes/win-x64/native/ClearScriptV8-64.dll b/lib/ClearScript/runtimes/win-x64/native/ClearScriptV8-64.dll
deleted file mode 100644
index 35027e77..00000000
Binary files a/lib/ClearScript/runtimes/win-x64/native/ClearScriptV8-64.dll and /dev/null differ
diff --git a/lib/ClearScript/runtimes/win-x86/native/ClearScriptV8-32.dll b/lib/ClearScript/runtimes/win-x86/native/ClearScriptV8-32.dll
deleted file mode 100644
index b5f4ea75..00000000
Binary files a/lib/ClearScript/runtimes/win-x86/native/ClearScriptV8-32.dll and /dev/null differ
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Properties/AssemblyInfo.cs b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Properties/AssemblyInfo.cs
index b3dc5b93..62f1c2b4 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Properties/AssemblyInfo.cs
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/Properties/AssemblyInfo.cs
@@ -13,5 +13,5 @@
[assembly: ComVisible(false)]
[assembly: Guid("39487053-b459-4433-ae93-e00affc653c6")]
-[assembly: AssemblyVersion("3.8.2.0")]
-[assembly: AssemblyFileVersion("3.8.2.0")]
\ No newline at end of file
+[assembly: AssemblyVersion("3.9.0.0")]
+[assembly: AssemblyFileVersion("3.9.0.0")]
\ No newline at end of file
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/package.json
index bdc71b3e..da39a8f8 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/package.json
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNet4.Mvc4/package.json
@@ -1,7 +1,7 @@
{
"name": "jsengineswitcher.sample.aspnet4.mvc4",
"private": true,
- "version": "3.8.2",
+ "version": "3.9.0",
"devDependencies": {
"gulp": "4.0.2",
"del": "5.1.0",
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj
index 2309ea5f..a73338ff 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1.csproj
@@ -2,7 +2,7 @@
JS Engine Switcher: Sample ASP.NET Core 1.0 MVC 1 Site
- 3.8.2
+ 3.9.0
netcoreapp1.0
1.0.16
Exe
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/package.json
index 8ec6cda5..f1ac95f3 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/package.json
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1.Mvc1/package.json
@@ -1,7 +1,7 @@
{
"name": "jsengineswitcher.sample.aspnetcore1.mvc1",
"private": true,
- "version": "3.8.2",
+ "version": "3.9.0",
"devDependencies": {
"gulp": "4.0.2",
"del": "5.1.0",
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1.csproj
index 1bbe7c77..a81b1ff4 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1.csproj
@@ -2,7 +2,7 @@
JS Engine Switcher: Sample ASP.NET Core 1.0 Full MVC 1 Site
- 3.8.2
+ 3.9.0
net451
Exe
true
@@ -29,8 +29,8 @@
-
-
+
+
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/package.json
index e3f560bd..3a908541 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/package.json
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore1Full.Mvc1/package.json
@@ -1,7 +1,7 @@
{
"name": "jsengineswitcher.sample.aspnetcore1full.mvc1",
"private": true,
- "version": "3.8.2",
+ "version": "3.9.0",
"devDependencies": {
"gulp": "4.0.2",
"del": "5.1.0",
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21.csproj
index 0555b900..9da6db18 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21.csproj
@@ -2,7 +2,7 @@
JS Engine Switcher: Sample ASP.NET Core 2.1 MVC 2.1 Site
- 3.8.2
+ 3.9.0
netcoreapp2.1
Exe
true
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/package.json
index a2be4e1c..d0e76507 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/package.json
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore21.Mvc21/package.json
@@ -1,7 +1,7 @@
{
"name": "jsengineswitcher.sample.aspnetcore21.mvc21",
"private": true,
- "version": "3.8.2",
+ "version": "3.9.0",
"devDependencies": {
"gulp": "4.0.2",
"del": "5.1.0",
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31.csproj b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31.csproj
index 9fd8c01d..710b01ae 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31.csproj
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31.csproj
@@ -2,7 +2,7 @@
JS Engine Switcher: Sample ASP.NET Core 3.1 MVC 3.1 Site
- 3.8.2
+ 3.9.0
netcoreapp3.1
Exe
true
@@ -25,8 +25,10 @@
-
-
+
+
+
+
diff --git a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/package.json b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/package.json
index 5ed78d37..3d995840 100644
--- a/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/package.json
+++ b/samples/JavaScriptEngineSwitcher.Sample.AspNetCore31.Mvc31/package.json
@@ -1,7 +1,7 @@
{
"name": "jsengineswitcher.sample.aspnetcore31.mvc31",
"private": true,
- "version": "3.8.2",
+ "version": "3.9.0",
"devDependencies": {
"gulp": "4.0.2",
"del": "5.1.0",
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj
new file mode 100644
index 00000000..ef23d6cd
--- /dev/null
+++ b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netstandard2.0
+ false
+ $(MSBuildProjectName).nuspec
+
+
+
+
+
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.nuspec b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.nuspec
new file mode 100644
index 00000000..b1cc161a
--- /dev/null
+++ b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/JavaScriptEngineSwitcher.V8.Native.linux-x64.nuspec
@@ -0,0 +1,30 @@
+
+
+
+ JavaScriptEngineSwitcher.V8.Native.linux-x64
+ 3.9.0-preview3
+ JS Engine Switcher: V8 for Linux (x64)
+ Andrey Taritsyn
+ Andrey Taritsyn
+ LICENSE.txt
+ https://github.com/Taritsyn/JavaScriptEngineSwitcher
+ icon.png
+
+ false
+ This package is deprecated. Instead, it is recommended to use a 'Microsoft.ClearScript.V8.Native.linux-x64' package.
+ Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version 8.7.220.16).
+ Copyright © 2013-2020 Andrey Taritsyn
+ en-US
+ JavaScriptEngineSwitcher JavaScript ECMAScript V8 ClearScript Linux x64
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/readme.txt b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/readme.txt
new file mode 100644
index 00000000..eff23642
--- /dev/null
+++ b/src/JavaScriptEngineSwitcher.V8.Native.linux-x64/readme.txt
@@ -0,0 +1,27 @@
+
+
+ --------------------------------------------------------------------------------
+ README file for JS Engine Switcher: V8 for Linux x64 v3.9.0 Preview 3
+
+ --------------------------------------------------------------------------------
+
+ Copyright (c) 2013-2020 Andrey Taritsyn - http://www.taritsyn.ru
+
+
+ ===========
+ DESCRIPTION
+ ===========
+ This package is deprecated. Instead, it is recommended to use a
+ 'Microsoft.ClearScript.V8.Native.linux-x64' package.
+
+ =============
+ RELEASE NOTES
+ =============
+ Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version
+ 8.7.220.16).
+
+ =============
+ DOCUMENTATION
+ =============
+ See documentation on GitHub -
+ http://github.com/Taritsyn/JavaScriptEngineSwitcher
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj
new file mode 100644
index 00000000..ef23d6cd
--- /dev/null
+++ b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netstandard2.0
+ false
+ $(MSBuildProjectName).nuspec
+
+
+
+
+
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.nuspec b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.nuspec
new file mode 100644
index 00000000..27b5fcc9
--- /dev/null
+++ b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/JavaScriptEngineSwitcher.V8.Native.osx-x64.nuspec
@@ -0,0 +1,30 @@
+
+
+
+ JavaScriptEngineSwitcher.V8.Native.osx-x64
+ 3.9.0-preview3
+ JS Engine Switcher: V8 for OS X (x64)
+ Andrey Taritsyn
+ Andrey Taritsyn
+ LICENSE.txt
+ https://github.com/Taritsyn/JavaScriptEngineSwitcher
+ icon.png
+
+ false
+ This package is deprecated. Instead, it is recommended to use a 'Microsoft.ClearScript.V8.Native.osx-x64' package.
+ Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version 8.7.220.16).
+ Copyright © 2013-2020 Andrey Taritsyn
+ en-US
+ JavaScriptEngineSwitcher JavaScript ECMAScript V8 ClearScript macOS OSX x64
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/readme.txt b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/readme.txt
new file mode 100644
index 00000000..c8a1b21c
--- /dev/null
+++ b/src/JavaScriptEngineSwitcher.V8.Native.osx-x64/readme.txt
@@ -0,0 +1,27 @@
+
+
+ --------------------------------------------------------------------------------
+ README file for JS Engine Switcher: V8 for OS X x64 v3.9.0 Preview 3
+
+ --------------------------------------------------------------------------------
+
+ Copyright (c) 2013-2020 Andrey Taritsyn - http://www.taritsyn.ru
+
+
+ ===========
+ DESCRIPTION
+ ===========
+ This package is deprecated. Instead, it is recommended to use a
+ 'Microsoft.ClearScript.V8.Native.osx-x64' package.
+
+ =============
+ RELEASE NOTES
+ =============
+ Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version
+ 8.7.220.16).
+
+ =============
+ DOCUMENTATION
+ =============
+ See documentation on GitHub -
+ http://github.com/Taritsyn/JavaScriptEngineSwitcher
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.nuspec b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.nuspec
index f4554e53..da614167 100644
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.nuspec
+++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/JavaScriptEngineSwitcher.V8.Native.win-x64.nuspec
@@ -2,7 +2,7 @@
JavaScriptEngineSwitcher.V8.Native.win-x64
- 3.8.2
+ 3.9.0-preview3
JS Engine Switcher: V8 for Windows (x64)
Andrey Taritsyn
Andrey Taritsyn
@@ -11,17 +11,16 @@
icon.png
false
- This package complements the JavaScriptEngineSwitcher.V8 package and contains the native implementation of V8 version 8.6.395.17 for Windows (x64).
- Microsoft ClearScript.V8 was updated to version 7.0 RC3.
+ This package is deprecated. Instead, it is recommended to use a 'Microsoft.ClearScript.V8.Native.win-x64' package.
+ Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version 8.7.220.16).
Copyright © 2013-2020 Andrey Taritsyn
en-US
JavaScriptEngineSwitcher JavaScript ECMAScript V8 ClearScript Windows x64
+
+
+
-
-
-
-
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/build/JavaScriptEngineSwitcher.V8.Native.win-x64.props b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/build/JavaScriptEngineSwitcher.V8.Native.win-x64.props
deleted file mode 100644
index ab976229..00000000
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/build/JavaScriptEngineSwitcher.V8.Native.win-x64.props
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- x64\ClearScriptV8-64.dll
- PreserveNewest
- False
-
-
-
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/readme.txt b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/readme.txt
index 20a86e45..8097752c 100644
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/readme.txt
+++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/readme.txt
@@ -1,7 +1,7 @@
--------------------------------------------------------------------------------
- README file for JS Engine Switcher: V8 for Windows x64 v3.8.2
+ README file for JS Engine Switcher: V8 for Windows x64 v3.9.0 Preview 3
--------------------------------------------------------------------------------
@@ -11,13 +11,14 @@
===========
DESCRIPTION
===========
- This package complements the JavaScriptEngineSwitcher.V8 package and contains
- the native implementation of V8 version 8.6.395.17 for Windows (x64).
+ This package is deprecated. Instead, it is recommended to use a
+ 'Microsoft.ClearScript.V8.Native.win-x64' package.
=============
RELEASE NOTES
=============
- Microsoft ClearScript.V8 was updated to version 7.0 RC3.
+ Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version
+ 8.7.220.16).
=============
DOCUMENTATION
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/tools/Install.ps1 b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/tools/Install.ps1
deleted file mode 100644
index 771654c5..00000000
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/tools/Install.ps1
+++ /dev/null
@@ -1,16 +0,0 @@
-param($installPath, $toolsPath, $package, $project)
-
-if ($project.Type -eq "Web Site") {
- $runtimeDirectoryPath = Join-Path $installPath "runtimes/win-x64/"
- $projectDirectoryPath = $project.Properties.Item("FullPath").Value
- $binDirectoryPath = Join-Path $projectDirectoryPath "bin"
- $assemblyFileName = "ClearScriptV8-64.dll"
-
- $assemblyDestDirectoryPath = Join-Path $binDirectoryPath "x64"
- if (!(Test-Path $assemblyDestDirectoryPath)) {
- New-Item -ItemType Directory -Force -Path $assemblyDestDirectoryPath
- }
-
- $assemblySourceFilePath = Join-Path $runtimeDirectoryPath ("native/" + $assemblyFileName)
- Copy-Item $assemblySourceFilePath $assemblyDestDirectoryPath -Force
-}
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/tools/Uninstall.ps1 b/src/JavaScriptEngineSwitcher.V8.Native.win-x64/tools/Uninstall.ps1
deleted file mode 100644
index b752c28f..00000000
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x64/tools/Uninstall.ps1
+++ /dev/null
@@ -1,14 +0,0 @@
-param($installPath, $toolsPath, $package, $project)
-
-if ($project.Type -eq "Web Site") {
- $projectDirectoryPath = $project.Properties.Item("FullPath").Value
- $binDirectoryPath = Join-Path $projectDirectoryPath "bin"
- $assemblyFileName = "ClearScriptV8-64.dll"
-
- $assemblyDirectoryPath = Join-Path $binDirectoryPath "x64"
- $assemblyFilePath = Join-Path $assemblyDirectoryPath $assemblyFileName
-
- if (Test-Path $assemblyFilePath) {
- Remove-Item $assemblyFilePath -Force
- }
-}
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.nuspec b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.nuspec
index ae1f57f0..bc08db28 100644
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.nuspec
+++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/JavaScriptEngineSwitcher.V8.Native.win-x86.nuspec
@@ -2,7 +2,7 @@
JavaScriptEngineSwitcher.V8.Native.win-x86
- 3.8.2
+ 3.9.0-preview3
JS Engine Switcher: V8 for Windows (x86)
Andrey Taritsyn
Andrey Taritsyn
@@ -11,17 +11,16 @@
icon.png
false
- This package complements the JavaScriptEngineSwitcher.V8 package and contains the native implementation of V8 version 8.6.395.17 for Windows (x86).
- Microsoft ClearScript.V8 was updated to version 7.0 RC3.
+ This package is deprecated. Instead, it is recommended to use a 'Microsoft.ClearScript.V8.Native.win-x86' package.
+ Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version 8.7.220.16).
Copyright © 2013-2020 Andrey Taritsyn
en-US
JavaScriptEngineSwitcher JavaScript ECMAScript V8 ClearScript Windows x86
+
+
+
-
-
-
-
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/build/JavaScriptEngineSwitcher.V8.Native.win-x86.props b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/build/JavaScriptEngineSwitcher.V8.Native.win-x86.props
deleted file mode 100644
index 029914bc..00000000
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/build/JavaScriptEngineSwitcher.V8.Native.win-x86.props
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- x86\ClearScriptV8-32.dll
- PreserveNewest
- False
-
-
-
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/readme.txt b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/readme.txt
index eaed06e3..ceb8ec40 100644
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/readme.txt
+++ b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/readme.txt
@@ -1,7 +1,7 @@
--------------------------------------------------------------------------------
- README file for JS Engine Switcher: V8 for Windows x86 v3.8.2
+ README file for JS Engine Switcher: V8 for Windows x86 v3.9.0 Preview 3
--------------------------------------------------------------------------------
@@ -11,13 +11,14 @@
===========
DESCRIPTION
===========
- This package complements the JavaScriptEngineSwitcher.V8 package and contains
- the native implementation of V8 version 8.6.395.17 for Windows (x86).
+ This package is deprecated. Instead, it is recommended to use a
+ 'Microsoft.ClearScript.V8.Native.win-x86' package.
=============
RELEASE NOTES
=============
- Microsoft ClearScript.V8 was updated to version 7.0 RC3.
+ Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version
+ 8.7.220.16).
=============
DOCUMENTATION
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/tools/Install.ps1 b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/tools/Install.ps1
deleted file mode 100644
index 8c44e80e..00000000
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/tools/Install.ps1
+++ /dev/null
@@ -1,16 +0,0 @@
-param($installPath, $toolsPath, $package, $project)
-
-if ($project.Type -eq "Web Site") {
- $runtimeDirectoryPath = Join-Path $installPath "runtimes/win-x86/"
- $projectDirectoryPath = $project.Properties.Item("FullPath").Value
- $binDirectoryPath = Join-Path $projectDirectoryPath "bin"
- $assemblyFileName = "ClearScriptV8-32.dll"
-
- $assemblyDestDirectoryPath = Join-Path $binDirectoryPath "x86"
- if (!(Test-Path $assemblyDestDirectoryPath)) {
- New-Item -ItemType Directory -Force -Path $assemblyDestDirectoryPath
- }
-
- $assemblySourceFilePath = Join-Path $runtimeDirectoryPath ("native/" + $assemblyFileName)
- Copy-Item $assemblySourceFilePath $assemblyDestDirectoryPath -Force
-}
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/tools/Uninstall.ps1 b/src/JavaScriptEngineSwitcher.V8.Native.win-x86/tools/Uninstall.ps1
deleted file mode 100644
index e7c75be0..00000000
--- a/src/JavaScriptEngineSwitcher.V8.Native.win-x86/tools/Uninstall.ps1
+++ /dev/null
@@ -1,14 +0,0 @@
-param($installPath, $toolsPath, $package, $project)
-
-if ($project.Type -eq "Web Site") {
- $projectDirectoryPath = $project.Properties.Item("FullPath").Value
- $binDirectoryPath = Join-Path $projectDirectoryPath "bin"
- $assemblyFileName = "ClearScriptV8-32.dll"
-
- $assemblyDirectoryPath = Join-Path $binDirectoryPath "x86"
- $assemblyFilePath = Join-Path $assemblyDirectoryPath $assemblyFileName
-
- if (Test-Path $assemblyFilePath) {
- Remove-Item $assemblyFilePath -Force
- }
-}
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8/AssemblyResolver.cs b/src/JavaScriptEngineSwitcher.V8/AssemblyResolver.cs
deleted file mode 100644
index 53e2ed79..00000000
--- a/src/JavaScriptEngineSwitcher.V8/AssemblyResolver.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-using System;
-using System.IO;
-using System.Reflection;
-
-using OriginalEngine = Microsoft.ClearScript.V8.V8ScriptEngine;
-
-using JavaScriptEngineSwitcher.V8.Constants;
-using JavaScriptEngineSwitcher.V8.Resources;
-
-namespace JavaScriptEngineSwitcher.V8
-{
- ///
- /// Assembly resolver
- ///
- internal static class AssemblyResolver
- {
- ///
- /// Initialize a assembly resolver
- ///
- public static void Initialize()
- {
- var currentDomain = AppDomain.CurrentDomain;
-#if NETFULL
- string baseDirectoryPath = currentDomain.SetupInformation.PrivateBinPath;
- if (string.IsNullOrEmpty(baseDirectoryPath))
- {
- // `PrivateBinPath` property is empty in test scenarios, so
- // need to use the `BaseDirectory` property
- baseDirectoryPath = currentDomain.BaseDirectory;
- }
-#else
- string baseDirectoryPath = currentDomain.BaseDirectory;
-#endif
-
- string platformName;
- int platformBitness;
- if (Environment.Is64BitProcess)
- {
- platformName = "x64";
- platformBitness = 64;
- }
- else
- {
- platformName = "x86";
- platformBitness = 32;
- }
-
- string assemblyName = DllName.Universal + "-" + platformBitness.ToString();
- string assemblyDirectoryPath = Path.Combine(baseDirectoryPath, platformName);
- string assemblyFileName = assemblyName + ".dll";
- string assemblyFilePath = Path.Combine(assemblyDirectoryPath, assemblyFileName);
- bool assemblyFileExists = File.Exists(assemblyFilePath);
-
- if (assemblyFileExists)
- {
- if (!SetDeploymentDir(platformName))
- {
- throw new InvalidOperationException(
- string.Format(Strings.Engines_SettingDeploymentDirectoryToV8ProxyFailed, platformName));
- }
- }
- }
-
- ///
- /// Sets a deployment directory name to V8 proxy
- ///
- /// Deployment directory name
- /// Result of operation (true - success; false - fail)
- private static bool SetDeploymentDir(string directoryName)
- {
- Assembly clearScriptAssembly = typeof(OriginalEngine).Assembly;
- Type v8ProxyType = clearScriptAssembly.GetType("Microsoft.ClearScript.V8.V8Proxy");
-
- bool success = true;
-
- try
- {
- FieldInfo deploymentDirNameFieldInfo = v8ProxyType.GetField("deploymentDirName",
- BindingFlags.NonPublic | BindingFlags.Static);
- deploymentDirNameFieldInfo.SetValue(null, directoryName);
- }
- catch
- {
- success = false;
- }
-
- return success;
- }
- }
-}
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8/Constants/DllName.cs b/src/JavaScriptEngineSwitcher.V8/Constants/DllName.cs
deleted file mode 100644
index 40d51c52..00000000
--- a/src/JavaScriptEngineSwitcher.V8/Constants/DllName.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace JavaScriptEngineSwitcher.V8.Constants
-{
- ///
- /// DLL names
- ///
- internal static class DllName
- {
- public const string Universal = "ClearScriptV8";
- public const string ForWindows32Bit = Universal + "-32.dll";
- public const string ForWindows64Bit = Universal + "-64.dll";
- }
-}
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8/JavaScriptEngineSwitcher.V8.csproj b/src/JavaScriptEngineSwitcher.V8/JavaScriptEngineSwitcher.V8.csproj
index 079ab754..3b994216 100644
--- a/src/JavaScriptEngineSwitcher.V8/JavaScriptEngineSwitcher.V8.csproj
+++ b/src/JavaScriptEngineSwitcher.V8/JavaScriptEngineSwitcher.V8.csproj
@@ -2,22 +2,26 @@
JS Engine Switcher: V8
- 3.8.2
+ 3.9.0
+ preview3
net45;netcoreapp3.1
Library
true
$(NoWarn);CS1591
true
true
- JavaScriptEngineSwitcher.V8 contains adapter `V8JsEngine` (wrapper for the Microsoft ClearScript.V8 (http://github.com/Microsoft/ClearScript) version 7.0 RC3).
+ JavaScriptEngineSwitcher.V8 contains adapter `V8JsEngine` (wrapper for the Microsoft ClearScript.V8 (http://github.com/Microsoft/ClearScript) version 7.0 RC5).
This package does not contain the native ClearScript.V8 assemblies. Therefore, you need to choose and install the most appropriate package(s) for your platform. The following packages are available:
- * JavaScriptEngineSwitcher.V8.Native.win-x86
- * JavaScriptEngineSwitcher.V8.Native.win-x64
+ * Microsoft.ClearScript.V8.Native.win-x86
+ * Microsoft.ClearScript.V8.Native.win-x64
+ * Microsoft.ClearScript.V8.Native.linux-x64
+ * Microsoft.ClearScript.V8.Native.osx-x64
icon.png
JavaScriptEngineSwitcher;JavaScript;ECMAScript;V8;ClearScript
- Microsoft ClearScript.V8 was updated to version 7.0 RC3.
+ 1. Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8 version 8.7.220.16);
+2. Own versions of the ClearScript's assemblies are no longer build, because the official NuGet package is now used. Therefore, you should also replace in your projects the `JavaScriptEngineSwitcher.V8.Native.*` packages by the `Microsoft.ClearScript.V8.Native.*` packages.
@@ -26,11 +30,9 @@ This package does not contain the native ClearScript.V8 assemblies. Therefore, y
-
- ../../lib/ClearScript/lib/$(TargetFramework)/ClearScript.dll
-
+
@@ -67,14 +69,5 @@ This package does not contain the native ClearScript.V8 assemblies. Therefore, y
-
-
- <_PackageFiles Include="bin/$(Configuration)/*/ClearScript.dll;bin/$(Configuration)/*/ClearScript.xml">
- lib/%(RecursiveDir)
- false
- None
-
-
-
\ No newline at end of file
diff --git a/src/JavaScriptEngineSwitcher.V8/V8JsEngine.cs b/src/JavaScriptEngineSwitcher.V8/V8JsEngine.cs
index f0835ae1..9a4ecd37 100644
--- a/src/JavaScriptEngineSwitcher.V8/V8JsEngine.cs
+++ b/src/JavaScriptEngineSwitcher.V8/V8JsEngine.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
@@ -29,7 +30,6 @@
using WrapperScriptException = JavaScriptEngineSwitcher.Core.JsScriptException;
using WrapperUsageException = JavaScriptEngineSwitcher.Core.JsUsageException;
-using JavaScriptEngineSwitcher.V8.Constants;
using JavaScriptEngineSwitcher.V8.Resources;
namespace JavaScriptEngineSwitcher.V8
@@ -47,7 +47,7 @@ public sealed class V8JsEngine : JsEngineBase
///
/// Version of original JS engine
///
- private const string EngineVersion = "8.6.395.17";
+ private const string EngineVersion = "8.7.220.16";
///
/// V8 JS engine
@@ -68,14 +68,15 @@ public sealed class V8JsEngine : JsEngineBase
"Load failure information for (?" + CommonRegExps.DocumentNamePattern + "):");
///
- /// Synchronizer of JS engine initialization
+ /// Mapping of native assemblies and NuGet packages
///
- private static readonly object _initializationSynchronizer = new object();
-
- ///
- /// Flag indicating whether the JS engine is initialized
- ///
- private static bool _initialized;
+ private static readonly Dictionary _nativeAssemblyPackageMap = new Dictionary
+ {
+ { "ClearScriptV8.win-x86.dll", "Microsoft.ClearScript.V8.Native.win-x86" },
+ { "ClearScriptV8.win-x64.dll", "Microsoft.ClearScript.V8.Native.win-x64" },
+ { "ClearScriptV8.linux-x64.so", "Microsoft.ClearScript.V8.Native.linux-x64" },
+ { "ClearScriptV8.osx-x64.dylib", "Microsoft.ClearScript.V8.Native.osx-x64" }
+ };
///
@@ -91,8 +92,6 @@ public V8JsEngine()
/// Settings of the V8 JS engine
public V8JsEngine(V8Settings settings)
{
- Initialize();
-
V8Settings v8Settings = settings ?? new V8Settings();
var constraints = new OriginalRuntimeConstraints
@@ -123,10 +122,12 @@ public V8JsEngine(V8Settings settings)
try
{
- _jsEngine = new OriginalEngine(constraints, flags, debugPort);
- _jsEngine.MaxRuntimeHeapSize = v8Settings.MaxHeapSize;
- _jsEngine.RuntimeHeapSizeSampleInterval = v8Settings.HeapSizeSampleInterval;
- _jsEngine.MaxRuntimeStackUsage = v8Settings.MaxStackUsage;
+ _jsEngine = new OriginalEngine(constraints, flags, debugPort)
+ {
+ MaxRuntimeHeapSize = v8Settings.MaxHeapSize,
+ RuntimeHeapSizeSampleInterval = v8Settings.HeapSizeSampleInterval,
+ MaxRuntimeStackUsage = v8Settings.MaxStackUsage
+ };
}
catch (TypeLoadException e)
{
@@ -139,29 +140,6 @@ public V8JsEngine(V8Settings settings)
}
- ///
- /// Initializes a JS engine
- ///
- private static void Initialize()
- {
- if (_initialized)
- {
- return;
- }
-
- lock (_initializationSynchronizer)
- {
- if (_initialized)
- {
- return;
- }
-
- AssemblyResolver.Initialize();
-
- _initialized = true;
- }
- }
-
#region Mapping
///
@@ -328,14 +306,11 @@ private static WrapperEngineLoadException WrapTypeLoadException(
StringBuilder descriptionBuilder = stringBuilderPool.Rent();
descriptionBuilder.AppendFormat(CoreStrings.Engine_AssemblyNotFound, assemblyFileName);
descriptionBuilder.Append(" ");
- if (assemblyFileName == DllName.ForWindows64Bit || assemblyFileName == DllName.ForWindows32Bit)
+
+ string packageName;
+ if (_nativeAssemblyPackageMap.TryGetValue(assemblyFileName, out packageName))
{
- descriptionBuilder.AppendFormat(CoreStrings.Engine_NuGetPackageInstallationRequired,
- assemblyFileName == DllName.ForWindows64Bit ?
- "JavaScriptEngineSwitcher.V8.Native.win-x64"
- :
- "JavaScriptEngineSwitcher.V8.Native.win-x86"
- );
+ descriptionBuilder.AppendFormat(CoreStrings.Engine_NuGetPackageInstallationRequired, packageName);
}
else
{
diff --git a/src/JavaScriptEngineSwitcher.V8/readme.txt b/src/JavaScriptEngineSwitcher.V8/readme.txt
index 59462ea4..dca70a89 100644
--- a/src/JavaScriptEngineSwitcher.V8/readme.txt
+++ b/src/JavaScriptEngineSwitcher.V8/readme.txt
@@ -1,7 +1,7 @@
--------------------------------------------------------------------------------
- README file for JS Engine Switcher: V8 v3.8.2
+ README file for JS Engine Switcher: V8 v3.9.0 Preview 3
--------------------------------------------------------------------------------
@@ -13,19 +13,26 @@
===========
JavaScriptEngineSwitcher.V8 contains adapter `V8JsEngine` (wrapper for the
Microsoft ClearScript.V8 (http://github.com/Microsoft/ClearScript) version
- 7.0 RC3).
+ 7.0 RC5).
This package does not contain the native ClearScript.V8 assemblies.
Therefore, you need to choose and install the most appropriate package(s) for
your platform. The following packages are available:
- * JavaScriptEngineSwitcher.V8.Native.win-x86
- * JavaScriptEngineSwitcher.V8.Native.win-x64
+ * Microsoft.ClearScript.V8.Native.win-x86
+ * Microsoft.ClearScript.V8.Native.win-x64
+ * Microsoft.ClearScript.V8.Native.linux-x64
+ * Microsoft.ClearScript.V8.Native.osx-x64
=============
RELEASE NOTES
=============
- Microsoft ClearScript.V8 was updated to version 7.0 RC3.
+ 1. Microsoft ClearScript.V8 was updated to version 7.0 RC5 (support of V8
+ version 8.7.220.16);
+ 2. Own versions of the ClearScript's assemblies are no longer build, because the
+ official NuGet package is now used. Therefore, you should also replace in
+ your projects the `JavaScriptEngineSwitcher.V8.Native.*` packages by the
+ `Microsoft.ClearScript.V8.Native.*` packages.
=============
DOCUMENTATION
diff --git a/test/JavaScriptEngineSwitcher.Benchmarks/JavaScriptEngineSwitcher.Benchmarks.csproj b/test/JavaScriptEngineSwitcher.Benchmarks/JavaScriptEngineSwitcher.Benchmarks.csproj
index 74ee0104..d6e67fcd 100644
--- a/test/JavaScriptEngineSwitcher.Benchmarks/JavaScriptEngineSwitcher.Benchmarks.csproj
+++ b/test/JavaScriptEngineSwitcher.Benchmarks/JavaScriptEngineSwitcher.Benchmarks.csproj
@@ -2,7 +2,7 @@
JS Engine Switcher: Benchmarks
- 3.8.2
+ 3.9.0
net461;netcoreapp2.1;netcoreapp3.1
Exe
true
@@ -35,12 +35,17 @@
-
-
+
+
+
+
+
+
+
diff --git a/test/JavaScriptEngineSwitcher.Tests/JavaScriptEngineSwitcher.Tests.csproj b/test/JavaScriptEngineSwitcher.Tests/JavaScriptEngineSwitcher.Tests.csproj
index caea0fcf..0c00cbaf 100644
--- a/test/JavaScriptEngineSwitcher.Tests/JavaScriptEngineSwitcher.Tests.csproj
+++ b/test/JavaScriptEngineSwitcher.Tests/JavaScriptEngineSwitcher.Tests.csproj
@@ -2,7 +2,7 @@
JS Engine Switcher: Tests
- 3.8.2
+ 3.9.0
net452;net471;netcoreapp1.0;netcoreapp2.1;netcoreapp3.1
1.0.16
Library
@@ -50,8 +50,13 @@
-
-
+
+
+
+
+
+
+