AssemblyBuilder.AddCodeCompileUnit Method

Adds source code for the assembly in the form of a CodeDOM graph.

Namespace: System.Web.Compilation
Assembly: System.Web (in system.web.dll)

public:
void AddCodeCompileUnit (
	BuildProvider^ buildProvider, 
	CodeCompileUnit^ compileUnit
)
public void AddCodeCompileUnit (
	BuildProvider buildProvider, 
	CodeCompileUnit compileUnit
)
public function AddCodeCompileUnit (
	buildProvider : BuildProvider, 
	compileUnit : CodeCompileUnit
)
Not applicable.

Parameters

buildProvider

The build provider generating compileUnit.

compileUnit

The code compile unit to include in the assembly compilation.

A BuildProvider implementation calls the AddCodeCompileUnit method when generating a CodeDOM graph for a virtual path. Source code added with AddCodeCompileUnit is included in the assembly compilation.

Typically, a build provider's GenerateCode method implementation reads the VirtualPath property, parses the contents, and then adds the generated source code to the specified AssemblyBuilder object. The build provider uses the AddCodeCompileUnit method to add source code as a CodeDOM graph to the assembly. Alternately, the build provider can use the CreateCodeFile method to add source code as a physical file to the assembly.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: