TemplateControlParser.cs 612 B

12345678910111213141516171819202122232425262728
  1. //
  2. // System.Web.UI.TemplateControlParser
  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.IO;
  11. using System.Web.Compilation;
  12. namespace System.Web.UI
  13. {
  14. public abstract class TemplateControlParser : TemplateParser
  15. {
  16. internal object GetCompiledInstance (string virtualPath, string inputFile, HttpContext context)
  17. {
  18. InputFile = Path.Combine (MapPath (virtualPath, false), inputFile);
  19. Type type = CompileIntoType ();
  20. if (type == null)
  21. return null;
  22. return Activator.CreateInstance (type);
  23. }
  24. }
  25. }