void CreateRootBuilder (Stream inputStream, string filename) { if (rootBuilder != null) return; Type rootBuilderType = GetRootBuilderType (inputStream, filename); rootBuilder = Activator.CreateInstance (rootBuilderType) as RootBuilder; if (rootBuilder == null) throw new HttpException ("Cannot create an instance of file-level control builder."); rootBuilder.Init (tparser, null, null, null, null, null); if (componentFoundry != null) rootBuilder.Foundry = componentFoundry; stack.Push (rootBuilder, null); tparser.RootBuilder = rootBuilder; }