TypeProvider TypeProvider TypeProvider TypeProvider Class

Definition

Warning

This API is now obsolete.

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

public ref class TypeProvider sealed : IDisposable, IServiceProvider, System::Workflow::ComponentModel::Compiler::ITypeProvider
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class TypeProvider : IDisposable, IServiceProvider, System.Workflow.ComponentModel.Compiler.ITypeProvider
type TypeProvider = class
    interface ITypeProvider
    interface IServiceProvider
    interface IDisposable
Public NotInheritable Class TypeProvider
Implements IDisposable, IServiceProvider, ITypeProvider
Inheritance
TypeProviderTypeProviderTypeProviderTypeProvider
Attributes
Implements

Remarks

Note

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

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

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

Constructors

TypeProvider(IServiceProvider) TypeProvider(IServiceProvider) TypeProvider(IServiceProvider) TypeProvider(IServiceProvider)

Initializes a new instance of the TypeProvider class.

Properties

AssemblyNameResolver AssemblyNameResolver AssemblyNameResolver 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.

IsSupportedPropertyResolver IsSupportedPropertyResolver IsSupportedPropertyResolver 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.

LocalAssembly LocalAssembly LocalAssembly LocalAssembly

Gets a value that represents the locally defined Assembly for this instance.

ReferencedAssemblies ReferencedAssemblies ReferencedAssemblies ReferencedAssemblies

Gets a collection of all assemblies referenced by the Type.

TypeLoadErrors TypeLoadErrors TypeLoadErrors TypeLoadErrors

Gets an IDictionary of load error exceptions keyed by the Object that causes the Exception.

Methods

AddAssembly(Assembly) AddAssembly(Assembly) AddAssembly(Assembly) AddAssembly(Assembly)

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.

AddAssemblyReference(String) AddAssemblyReference(String) AddAssemblyReference(String) AddAssemblyReference(String)

Adds a reference to the Assembly to the internal list. This assembly is used for the Type lookup in the GetType(String) method.

AddCodeCompileUnit(CodeCompileUnit) AddCodeCompileUnit(CodeCompileUnit) AddCodeCompileUnit(CodeCompileUnit) AddCodeCompileUnit(CodeCompileUnit)

Adds a reference to the CodeCompileUnit to the internal list. This CodeCompileUnit is used for the Type lookup in the GetType(String) method.

Dispose() Dispose() Dispose() Dispose()

Releases all resources used by the TypeProvider.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetAssemblyName(Type) GetAssemblyName(Type) GetAssemblyName(Type) GetAssemblyName(Type)

Returns the assembly display name of the assembly in which the specified type is declared.

GetEnumNames(Type) GetEnumNames(Type) GetEnumNames(Type) GetEnumNames(Type)

Provides a string array that contains the names for the specified Enum in indexed order.

GetEventHandlerType(EventInfo) GetEventHandlerType(EventInfo) GetEventHandlerType(EventInfo) GetEventHandlerType(EventInfo)

Gets the Type of an EventHandler, given a reference to an EventInfo.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetService(Type) GetService(Type) GetService(Type) GetService(Type)

Gets the Object that provides the designated service Type.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetType(String) GetType(String) GetType(String) GetType(String)

Gets the type from the set of assemblies added to the TypeProvider using AddAssembly(Assembly), AddAssemblyReference(String), or AddCodeCompileUnit(CodeCompileUnit).

GetType(String, Boolean) GetType(String, Boolean) GetType(String, Boolean) GetType(String, Boolean)

Gets the type from the set of assemblies added to the TypeProvider using AddAssembly(Assembly), AddAssemblyReference(String), or AddCodeCompileUnit(CodeCompileUnit).

GetTypes() GetTypes() GetTypes() GetTypes()

Creates an array that contains each Type known to this instance.

IsAssignable(Type, Type) IsAssignable(Type, Type) IsAssignable(Type, Type) IsAssignable(Type, Type)

Indicates whether one type can be safely assigned to another type.

IsEnum(Type) IsEnum(Type) IsEnum(Type) IsEnum(Type)

Indicates whether a Type is of type Enum .

IsSubclassOf(Type, Type) IsSubclassOf(Type, Type) IsSubclassOf(Type, Type) IsSubclassOf(Type, Type)

Indicates whether a Type is a derived class of another Type .

IsSupportedProperty(PropertyInfo, Object) IsSupportedProperty(PropertyInfo, Object) IsSupportedProperty(PropertyInfo, Object) IsSupportedProperty(PropertyInfo, Object)

Returns a value that determines whether the specified property is supported in the target .NET Framework.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RefreshCodeCompileUnit(CodeCompileUnit, EventHandler) RefreshCodeCompileUnit(CodeCompileUnit, EventHandler) RefreshCodeCompileUnit(CodeCompileUnit, EventHandler) RefreshCodeCompileUnit(CodeCompileUnit, EventHandler)

Updates the CodeCompileUnit reference associated with this instance.

RemoveAssembly(Assembly) RemoveAssembly(Assembly) RemoveAssembly(Assembly) RemoveAssembly(Assembly)

Removes all references to the subject Assembly from this instance.

RemoveAssemblyReference(String) RemoveAssemblyReference(String) RemoveAssemblyReference(String) RemoveAssemblyReference(String)

Removes a path-based Assembly reference from this instance.

RemoveCodeCompileUnit(CodeCompileUnit) RemoveCodeCompileUnit(CodeCompileUnit) RemoveCodeCompileUnit(CodeCompileUnit) RemoveCodeCompileUnit(CodeCompileUnit)

Removes all references to the subject CodeCompileUnit from this instance.

SetLocalAssembly(Assembly) SetLocalAssembly(Assembly) SetLocalAssembly(Assembly) SetLocalAssembly(Assembly)

Sets the value of the local Assembly to the referenced Assembly .

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Events

TypeLoadErrorsChanged TypeLoadErrorsChanged TypeLoadErrorsChanged TypeLoadErrorsChanged

Occurs when the collection TypeLoadErrors is modified.

TypesChanged TypesChanged TypesChanged TypesChanged

Occurs when the collection of defined types is modified.

Applies to