This topic has not yet been rated - Rate this topic

TypeProvider Class

An implementation of ITypeProvider that acts as a container of types within the indicated assemblies and code compile units.

System.Object
  System.Workflow.ComponentModel.Compiler.TypeProvider

Namespace:  System.Workflow.ComponentModel.Compiler
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
public sealed class TypeProvider : ITypeProvider, 
	IServiceProvider, IDisposable

The TypeProvider type exposes the following members.

  Name Description
Public method TypeProvider Initializes a new instance of the TypeProvider class.
Top
  Name Description
Public property AssemblyNameResolver Gets or sets the delegate that references a method with one parameter and one return value that returns the assembly display name in which a specified type belongs to.
Public property IsSupportedPropertyResolver Gets or sets the delegate that references a method with two parameters and one return value that determines whether a specified property is supported in the target .NET Framework.
Public property LocalAssembly Gets a value that represents the locally defined Assembly for this instance.
Public property ReferencedAssemblies Gets a collection of all assemblies referenced by the Type.
Public property TypeLoadErrors Gets an IDictionary of load error exceptions keyed by the Object that causes the Exception.
Top
  Name Description
Public method AddAssembly Adds an already-loaded assembly. It is the caller's responsibility to load the assembly, and TypeProvider includes the types from this assembly for dispensing when GetType() is called.
Public method AddAssemblyReference Adds a reference to the Assembly to the internal list. This assembly is used for the Type lookup in the GetType method.
Public method AddCodeCompileUnit Adds a reference to the CodeCompileUnit to the internal list. This CodeCompileUnit is used for the Type lookup in the GetType method.
Public method Dispose Releases all resources used by the TypeProvider.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetAssemblyName Returns the assembly display name of the assembly in which the specified type is declared.
Public method Static member GetEnumNames Provides a string array that contains the names for the specified Enum in indexed order.
Public method Static member GetEventHandlerType Gets the Type of an EventHandler, given a reference to an EventInfo.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetService Gets the Object that provides the designated service Type.
Public method GetType() Gets the Type of the current instance. (Inherited from Object.)
Public method GetType(String) Gets the type from the set of assemblies added to the TypeProvider using AddAssembly, AddAssemblyReference, or AddCodeCompileUnit.
Public method GetType(String, Boolean) Gets the type from the set of assemblies added to the TypeProvider using AddAssembly, AddAssemblyReference, or AddCodeCompileUnit.
Public method GetTypes Creates an array that contains each Type known to this instance.
Public method Static member IsAssignable Indicates whether one type can be safely assigned to another type.
Public method Static member IsEnum Indicates whether a Type is of type Enum .
Public method Static member IsSubclassOf Indicates whether a Type is a derived class of another Type .
Public method IsSupportedProperty Returns a value that determines whether the specified property is supported in the target .NET Framework.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method RefreshCodeCompileUnit Updates the CodeCompileUnit reference associated with this instance.
Public method RemoveAssembly Removes all references to the subject Assembly from this instance.
Public method RemoveAssemblyReference Removes a path-based Assembly reference from this instance.
Public method RemoveCodeCompileUnit Removes all references to the subject CodeCompileUnit from this instance.
Public method SetLocalAssembly Sets the value of the local Assembly to the referenced Assembly .
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top
  Name Description
Public event TypeLoadErrorsChanged Occurs when the collection TypeLoadErrors is modified.
Public event TypesChanged Occurs when the collection of defined types is modified.
Top

This ITypeProvider implementation, in addition to handling compiled assemblies (AddAssembly and AddAssemblyReference methods), can handle types that have not been compiled yet (AddCodeCompileUnit). The limited implementation of System.Type is returned for types referenced using CodeCompileUnit.

Note Note

TypeProvider only returns public types from referenced assemblies, and both public and non-public types from local assemblies.

.NET Framework

Supported in: 4, 3.5, 3.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ