Generates source code for the virtual path of the build provider, and adds the source code to a specified assembly builder.
To implement a build provider that generates source code for a custom file type, derive a class from the System.Web.Compilation.BuildProvider class, and override the BuildProvider.GenerateCode(AssemblyBuilder) method to generate source code for the supported file type.
Typically, a build provider's BuildProvider.GenerateCode(AssemblyBuilder) implementation reads the BuildProvider.VirtualPath property, parses the contents, and adds the generated source code to the specified System.Web.Compilation.AssemblyBuilder object. You can contribute source code to the assembly in the form of a System.IO.TextWriter object or a CodeDOM graph. To add source code to the assembly through a System.IO.TextWriter object, use the AssemblyBuilder.CreateCodeFile(BuildProvider) method. To add source code in a CodeDOM graph to the assembly, use the AssemblyBuilder.AddCodeCompileUnit(BuildProvider, System.CodeDom.CodeCompileUnit) method.
If the build provider generates source code in a specific programming language, you must override the BuildProvider.CodeCompilerType property to return a System.Web.Compilation.CompilerType object for the supported programming language.