2 // System.Web.UI.UserControlParser
5 // Gonzalo Paniagua Javier (gonzalo@ximian.com)
7 // (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
10 using System.Collections;
13 using System.Web.Compilation;
14 using System.Web.Util;
16 namespace System.Web.UI
18 internal sealed class UserControlParser : TemplateControlParser
20 internal UserControlParser (string virtualPath, string inputFile, HttpContext context)
23 BaseVirtualDir = UrlUtils.GetDirectory (virtualPath);
24 InputFile = inputFile;
25 AddApplicationAssembly ();
28 public static Type GetCompiledType (string virtualPath, string inputFile, HttpContext context)
30 UserControlParser ucp = new UserControlParser (virtualPath, inputFile, context);
31 return ucp.CompileIntoType ();
34 protected override Type CompileIntoType ()
36 AspGenerator generator = new AspGenerator (this);
37 return generator.GetCompiledType ();
40 internal override void ProcessMainAttributes (Hashtable atts)
42 SetBaseType (PagesConfig.UserControlBaseType);
43 base.ProcessMainAttributes (atts);
46 internal override Type DefaultBaseType {
47 get { return typeof (UserControl); }
50 internal override string DefaultBaseTypeName {
51 get { return "System.Web.UI.UserControl"; }
54 internal override string DefaultDirectiveName {
55 get { return "control"; }