Files
mono/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
T
Gonzalo Paniagua Javier 201982bea9 2003-04-30 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/TemplateControlCompiler.cs: correctly set
	the TemplateSourceDirectory value.

	* System.Web.UI/ApplicationFileParser.cs: store the Context and
	override BaseVirtualDir so that it's the application path.

	* System.Web.UI/BaseParser.cs: removed CurrentVirtualPath property.

	* System.Web.UI/TemplateControlParser.cs: use BaseVirtualDir.

	* System.Web.UI/UserControlParser.cs: removed CurrentVirtualPath.

svn path=/trunk/mcs/; revision=14168
2003-04-30 20:07:26 +00:00

51 lines
1.1 KiB
C#

//
// System.Web.UI.ApplicationfileParser
//
// Authors:
// Gonzalo Paniagua Javier ([email protected])
//
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
//
using System;
using System.Web;
using System.Web.Compilation;
namespace System.Web.UI
{
sealed class ApplicationFileParser : TemplateParser
{
public ApplicationFileParser (string fname, HttpContext context)
{
InputFile = fname;
Context = context;
}
protected override Type CompileIntoType ()
{
GlobalAsaxCompiler compiler = new GlobalAsaxCompiler (this);
return compiler.GetCompiledType ();
}
internal static Type GetCompiledApplicationType (string inputFile, HttpContext context)
{
ApplicationFileParser parser = new ApplicationFileParser (inputFile, context);
parser.Context = context;
return parser.CompileIntoType ();
}
protected override Type DefaultBaseType {
get { return typeof (HttpApplication); }
}
protected internal override string DefaultDirectiveName {
get { return "application"; }
}
internal override string BaseVirtualDir {
get { return Context.Request.ApplicationPath; }
}
}
}