UserControlParser.cs 1002 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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, HttpContext context)
  17. {
  18. Context = context;
  19. InputFile = context.Request.MapPath (inputFile);
  20. }
  21. public static Type GetCompiledType (string virtualPath, string inputFile, HttpContext context)
  22. {
  23. UserControlParser ucp = new UserControlParser (inputFile, context);
  24. Type t = ucp.CompileIntoType ();
  25. return t;
  26. }
  27. protected override Type CompileIntoType ()
  28. {
  29. return UserControlCompiler.CompileUserControlType (this);
  30. }
  31. protected override Type DefaultBaseType
  32. {
  33. get {
  34. return typeof (UserControl);
  35. }
  36. }
  37. protected override string DefaultDirectiveName
  38. {
  39. get {
  40. return "control";
  41. }
  42. }
  43. }
  44. }