TypeProvider Constructor (IServiceProvider)

 

Initializes a new instance of the TypeProvider class.

Namespace:   System.Workflow.ComponentModel.Compiler
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

public TypeProvider(
	IServiceProvider serviceProvider
)

Parameters

serviceProvider
Type: System.IServiceProvider

The encapsulated IServiceProvider for this instance.

The following code example shows how to create a new instance of the TypeProvider class. This code example is part of the BasicDesignerHosting SDK Sample from the WorkflowLoader.cs file. For more information, seeBasic Designer Hosting.

TypeProvider typeProvider = new TypeProvider(host);
typeProvider.AddAssemblyReference(typeof(string).Assembly.Location);

.NET Framework
Available since 3.0
Return to top
Show: