blob: 1870ad989a48220c13209a888a16b43c0eb9e362 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
//
// System.Web.UI.UserControlParser
//
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
//
using System;
using System.Collections;
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;
BaseVirtualDir = UrlUtils.GetDirectory (virtualPath);
InputFile = inputFile;
AddApplicationAssembly ();
}
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 void ProcessMainAttributes (Hashtable atts)
{
SetBaseType (PagesConfig.UserControlBaseType);
base.ProcessMainAttributes (atts);
}
internal override Type DefaultBaseType {
get { return typeof (UserControl); }
}
internal override string DefaultBaseTypeName {
get { return "System.Web.UI.UserControl"; }
}
internal override string DefaultDirectiveName {
get { return "control"; }
}
}
}
|