@@ -41,7 +41,8 @@ These settings can be set manually or added to the AppSettings of your applicati
4141 //V8 Max Old Space in bytes:
4242 int MaxOldSpaceBytes { get; }
4343
44- //Default script timeout in ms. If the script timeout is set to 0, the script will not execute within a Task with a timeout.
44+ //Default script timeout in ms.
45+ //If the script timeout is set to 0, the script will not execute within a Task with a timeout.
4546 int ScriptTimeoutMilliSeconds { get; }
4647
4748 //Max number of simultaneous V8 Runtimes:
@@ -67,11 +68,11 @@ To run multiple scripts, use the ExecuteAsync that accepts an enumerable of scri
6768Settings will be applied to all scripts in the collection. Scripts can be actual code, a local file path or a Uri.
6869
6970 await manager.ExecuteAsync(new List<IncludeScript>
70- {
71- new IncludeScript {Uri = ".\\TestMainScript.js", ScriptId = "testScript"},
72- new IncludeScript {Code = "subject.TestString = 'test string3';", ScriptId = "testScript3"},
73- new IncludeScript {Uri = "https://gist.githubusercontent.com/eswann/62fc90e542f7697263db/raw/026c42ef0043a70a8c3b720e3026ecee9c691a06/gistfile1 .txt", ScriptId = "TestScript4"}
74- });
71+ {
72+ new IncludeScript {Uri = ".\\TestMainScript.js", ScriptId = "testScript"},
73+ new IncludeScript {Code = "subject.TestString = 'test string3';", ScriptId = "testScript3"},
74+ new IncludeScript {Uri = "https://www.myscriptishere.org/script .txt", ScriptId = "TestScript4"}
75+ });
7576
7677
7778### Execution Options
@@ -83,7 +84,8 @@ Execution options are the new way of passing options to the ClearScript runtime
8384 /// Types to make available to the JavaScript runtime.
8485 public IEnumerable<HostType> HostTypes
8586
86- /// Indicates that this script should be added to the script cache once compiled. Default is True.
87+ /// Indicates that this script should be added to the script cache once compiled.
88+ /// Default is True.
8789 public bool AddToCache
8890
8991 /// External JavaScripts to import before executing the current script.
@@ -96,7 +98,8 @@ Host objects are a way of passing an object instance to JavaScript from .Net.
9698 var manager = new RuntimeManager(new ManualManagerSettings());
9799
98100 await manager.ExecuteAsync("testscript", "subject.Count = 10;",
99- new ExecutionOptions{HostObjects = new List<HostObject> {new HostObject {Name = "subject", Target = subject}}});
101+ new ExecutionOptions{HostObjects =
102+ new List<HostObject> {new HostObject {Name = "subject", Target = subject}}});
100103
101104#### Passing in Host Types
102105Host types allow you to instantiate a .Net type or types in the JavaScript runtime.
@@ -111,8 +114,8 @@ Host types allow you to instantiate a .Net type or types in the JavaScript runti
111114
112115 await manager.ExecuteAsync("testscript", "subject.Result = MathStuff.Pow(10,2);",
113116 new ExecutionOptions{
114- HostObjects = new List<HostObject> { new HostObject { Name = "subject", Target = subject } },
115- HostTypes = new List<HostType> { hostType }});
117+ HostObjects = new List<HostObject> { new HostObject { Name = "subject", Target = subject } },
118+ HostTypes = new List<HostType> { hostType }});
116119
117120#### Passing in Included Scripts
118121Included scripts can also be run by setting the IncludeScripts property on the ExecutionOptions. These scripts are
0 commit comments