UserControlParser.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // System.Web.UI.UserControlParser
  3. //
  4. // Authors:
  5. // Gonzalo Paniagua Javier ([email protected])
  6. //
  7. // (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
  8. //
  9. using System;
  10. using System.IO;
  11. using System.Web;
  12. using System.Web.Compilation;
  13. using System.Web.Util;
  14. namespace System.Web.UI
  15. {
  16. internal sealed class UserControlParser : TemplateControlParser
  17. {
  18. internal UserControlParser (string virtualPath, string inputFile, HttpContext context)
  19. {
  20. Context = context;
  21. InputFile = context.Request.MapPath (inputFile);
  22. }
  23. public static Type GetCompiledType (string virtualPath, string inputFile, HttpContext context)
  24. {
  25. UserControlParser ucp = new UserControlParser (virtualPath, inputFile, context);
  26. return ucp.CompileIntoType ();
  27. }
  28. protected override Type CompileIntoType ()
  29. {
  30. AspGenerator generator = new AspGenerator (this);
  31. return generator.GetCompiledType ();
  32. }
  33. internal override Type DefaultBaseType
  34. {
  35. get {
  36. return typeof (UserControl);
  37. }
  38. }
  39. internal override string DefaultDirectiveName
  40. {
  41. get {
  42. return "control";
  43. }
  44. }
  45. }
  46. }