ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
Extensions Class
Extensions Methods

# Extensions Class

Defines extension methods for use with all script engines.
Inheritance Hierarchy
SystemObject
Microsoft.ClearScriptExtensions
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public static class Extensions

    <ExtensionAttribute>
    Public NotInheritable Class Extensions

    [ExtensionAttribute]
    public ref class Extensions abstract sealed

    [<AbstractClassAttribute>]
    [<SealedAttribute>]
    [<ExtensionAttribute>]
    type Extensions = class end

The Extensions type exposes the following members.

Methods

| Name | Description
--- | --- | ---
| ToHostType(Type) | Converts a type to a host type for use with script code currently running on the calling thread.
| ToHostType(Type, ScriptEngine) | Converts a type to a host type for use with script code running in the specified script engine.
| ToRestrictedHostObject(Object, Type) | Converts an object to a host object with a type restriction specified as a Type instance, for use with script code currently running on the calling thread.
| ToRestrictedHostObject(Object, Type, ScriptEngine) | Converts an object to a host object with a type restriction specified as a Type instance, for use with script code running in the specified script engine.
| ToRestrictedHostObjectT(T) | Converts an object to a host object with the specified type restriction, for use with script code currently running on the calling thread.
| ToRestrictedHostObjectT(T, ScriptEngine) | Converts an object to a host object with the specified type restriction, for use with script code running in the specified script engine.

Top
See Also

#### Reference

Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft