Click or drag to resize

ExtendedHostFunctions Class

Provides optional script-callable utility functions. This extended version allows script code to import host types.
Inheritance Hierarchy
SystemObject
  Microsoft.ClearScriptHostFunctions
    Microsoft.ClearScriptExtendedHostFunctions

Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax
public class ExtendedHostFunctions : HostFunctions

The ExtendedHostFunctions type exposes the following members.

Constructors
 NameDescription
Public methodExtendedHostFunctions Initializes a new ExtendedHostFunctions instance.
Top
Methods
 NameDescription
Public methodarrTypeT Imports the host array type for the specified element type.
Public methodCode exampleasTypeT Casts an object to the specified host type, returning null if the cast fails.
(Inherited from HostFunctions)
Public methodCode examplecastT Casts an object to the specified host type.
(Inherited from HostFunctions)
Public methodCode examplecomType Imports a COM/ActiveX type.
Public methodCode exampledelT Creates a delegate that invokes a script function.
(Inherited from HostFunctions)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodCode exampleflagsT Creates a strongly typed flag set.
(Inherited from HostFunctions)
Public methodCode examplefuncT(Int32, Object) Creates a delegate that invokes a script function and returns a value of the specified type.
(Inherited from HostFunctions)
Public methodgetElement Gets the value of an element in a dynamic host object that implements IDynamicMetaObjectProvider.
(Inherited from HostFunctions)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodgetProperty(IDynamicMetaObjectProvider, String) Gets the value of a property in a dynamic host object that implements IDynamicMetaObjectProvider.
(Inherited from HostFunctions)
Public methodgetProperty(IPropertyBag, String) Gets the value of a property in a dynamic host object that implements IPropertyBag.
(Inherited from HostFunctions)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodisNull Determines whether the specified value is null.
(Inherited from HostFunctions)
Public methodCode exampleisTypeT Determines whether an object is compatible with the specified host type.
(Inherited from HostFunctions)
Public methodisTypeObj(Object) Determines whether an object is a host type. This version is invoked if the specified object cannot be used as a type argument.
(Inherited from HostFunctions)
Public methodisTypeObjT Determines whether an object is a host type. This version is invoked if the specified object can be used as a type argument.
(Inherited from HostFunctions)
Public methodCode examplelib(String) Imports types from one or more host assemblies.
Public methodCode examplelib(HostTypeCollection, String) Imports types from one or more host assemblies and merges them with an existing host type collection.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodCode examplenewArrT(Int32) Creates a host array with the specified element type.
(Inherited from HostFunctions)
Public methodCode examplenewComObj Creates a COM/ActiveX object of the specified type.
Public methodCode examplenewObj Creates an empty host object.
(Inherited from HostFunctions)
Public methodnewObj(IDynamicMetaObjectProvider, Object) Performs dynamic instantiation.
(Inherited from HostFunctions)
Public methodnewObj(Object, Object) Creates a host object of the specified type. This version is invoked if the specified type cannot be used as a type argument.
(Inherited from HostFunctions)
Public methodCode examplenewObjT(Object) Creates a host object of the specified type. This version is invoked if the specified type can be used as a type argument.
(Inherited from HostFunctions)
Public methodCode examplenewVarT Creates a host variable of the specified type.
(Inherited from HostFunctions)
Public methodCode exampleproc Creates a delegate that invokes a script function and returns no value.
(Inherited from HostFunctions)
Public methodremoveElement Removes an element from a dynamic host object that implements IDynamicMetaObjectProvider.
(Inherited from HostFunctions)
Public methodremoveProperty(IDynamicMetaObjectProvider, String) Removes a property from a dynamic host object that implements IDynamicMetaObjectProvider.
(Inherited from HostFunctions)
Public methodremoveProperty(IPropertyBag, String) Removes a property from a dynamic host object that implements IPropertyBag.
(Inherited from HostFunctions)
Public methodsetElement Sets an element value in a dynamic host object that implements IDynamicMetaObjectProvider.
(Inherited from HostFunctions)
Public methodsetProperty(IDynamicMetaObjectProvider, String, Object) Sets a property value in a dynamic host object that implements IDynamicMetaObjectProvider.
(Inherited from HostFunctions)
Public methodsetProperty(IPropertyBag, String, Object) Sets a property value in a dynamic host object that implements IPropertyBag.
(Inherited from HostFunctions)
Public methodCode exampletoByte Converts the specified value to a strongly typed Byte instance.
(Inherited from HostFunctions)
Public methodCode exampletoChar Converts the specified value to a strongly typed Char instance.
(Inherited from HostFunctions)
Public methodCode exampletoDecimal Converts the specified value to a strongly typed Decimal instance.
(Inherited from HostFunctions)
Public methodCode exampletoDouble Converts the specified value to a strongly typed Double instance.
(Inherited from HostFunctions)
Public methodCode exampletoInt16 Converts the specified value to a strongly typed Int16 instance.
(Inherited from HostFunctions)
Public methodCode exampletoInt32 Converts the specified value to a strongly typed Int32 instance.
(Inherited from HostFunctions)
Public methodCode exampletoInt64 Converts the specified value to a strongly typed Int64 instance.
(Inherited from HostFunctions)
Public methodCode exampletoSByte Converts the specified value to a strongly typed SByte instance.
(Inherited from HostFunctions)
Public methodCode exampletoSingle Converts the specified value to a strongly typed Single instance.
(Inherited from HostFunctions)
Public methodtoStaticType Casts a dynamic host object to its static type.
(Inherited from HostFunctions)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodCode exampletoUInt16 Converts the specified value to a strongly typed UInt16 instance.
(Inherited from HostFunctions)
Public methodCode exampletoUInt32 Converts the specified value to a strongly typed UInt32 instance.
(Inherited from HostFunctions)
Public methodCode exampletoUInt64 Converts the specified value to a strongly typed UInt64 instance.
(Inherited from HostFunctions)
Public methodCode exampletryCatch Allows script code to handle host exceptions.
(Inherited from HostFunctions)
Public methodtype(Type) Imports the host type for the specified Type.
Public methodCode exampletype(String, Object) Imports a host type by name.
Public methodCode exampletype(String, String, Object) Imports a host type by name from the specified assembly.
Public methodtypeLibEnumsT Imports enumerations defined within or referenced from a COM/ActiveX type library.
Public methodCode exampletypeOf(Object) Gets the Type for the specified host type. This version is invoked if the specified object cannot be used as a type argument.
(Inherited from HostFunctions)
Public methodCode exampletypeOfT Gets the Type for the specified host type. This version is invoked if the specified object can be used as a type argument.
(Inherited from HostFunctions)
Top
See Also