2 // System.Web.UI.TemplateParser
5 // Duncan Mak (duncan@ximian.com)
6 // Gonzalo Paniagua Javier (gonzalo@ximian.com)
8 // (C) 2002,2003 Ximian, Inc. (http://www.ximian.com)
9 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 using System.CodeDom.Compiler;
32 using System.Collections;
33 using System.ComponentModel;
34 using System.Globalization;
36 using System.Reflection;
37 using System.Security.Permissions;
38 using System.Web.Compilation;
39 using System.Web.Configuration;
40 using System.Web.Util;
43 using System.Collections.Generic;
46 namespace System.Web.UI {
47 internal class ServerSideScript
49 public readonly string Script;
50 public readonly ILocation Location;
52 public ServerSideScript (string script, ILocation location)
60 [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
61 [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
62 public abstract class TemplateParser : BaseParser
66 string privateBinPath;
67 Hashtable mainAttributes;
68 ArrayList dependencies;
75 bool baseTypeIsGlobal = true;
77 RootBuilder rootBuilder;
79 string compilerOptions;
81 bool implicitLanguage;
82 bool strictOn = false;
83 bool explicitOn = false;
84 bool linePragmasOn = false;
87 string oc_header, oc_custom, oc_param, oc_controls;
89 string oc_content_encodings;
92 OutputCacheLocation oc_location;
93 CultureInfo invariantCulture = CultureInfo.InvariantCulture;
97 string partialClassName;
98 string codeFileBaseClass;
99 string metaResourceKey;
100 Type codeFileBaseClassType;
101 List <UnknownAttributeDescriptor> unknownMainAttributes;
103 ILocation directiveLocation;
105 Assembly srcAssembly;
106 int appAssemblyIndex = -1;
108 internal TemplateParser ()
110 LoadConfigDefaults ();
112 imports = new ArrayList ();
114 AddNamespaces (imports);
116 imports.Add ("System");
117 imports.Add ("System.Collections");
118 imports.Add ("System.Collections.Specialized");
119 imports.Add ("System.Configuration");
120 imports.Add ("System.Text");
121 imports.Add ("System.Text.RegularExpressions");
122 imports.Add ("System.Web");
123 imports.Add ("System.Web.Caching");
124 imports.Add ("System.Web.Security");
125 imports.Add ("System.Web.SessionState");
126 imports.Add ("System.Web.UI");
127 imports.Add ("System.Web.UI.WebControls");
128 imports.Add ("System.Web.UI.HtmlControls");
131 assemblies = new ArrayList ();
133 CompilationSection compConfig = CompilationConfig;
135 bool addAssembliesInBin = false;
136 foreach (AssemblyInfo info in compConfig.Assemblies) {
137 if (info.Assembly == "*")
138 addAssembliesInBin = true;
140 AddAssemblyByName (info.Assembly);
142 if (addAssembliesInBin)
143 AddAssembliesInBin ();
145 foreach (NamespaceInfo info in PagesConfig.Namespaces) {
146 imports.Add (info.Namespace);
149 CompilationConfiguration compConfig = CompilationConfig;
151 foreach (string a in compConfig.Assemblies)
152 AddAssemblyByName (a);
153 if (compConfig.AssembliesInBin)
154 AddAssembliesInBin ();
157 language = compConfig.DefaultLanguage;
158 implicitLanguage = true;
161 internal virtual void LoadConfigDefaults ()
163 debug = CompilationConfig.Debug;
166 internal void AddApplicationAssembly ()
168 if (Context.ApplicationInstance == null)
169 return; // this may happen if we have Global.asax and have
170 // controls registered from Web.Config
171 string location = Context.ApplicationInstance.AssemblyLocation;
172 if (location != typeof (TemplateParser).Assembly.Location) {
173 appAssemblyIndex = assemblies.Add (location);
177 protected abstract Type CompileIntoType ();
180 void AddNamespaces (ArrayList imports)
182 if (BuildManager.HaveResources)
183 imports.Add ("System.Resources");
185 PagesSection pages = WebConfigurationManager.GetSection ("system.web/pages") as PagesSection;
189 NamespaceCollection namespaces = pages.Namespaces;
190 if (namespaces == null || namespaces.Count == 0)
193 foreach (NamespaceInfo nsi in namespaces)
194 imports.Add (nsi.Namespace);
198 internal void RegisterCustomControl (string tagPrefix, string tagName, string src)
200 string realpath = MapPath (src);
201 if (String.Compare (realpath, inputFile, false, invariantCulture) == 0)
204 if (!File.Exists (realpath))
205 throw new ParseException (Location, "Could not find file \"" + realpath + "\".");
206 string vpath = VirtualPathUtility.Combine (BaseVirtualDir, src);
207 if (VirtualPathUtility.IsAbsolute (vpath))
208 vpath = VirtualPathUtility.ToAppRelative (vpath);
211 AddDependency (vpath);
214 type = BuildManager.GetCompiledType (vpath);
216 ArrayList other_deps = new ArrayList ();
217 type = UserControlParser.GetCompiledType (vpath, realpath, other_deps, Context);
218 foreach (string s in other_deps)
221 } catch (ParseException pe) {
222 if (this is UserControlParser)
223 throw new ParseException (Location, pe.Message, pe);
227 AddAssembly (type.Assembly, true);
228 RootBuilder.Foundry.RegisterFoundry (tagPrefix, tagName, type);
231 internal void RegisterNamespace (string tagPrefix, string ns, string assembly)
236 if (assembly != null && assembly.Length > 0)
237 ass = AddAssemblyByName (assembly);
239 RootBuilder.Foundry.RegisterFoundry (tagPrefix, ass, ns);
242 internal virtual void HandleOptions (object obj)
246 internal static string GetOneKey (Hashtable tbl)
248 foreach (object key in tbl.Keys)
249 return key.ToString ();
254 internal virtual void AddDirective (string directive, Hashtable atts)
256 if (String.Compare (directive, DefaultDirectiveName, true) == 0) {
257 if (mainAttributes != null)
258 ThrowParseException ("Only 1 " + DefaultDirectiveName + " is allowed");
260 mainAttributes = atts;
261 ProcessMainAttributes (mainAttributes);
265 int cmp = String.Compare ("Assembly", directive, true);
267 string name = GetString (atts, "Name", null);
268 string src = GetString (atts, "Src", null);
271 ThrowParseException ("Attribute " + GetOneKey (atts) + " unknown.");
273 if (name == null && src == null)
274 ThrowParseException ("You gotta specify Src or Name");
276 if (name != null && src != null)
277 ThrowParseException ("Src and Name cannot be used together");
280 AddAssemblyByName (name);
282 GetAssemblyFromSource (src);
288 cmp = String.Compare ("Import", directive, true);
290 string namesp = GetString (atts, "Namespace", null);
292 ThrowParseException ("Attribute " + GetOneKey (atts) + " unknown.");
294 if (namesp != null && namesp != "")
299 cmp = String.Compare ("Implements", directive, true);
301 string ifacename = GetString (atts, "Interface", "");
304 ThrowParseException ("Attribute " + GetOneKey (atts) + " unknown.");
306 Type iface = LoadType (ifacename);
308 ThrowParseException ("Cannot find type " + ifacename);
310 if (!iface.IsInterface)
311 ThrowParseException (iface + " is not an interface");
313 AddInterface (iface.FullName);
317 cmp = String.Compare ("OutputCache", directive, true);
319 HttpResponse response = HttpContext.Current.Response;
320 if (response != null)
321 response.Cache.SetValidUntilExpires (true);
325 if (atts ["Duration"] == null)
326 ThrowParseException ("The directive is missing a 'duration' attribute.");
327 if (atts ["VaryByParam"] == null && atts ["VaryByControl"] == null)
328 ThrowParseException ("This directive is missing 'VaryByParam' " +
329 "or 'VaryByControl' attribute, which should be set to \"none\", \"*\", " +
330 "or a list of name/value pairs.");
332 foreach (DictionaryEntry entry in atts) {
333 string key = (string) entry.Key;
334 switch (key.ToLower ()) {
336 oc_duration = Int32.Parse ((string) entry.Value);
338 ThrowParseException ("The 'duration' attribute must be set " +
339 "to a positive integer value");
342 case "varybycontentencodings":
343 oc_content_encodings = (string) entry.Value;
347 oc_param = (string) entry.Value;
348 if (String.Compare (oc_param, "none") == 0)
352 oc_header = (string) entry.Value;
355 oc_custom = (string) entry.Value;
358 if (!(this is PageParser))
362 oc_location = (OutputCacheLocation) Enum.Parse (
363 typeof (OutputCacheLocation), (string) entry.Value, true);
365 ThrowParseException ("The 'location' attribute is case sensitive and " +
366 "must be one of the following values: Any, Client, " +
367 "Downstream, Server, None, ServerAndClient.");
370 case "varybycontrol":
372 if (this is PageParser)
375 oc_controls = (string) entry.Value;
378 if (this is PageParser)
382 oc_shared = Boolean.Parse ((string) entry.Value);
384 ThrowParseException ("The 'shared' attribute is case sensitive" +
385 " and must be set to 'true' or 'false'.");
389 ThrowParseException ("The '" + key + "' attribute is not " +
390 "supported by the 'Outputcache' directive.");
399 ThrowParseException ("Unknown directive: " + directive);
402 internal Type LoadType (string typeName)
404 Type type = HttpApplication.LoadType (typeName);
407 Assembly asm = type.Assembly;
408 string location = asm.Location;
410 string dirname = Path.GetDirectoryName (location);
411 bool doAddAssembly = true;
412 foreach (string dir in HttpApplication.BinDirectories) {
413 if (dirname == dir) {
414 doAddAssembly = false;
420 AddAssembly (asm, true);
425 void AddAssembliesInBin ()
427 foreach (string s in HttpApplication.BinDirectoryAssemblies)
431 internal virtual void AddInterface (string iface)
433 if (interfaces == null)
434 interfaces = new ArrayList ();
436 if (!interfaces.Contains (iface))
437 interfaces.Add (iface);
440 internal virtual void AddImport (string namesp)
443 imports = new ArrayList ();
445 if (!imports.Contains (namesp))
446 imports.Add (namesp);
449 internal virtual void AddSourceDependency (string filename)
451 if (dependencies != null && dependencies.Contains (filename))
452 ThrowParseException ("Circular file references are not allowed. File: " + filename);
454 AddDependency (filename);
457 internal virtual void AddDependency (string filename)
462 if (dependencies == null)
463 dependencies = new ArrayList ();
465 if (!dependencies.Contains (filename))
466 dependencies.Add (filename);
469 internal virtual void AddAssembly (Assembly assembly, bool fullPath)
471 if (assembly.Location == "")
475 anames = new Hashtable ();
477 string name = assembly.GetName ().Name;
478 string loc = assembly.Location;
480 if (!assemblies.Contains (loc)) {
481 assemblies.Add (loc);
485 anames [loc] = assembly;
487 if (!assemblies.Contains (name)) {
488 assemblies.Add (name);
491 anames [name] = assembly;
495 internal virtual Assembly AddAssemblyByFileName (string filename)
497 Assembly assembly = null;
498 Exception error = null;
501 assembly = Assembly.LoadFrom (filename);
502 } catch (Exception e) { error = e; }
504 if (assembly == null)
505 ThrowParseException ("Assembly " + filename + " not found", error);
507 AddAssembly (assembly, true);
511 internal virtual Assembly AddAssemblyByName (string name)
514 anames = new Hashtable ();
516 if (anames.Contains (name)) {
517 object o = anames [name];
524 Assembly assembly = null;
525 Exception error = null;
527 assembly = Assembly.Load (name);
528 } catch (Exception e) { error = e; }
530 if (assembly == null) {
532 assembly = Assembly.LoadWithPartialName (name);
533 } catch (Exception e) { error = e; }
536 if (assembly == null)
537 ThrowParseException ("Assembly " + name + " not found", error);
539 AddAssembly (assembly, true);
543 internal virtual void ProcessMainAttributes (Hashtable atts)
545 directiveLocation = new System.Web.Compilation.Location (Location);
548 CompilationSection compConfig;
550 CompilationConfiguration compConfig;
553 compConfig = CompilationConfig;
555 atts.Remove ("Description"); // ignored
557 atts.Remove ("CodeBehind"); // ignored
559 atts.Remove ("AspCompat"); // ignored
561 debug = GetBool (atts, "Debug", compConfig.Debug);
562 compilerOptions = GetString (atts, "CompilerOptions", "");
563 language = GetString (atts, "Language", "");
564 if (language.Length != 0)
565 implicitLanguage = false;
567 language = compConfig.DefaultLanguage;
569 strictOn = GetBool (atts, "Strict", compConfig.Strict);
570 explicitOn = GetBool (atts, "Explicit", compConfig.Explicit);
571 linePragmasOn = GetBool (atts, "LinePragmas", false);
573 string inherits = GetString (atts, "Inherits", null);
574 string srcRealPath = null;
577 // In ASP 2, the source file is actually integrated with
578 // the generated file via the use of partial classes. This
579 // means that the code file has to be confirmed, but not
580 // used at this point.
581 src = GetString (atts, "CodeFile", null);
582 codeFileBaseClass = GetString (atts, "CodeFileBaseClass", null);
584 if (src == null && codeFileBaseClass != null)
585 ThrowParseException ("The 'CodeFileBaseClass' attribute cannot be used without a 'CodeFile' attribute");
587 string legacySrc = GetString (atts, "Src", null);
588 if (legacySrc != null) {
589 legacySrc = UrlUtils.Combine (BaseVirtualDir, legacySrc);
592 legacySrc = MapPath (legacySrc, false);
593 srcRealPath = legacySrc;
594 if (!File.Exists (srcRealPath))
595 ThrowParseException ("File " + src + " not found");
599 legacySrc = MapPath (legacySrc, false);
601 GetAssemblyFromSource (legacySrc);
602 AddDependency (legacySrc);
605 if (!srcIsLegacy && src != null && inherits != null) {
606 // Make sure the source exists
607 src = UrlUtils.Combine (BaseVirtualDir, src);
608 srcRealPath = MapPath (src, false);
610 if (!File.Exists (srcRealPath))
611 ThrowParseException ("File " + src + " not found");
613 // We are going to create a partial class that shares
614 // the same name as the inherits tag, so reset the
615 // name. The base type is changed because it is the
616 // code file's responsibilty to extend the classes
618 partialClassName = inherits;
620 // Add the code file as an option to the
621 // compiler. This lets both files be compiled at once.
622 compilerOptions += " \"" + srcRealPath + "\"";
624 if (codeFileBaseClass != null) {
626 codeFileBaseClassType = LoadType (codeFileBaseClass);
627 } catch (Exception) {
630 if (codeFileBaseClassType == null)
631 ThrowParseException ("Could not load type '{0}'", codeFileBaseClass);
633 } else if (inherits != null) {
634 // We just set the inherits directly because this is a
635 // Single-Page model.
636 SetBaseType (inherits);
639 string src = GetString (atts, "Src", null);
642 srcRealPath = MapPath (src, false);
643 srcAssembly = GetAssemblyFromSource (src);
646 if (inherits != null)
647 SetBaseType (inherits);
650 if (VirtualPathUtility.IsAbsolute (src))
651 src = VirtualPathUtility.ToAppRelative (src);
655 className = GetString (atts, "ClassName", null);
656 if (className != null) {
658 string [] identifiers = className.Split ('.');
659 for (int i = 0; i < identifiers.Length; i++)
660 if (!CodeGenerator.IsValidLanguageIndependentIdentifier (identifiers [i]))
661 ThrowParseException (String.Format ("'{0}' is not a valid "
662 + "value for attribute 'classname'.", className));
664 if (!CodeGenerator.IsValidLanguageIndependentIdentifier (className))
665 ThrowParseException (String.Format ("'{0}' is not a valid "
666 + "value for attribute 'classname'.", className));
671 if (this is TemplateControlParser)
672 metaResourceKey = GetString (atts, "meta:resourcekey", null);
674 if (inherits != null && (this is PageParser || this is UserControlParser) && atts.Count > 0) {
675 if (unknownMainAttributes == null)
676 unknownMainAttributes = new List <UnknownAttributeDescriptor> ();
679 foreach (DictionaryEntry de in atts) {
680 key = de.Key as string;
681 val = de.Value as string;
683 if (String.IsNullOrEmpty (key) || String.IsNullOrEmpty (val))
685 CheckUnknownAttribute (key, val, inherits);
691 ThrowParseException ("Unknown attribute: " + GetOneKey (atts));
695 void CheckUnknownAttribute (string name, string val, string inherits)
697 MemberInfo mi = null;
698 bool missing = false;
699 string memberName = name.Trim ().ToLower (CultureInfo.InvariantCulture);
700 Type parent = codeFileBaseClassType;
706 MemberInfo[] infos = parent.GetMember (memberName,
707 MemberTypes.Field | MemberTypes.Property,
708 BindingFlags.Public | BindingFlags.Instance |
709 BindingFlags.IgnoreCase | BindingFlags.Static);
710 if (infos.Length != 0) {
711 // prefer public properties to public methods (it's what MS.NET does)
712 foreach (MemberInfo tmp in infos) {
713 if (tmp is PropertyInfo) {
722 } catch (Exception) {
726 ThrowParseException (
727 "Error parsing attribute '{0}': Type '{1}' does not have a public property named '{0}'",
728 memberName, inherits);
730 Type memberType = null;
731 if (mi is PropertyInfo) {
732 PropertyInfo pi = mi as PropertyInfo;
735 ThrowParseException (
736 "Error parsing attribute '{0}': The '{0}' property is read-only and cannot be set.",
738 memberType = pi.PropertyType;
739 } else if (mi is FieldInfo) {
740 memberType = ((FieldInfo)mi).FieldType;
742 ThrowParseException ("Could not determine member the kind of '{0}' in base type '{1}",
743 memberName, inherits);
744 TypeConverter converter = TypeDescriptor.GetConverter (memberType);
745 bool convertible = true;
748 if (converter == null || !converter.CanConvertFrom (typeof (string)))
753 value = converter.ConvertFromInvariantString (val);
754 } catch (Exception) {
760 ThrowParseException ("Error parsing attribute '{0}': Cannot create an object of type '{1}' from its string representation '{2}' for the '{3}' property.",
761 memberName, memberType, val, mi.Name);
763 UnknownAttributeDescriptor desc = new UnknownAttributeDescriptor (mi, value);
764 unknownMainAttributes.Add (desc);
768 internal void SetBaseType (string type)
770 if (type == null || type == DefaultBaseTypeName) {
771 baseType = DefaultBaseType;
776 if (srcAssembly != null)
777 parent = srcAssembly.GetType (type);
780 parent = LoadType (type);
783 ThrowParseException ("Cannot find type " + type);
785 if (!DefaultBaseType.IsAssignableFrom (parent))
786 ThrowParseException ("The parent type does not derive from " + DefaultBaseType);
791 internal void SetLanguage (string language)
793 this.language = language;
794 implicitLanguage = false;
797 Assembly GetAssemblyFromSource (string vpath)
799 vpath = UrlUtils.Combine (BaseVirtualDir, vpath);
800 string realPath = MapPath (vpath, false);
801 if (!File.Exists (realPath))
802 ThrowParseException ("File " + vpath + " not found");
804 AddSourceDependency (vpath);
806 CompilerResults result = CachingCompiler.Compile (language, realPath, realPath, assemblies, Debug);
807 if (result.NativeCompilerReturnValue != 0) {
808 StreamReader reader = new StreamReader (realPath);
809 throw new CompilationException (realPath, result.Errors, reader.ReadToEnd ());
812 AddAssembly (result.CompiledAssembly, true);
813 return result.CompiledAssembly;
816 internal abstract string DefaultBaseTypeName { get; }
817 internal abstract string DefaultDirectiveName { get; }
819 internal Type DefaultBaseType {
821 Type type = Type.GetType (DefaultBaseTypeName, true);
827 internal ILocation DirectiveLocation {
828 get { return directiveLocation; }
831 internal string InputFile
833 get { return inputFile; }
834 set { inputFile = value; }
838 internal bool IsPartial {
839 get { return (!srcIsLegacy && src != null); }
842 internal string CodeBehindSource {
846 internal string PartialClassName {
847 get { return partialClassName; }
850 internal string CodeFileBaseClass {
851 get { return codeFileBaseClass; }
854 internal string MetaResourceKey {
855 get { return metaResourceKey; }
858 internal Type CodeFileBaseClassType
860 get { return codeFileBaseClassType; }
863 internal List <UnknownAttributeDescriptor> UnknownMainAttributes
865 get { return unknownMainAttributes; }
869 internal string Text {
871 set { text = value; }
874 internal Type BaseType {
876 if (baseType == null)
877 SetBaseType (DefaultBaseTypeName);
883 internal bool BaseTypeIsGlobal {
884 get { return baseTypeIsGlobal; }
885 set { baseTypeIsGlobal = value; }
888 internal string ClassName {
890 if (className != null)
894 string physPath = HttpContext.Current.Request.PhysicalApplicationPath;
897 if (String.IsNullOrEmpty (inputFile)) {
899 StreamReader sr = Reader as StreamReader;
902 FileStream fr = sr.BaseStream as FileStream;
909 if (String.IsNullOrEmpty (inFile))
910 throw new HttpException ("Unable to determine class name - no input file found.");
912 if (StrUtils.StartsWith (inFile, physPath)) {
913 className = inputFile.Substring (physPath.Length).ToLower (CultureInfo.InvariantCulture);
914 className = className.Replace ('.', '_');
915 className = className.Replace ('/', '_').Replace ('\\', '_');
918 className = Path.GetFileName (inputFile).Replace ('.', '_');
919 className = className.Replace ('-', '_');
920 className = className.Replace (' ', '_');
922 if (Char.IsDigit(className[0])) {
923 className = "_" + className;
930 internal ArrayList Scripts {
933 scripts = new ArrayList ();
939 internal ArrayList Imports {
940 get { return imports; }
943 internal ArrayList Assemblies {
945 if (appAssemblyIndex != -1) {
946 object o = assemblies [appAssemblyIndex];
947 assemblies.RemoveAt (appAssemblyIndex);
949 appAssemblyIndex = -1;
956 internal ArrayList Interfaces {
957 get { return interfaces; }
960 internal RootBuilder RootBuilder {
961 get { return rootBuilder; }
962 set { rootBuilder = value; }
965 internal ArrayList Dependencies {
966 get { return dependencies; }
967 set { dependencies = value; }
970 internal string CompilerOptions {
971 get { return compilerOptions; }
974 internal string Language {
975 get { return language; }
978 internal bool ImplicitLanguage {
979 get { return implicitLanguage; }
982 internal bool StrictOn {
983 get { return strictOn; }
986 internal bool ExplicitOn {
987 get { return explicitOn; }
990 internal bool Debug {
991 get { return debug; }
994 internal bool OutputCache {
995 get { return output_cache; }
998 internal int OutputCacheDuration {
999 get { return oc_duration; }
1003 internal string OutputCacheVaryByContentEncodings {
1004 get { return oc_content_encodings; }
1007 internal virtual TextReader Reader {
1008 get { return null; }
1013 internal string OutputCacheVaryByHeader {
1014 get { return oc_header; }
1017 internal string OutputCacheVaryByCustom {
1018 get { return oc_custom; }
1021 internal string OutputCacheVaryByControls {
1022 get { return oc_controls; }
1025 internal bool OutputCacheShared {
1026 get { return oc_shared; }
1029 internal OutputCacheLocation OutputCacheLocation {
1030 get { return oc_location; }
1033 internal string OutputCacheVaryByParam {
1034 get { return oc_param; }
1038 internal PagesSection PagesConfig {
1040 return WebConfigurationManager.GetSection ("system.web/pages") as PagesSection;
1044 internal PagesConfiguration PagesConfig {
1045 get { return PagesConfiguration.GetInstance (Context); }