Click or drag to resize

HostTypeCollection Class

Represents a scriptable collection of host types.
Inheritance Hierarchy

Namespace:  Microsoft.ClearScript
Assembly:  ClearScript.Core (in ClearScript.Core.dll) Version: 7.2.4
Syntax
public class HostTypeCollection : PropertyBag

The HostTypeCollection type exposes the following members.

Constructors
  NameDescription
Public methodHostTypeCollection
Initializes a new host type collection.
Public methodHostTypeCollection(Assembly)
Initializes a new host type collection with types from one or more assemblies.
Public methodHostTypeCollection(String)
Initializes a new host type collection with types from one or more assemblies. The assemblies are specified by name.
Public methodHostTypeCollection(PredicateType, Assembly)
Initializes a new host type collection with selected types from one or more assemblies.
Public methodHostTypeCollection(PredicateType, String)
Initializes a new host type collection with selected types from one or more assemblies. The assemblies are specified by name.
Top
Properties
  NameDescription
Public propertyComparer
Gets the property name comparer for the PropertyBag.
(Inherited from PropertyBag.)
Public propertyItem
Gets or sets a property value in the PropertyBag.
(Inherited from PropertyBag.)
Public propertyKeys
Gets a collection of property names from the PropertyBag.
(Inherited from PropertyBag.)
Public propertyValues
Gets a collection of property values from the PropertyBag.
(Inherited from PropertyBag.)
Top
Methods
  NameDescription
Public methodAdd
Adds a property to the PropertyBag.
(Inherited from PropertyBag.)
Public methodAddAssembly(Assembly)
Adds types from an assembly to a host type collection.
Public methodAddAssembly(String)
Adds types from an assembly to a host type collection. The assembly is specified by name.
Public methodAddAssembly(Assembly, PredicateType)
Adds selected types from an assembly to a host type collection.
Public methodAddAssembly(String, PredicateType)
Adds selected types from an assembly to a host type collection. The assembly is specified by name.
Public methodAddType(Type)
Adds a type to a host type collection.
Public methodAddType(String, Type)
Adds a type to a host type collection. The type is specified by name.
Public methodAddType(String, String, Type)
Adds a type to a host type collection. The type is specified by type name and assembly name.
Public methodClearNoCheck
Removes all properties without checking whether the PropertyBag is read-only.
(Inherited from PropertyBag.)
Public methodContainsKey
Determines whether the PropertyBag contains a property with the specified name.
(Inherited from PropertyBag.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNamespaceNode
Locates a namespace within a host type collection.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove
Removes a property from the PropertyBag.
(Inherited from PropertyBag.)
Public methodRemovePropertyNoCheck
Removes a property without checking whether the PropertyBag is read-only.
(Inherited from PropertyBag.)
Public methodSetPropertyNoCheck
Sets a property value without checking whether the PropertyBag is read-only.
(Inherited from PropertyBag.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetValue
Looks up a property value in the PropertyBag.
(Inherited from PropertyBag.)
Top
Events
  NameDescription
Public eventPropertyChanged
Occurs when a property is added or replaced, or when the collection is cleared.
(Inherited from PropertyBag.)
Top
Remarks
Host type collections provide convenient scriptable access to all the types defined in one or more host assemblies. They are hierarchical collections where leaf nodes represent types and parent nodes represent namespaces. For example, if an assembly contains a type named "Acme.Gadgets.Button", the corresponding collection will have a property named "Acme" whose value is an object with a property named "Gadgets" whose value is an object with a property named "Button" whose value represents the Acme.Gadgets.Button host type. Use AddHostObject to expose a host type collection to script code.
See Also