internal static void GetCodeDirectoryInformation( VirtualPath virtualDir, CodeDirectoryType dirType, StringSet excludedSubdirectories, int index, out Type codeDomProviderType, out CompilerParameters compilerParameters, out string generatedFilesDir) { // Compute the full path to the directory we'll use to generate all // the code files generatedFilesDir = HttpRuntime.CodegenDirInternal + "\\" + sourcesDirectoryPrefix + virtualDir.FileName; bool supportLocalization = IsResourceCodeDirectoryType(dirType); // the index is used to retrieve the correct referenced assemblies BuildProvidersCompiler bpc = new BuildProvidersCompiler(virtualDir, supportLocalization, generatedFilesDir, index); CodeDirectoryCompiler cdc = new CodeDirectoryCompiler(virtualDir, dirType, excludedSubdirectories); cdc._bpc = bpc; // Find all the build provider we want to compile from the code directory cdc.FindBuildProviders(); // Give them to the BuildProvidersCompiler bpc.SetBuildProviders(cdc._buildProviders); // Generate all the sources into the directory generatedFilesDir bpc.GenerateSources(out codeDomProviderType, out compilerParameters); }
internal static void GetCodeDirectoryInformation(VirtualPath virtualDir, CodeDirectoryType dirType, StringSet excludedSubdirectories, int index, out Type codeDomProviderType, out CompilerParameters compilerParameters, out string generatedFilesDir) { generatedFilesDir = HttpRuntime.CodegenDirInternal + @"\Sources_" + virtualDir.FileName; bool supportLocalization = IsResourceCodeDirectoryType(dirType); BuildProvidersCompiler compiler = new BuildProvidersCompiler(virtualDir, supportLocalization, generatedFilesDir, index); CodeDirectoryCompiler compiler2 = new CodeDirectoryCompiler(virtualDir, dirType, excludedSubdirectories) { _bpc = compiler }; compiler2.FindBuildProviders(); compiler.SetBuildProviders(compiler2._buildProviders); compiler.GenerateSources(out codeDomProviderType, out compilerParameters); }