ApplicationFileParser.cs 980 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // System.Web.UI.ApplicationfileParser
  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.Web;
  11. using System.Web.Compilation;
  12. namespace System.Web.UI
  13. {
  14. sealed class ApplicationFileParser : TemplateParser
  15. {
  16. public ApplicationFileParser (string fname)
  17. {
  18. InputFile = fname;
  19. }
  20. protected override Type CompileIntoType ()
  21. {
  22. GlobalAsaxCompiler compiler = new GlobalAsaxCompiler (this);
  23. return compiler.GetCompiledType ();
  24. }
  25. internal static Type GetCompiledApplicationType (string inputFile, HttpContext context)
  26. {
  27. ApplicationFileParser parser = new ApplicationFileParser (inputFile);
  28. parser.Context = context;
  29. return parser.CompileIntoType ();
  30. }
  31. protected override Type DefaultBaseType {
  32. get { return typeof (HttpApplication); }
  33. }
  34. protected internal override string DefaultDirectiveName {
  35. get { return "application"; }
  36. }
  37. }
  38. }