mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
* ControlCollection.cs: * EmptyControlCollection.cs: create a minimum ArrayList for this. * BaseParser.cs: added setter for BaseVirtualDir. * Page.cs: fixed message when restoring view state fails. * UserControlParser.cs: set the BaseVirtualDirectory to handle the case when a relative path to the control is given. Fixes bug #47685. svn path=/trunk/mcs/; revision=17424
55 lines
1.2 KiB
C#
55 lines
1.2 KiB
C#
//
|
|
// System.Web.UI.UserControlParser
|
|
//
|
|
// Authors:
|
|
// Gonzalo Paniagua Javier ([email protected])
|
|
//
|
|
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
|
|
//
|
|
using System;
|
|
using System.IO;
|
|
using System.Web;
|
|
using System.Web.Compilation;
|
|
using System.Web.Util;
|
|
|
|
namespace System.Web.UI
|
|
{
|
|
internal sealed class UserControlParser : TemplateControlParser
|
|
{
|
|
internal UserControlParser (string virtualPath, string inputFile, HttpContext context)
|
|
{
|
|
Context = context;
|
|
string vp = UrlUtils.Combine (virtualPath, inputFile);
|
|
BaseVirtualDir = UrlUtils.GetDirectory (vp);
|
|
InputFile = context.Request.MapPath (vp);
|
|
}
|
|
|
|
public static Type GetCompiledType (string virtualPath, string inputFile, HttpContext context)
|
|
{
|
|
UserControlParser ucp = new UserControlParser (virtualPath, inputFile, context);
|
|
return ucp.CompileIntoType ();
|
|
}
|
|
|
|
protected override Type CompileIntoType ()
|
|
{
|
|
AspGenerator generator = new AspGenerator (this);
|
|
return generator.GetCompiledType ();
|
|
}
|
|
|
|
internal override Type DefaultBaseType
|
|
{
|
|
get {
|
|
return typeof (UserControl);
|
|
}
|
|
}
|
|
|
|
internal override string DefaultDirectiveName
|
|
{
|
|
get {
|
|
return "control";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|