Click or drag to resize

ScriptEngineAddHostType Method (String, HostItemFlags, Type)

Exposes a host type to script code with the specified options.

Namespace:  Microsoft.ClearScript
Assembly:  ClearScript.Core (in ClearScript.Core.dll) Version: 7.3.1
Syntax
public void AddHostType(
	string itemName,
	HostItemFlags flags,
	Type type
)

Parameters

itemName
Type: SystemString
A name for the new global script item that will represent the type.
flags
Type: Microsoft.ClearScriptHostItemFlags
A value that selects options for the operation.
type
Type: SystemType
The type to expose.
Remarks

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 AddHostObject(String, HostItemFlags, Object).

See Also