HostFunctions
The HostFunctions object provides access to basic .NET functionality as defined here: https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_HostFunctions.ht m
For example, a .NET array can be created if necessary:
var array = host.newArr(10);
ExtendedHostFunctions
The ExtendedHostFunctions object provides access to extended .NET functionality as defined here: https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_HostFunctions.htm
For example, the .NET File class can be referenced to access file information on disk:
var File = xHost.type("System.IO.File"); var text = File.ReadAllText(filePath);
Other libraries can be accessed for specific classes:
var DrawingLib = xHost.lib("System.Drawing"); var Color = DrawingLib.System.Drawing.Color;