mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
* System.Web/HttpApplicationFactory.cs: fixlet for session events hook. * System.Web.Compilation/AspGenerator.cs: handle more possible errors in global.asax file. * System.Web.Compilation/BaseCompiler.cs: added utility methods for creating <object> related properties and fields. * System.Web.Compilation/GlobalAsaxCompiler.cs: keep around applications and session scope objects builders. Also a list of imports and assemblies added in global.asax. * System.Web.Compilation/TemplateControlCompiler.cs: use base class methods for <object> stuff. * System.Web.UI/ApplicationFileParser.cs: check for error in directives. Use GlobalAsaxCompiler.CompileApplicationType for compiling. * System.Web.UI/ObjectTagBuilder.cs: load the Type and check for errors. * System.Web.UI/TemplateParser.cs: add assemblies and imports from global.asax. Now we properly create accessors for session and application objects in the application itself, pages and controls. First step for fixing bug #53387. svn path=/trunk/mcs/; revision=22584
65 lines
1.6 KiB
C#
65 lines
1.6 KiB
C#
//
|
|
// System.Web.UI.ApplicationFileParser.cs
|
|
//
|
|
// Authors:
|
|
// Gonzalo Paniagua Javier ([email protected])
|
|
//
|
|
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
|
|
// (c) 2004 Novell, Inc. (http://www.novell.com)
|
|
//
|
|
using System;
|
|
using System.Collections;
|
|
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 ()
|
|
{
|
|
return GlobalAsaxCompiler.CompileApplicationType (this);
|
|
}
|
|
|
|
internal static Type GetCompiledApplicationType (string inputFile, HttpContext context)
|
|
{
|
|
ApplicationFileParser parser = new ApplicationFileParser (inputFile, context);
|
|
return GlobalAsaxCompiler.CompileApplicationType (parser);
|
|
}
|
|
|
|
internal override void AddDirective (string directive, Hashtable atts)
|
|
{
|
|
if (String.Compare (directive, "application", true) != 0 &&
|
|
String.Compare (directive, "Import", true) != 0 &&
|
|
String.Compare (directive, "Assembly", true) != 0)
|
|
ThrowParseException ("Invalid directive: " + directive);
|
|
|
|
base.AddDirective (directive, atts);
|
|
}
|
|
|
|
internal override Type DefaultBaseType {
|
|
get { return typeof (HttpApplication); }
|
|
}
|
|
|
|
internal override string DefaultBaseTypeName {
|
|
get { return "System.Web.HttpApplication"; }
|
|
}
|
|
|
|
internal override string DefaultDirectiveName {
|
|
get { return "application"; }
|
|
}
|
|
|
|
internal override string BaseVirtualDir {
|
|
get { return Context.Request.ApplicationPath; }
|
|
}
|
|
}
|
|
|
|
}
|
|
|