UserControlParser.cs 924 B

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