mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* ApplicationFileParser.cs: it works now. Prior to these changes, we were using the compiler directly. * BaseParser.cs: added some useful properties and methods. * CodeBuilder.cs: use ILocation. * CodeRenderBuilder.cs: use ILocation. * CollectionBuilder.cs: use the RootBuilder to map tag names into Types. * ControlBuilder.cs: made it useful. * DataBindingBuilder.cs: the control type for data bound text is DataBoundLiteralControl now. * ObjectTagBuilder.cs: store some object tag attributes. * PageParser.cs: handle page-only directives. * RootBuilder.cs: bah. * SimpleWebHandlerParser.cs: made it dummy. * TemplateControl.cs: Modified file. * TemplateControlParser.cs: handle directives that are common to pages and user controls. * TemplateParser.cs: utility methods and handling of directives that are common to app, page and user controls. * UserControl.cs: added ControlBuilderAttribute. * UserControlControlBuilder.cs: builder for user controls. * UserControlParser.cs: use the new interfaces. svn path=/trunk/mcs/; revision=14142
91 lines
2.3 KiB
C#
91 lines
2.3 KiB
C#
//
|
|
// System.Web.UI.PageParser
|
|
//
|
|
// Authors:
|
|
// Gonzalo Paniagua Javier ([email protected])
|
|
//
|
|
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
|
|
//
|
|
using System;
|
|
using System.Collections;
|
|
using System.Web;
|
|
using System.Web.Compilation;
|
|
|
|
namespace System.Web.UI
|
|
{
|
|
public sealed class PageParser : TemplateControlParser
|
|
{
|
|
bool enableSessionState = true;
|
|
bool readonlySessionState;
|
|
|
|
public static IHttpHandler GetCompiledPageInstance (string virtualPath,
|
|
string inputFile,
|
|
HttpContext context)
|
|
{
|
|
PageParser pp = new PageParser ();
|
|
IHttpHandler h = (IHttpHandler) pp.GetCompiledInstance (virtualPath, inputFile, context);
|
|
return h;
|
|
}
|
|
|
|
internal override void ProcessMainAttributes (Hashtable atts)
|
|
{
|
|
string enabless = GetString (atts, "EnableSessionState", null);
|
|
if (enabless != null) {
|
|
readonlySessionState = (String.Compare (enabless, "readonly", true) == 0);
|
|
if (readonlySessionState == true || String.Compare (enabless, "true", true) == 0) {
|
|
enableSessionState = true;
|
|
} else if (String.Compare (enabless, "false", true) == 0) {
|
|
enableSessionState = false;
|
|
} else {
|
|
throw new HttpException ("Invalid value for EnableSessionState: " + enabless);
|
|
}
|
|
}
|
|
|
|
// Ignored by now
|
|
GetString (atts, "Buffer", null);
|
|
GetString (atts, "ClientTarget", null);
|
|
GetString (atts, "CodePage", null);
|
|
GetString (atts, "ContentType", null);
|
|
GetString (atts, "Culture", null);
|
|
GetString (atts, "EnableViewStateMac", null);
|
|
GetString (atts, "ErrorPage", null);
|
|
GetString (atts, "LCID", null);
|
|
GetString (atts, "ResponseEncoding", null);
|
|
GetString (atts, "Trace", null);
|
|
GetString (atts, "TraceMode", null);
|
|
GetString (atts, "UICulture", null);
|
|
|
|
base.ProcessMainAttributes (atts);
|
|
}
|
|
|
|
protected override Type CompileIntoType ()
|
|
{
|
|
AspGenerator generator = new AspGenerator (this);
|
|
return generator.GetCompiledType ();
|
|
}
|
|
|
|
internal bool EnableSessionState {
|
|
get { return enableSessionState; }
|
|
}
|
|
|
|
internal bool ReadOnlySessionState {
|
|
get { return readonlySessionState; }
|
|
}
|
|
|
|
protected override Type DefaultBaseType
|
|
{
|
|
get {
|
|
return typeof (Page);
|
|
}
|
|
}
|
|
|
|
protected internal override string DefaultDirectiveName
|
|
{
|
|
get {
|
|
return "page";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|