* Page.cs (GetFormatter): CONFIGURATION_2_0 work.
* TemplateParser.cs (..ctor): CONFIGURATION_2_0 work.
(PagesConfig): add a CONFIGURATION_2_0 version that returns a
PagesSection.
* PageParser.cs (ProcessMainAttributes): CONFIGURATION_2_0 work.
* BaseParser.cs (CompilationConfig): add a CONFIGURATION_2_0
version that returns a CompilationSection.
svn path=/trunk/mcs/; revision=53582
string baseDir;
string baseVDir;
ILocation location;
+#if CONFIGURATION_2_0
+ CompilationSection compilationConfig;
+#else
CompilationConfiguration compilationConfig;
+#endif
internal string MapPath (string path)
{
set { baseVDir = value; }
}
+#if CONFIGURATION_2_0
+ internal CompilationSection CompilationConfig {
+ get {
+ return WebConfigurationManager.GetSection ("system.web/compilation") as CompilationSection;
+ }
+ }
+
+#else
internal CompilationConfiguration CompilationConfig {
get {
if (compilationConfig == null)
return compilationConfig;
}
}
+#endif
}
}
+2005-11-28 Chris Toshok <toshok@ximian.com>
+
+ * Page.cs (GetFormatter): CONFIGURATION_2_0 work.
+
+ * TemplateParser.cs (..ctor): CONFIGURATION_2_0 work.
+ (PagesConfig): add a CONFIGURATION_2_0 version that returns a
+ PagesSection.
+
+ * PageParser.cs (ProcessMainAttributes): CONFIGURATION_2_0 work.
+
+ * BaseParser.cs (CompilationConfig): add a CONFIGURATION_2_0
+ version that returns a CompilationSection.
+
2005-11-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* SimpleWebHandlerParser.cs: removed 'codebehind' related stuff.
LosFormatter GetFormatter ()
{
+#if CONFIGURATION_2_0
+ PagesSection config = (PagesSection) WebConfigurationManager.GetWebApplicationSection ("system.web/pages");
+#else
PagesConfiguration config = PagesConfiguration.GetInstance (_context);
+#endif
byte [] vkey = null;
if (config.EnableViewStateMac) {
- MachineKeyConfig mconfig;
- mconfig = HttpContext.GetAppConfig ("system.web/machineKey") as MachineKeyConfig;
+#if CONFIGURATION_2_0
+ MachineKeySection mconfig = (MachineKeySection) WebConfigurationManager.GetWebApplicationSection ("system.web/machineKey");
+ vkey = mconfig.ValidationKeyBytes;
+#else
+ MachineKeyConfig mconfig = HttpContext.GetAppConfig ("system.web/machineKey") as MachineKeyConfig;
vkey = mconfig.ValidationKey;
+#endif
}
return new LosFormatter (config.EnableViewStateMac, vkey);
internal override void ProcessMainAttributes (Hashtable atts)
{
- string enabless = GetString (atts, "EnableSessionState", PagesConfig.EnableSessionState);
+ string enabless = GetString (atts, "EnableSessionState",
+#if CONFIGURATION_2_0
+ PagesConfig.EnableSessionState.ToString()
+#else
+ PagesConfig.EnableSessionState
+#endif
+ );
if (enabless != null) {
readonlySessionState = (String.Compare (enabless, "readonly", true) == 0);
if (readonlySessionState == true || String.Compare (enabless, "true", true) == 0) {
OutputCacheLocation oc_location;
Assembly srcAssembly;
int appAssemblyIndex = -1;
-
+
+ [MonoTODO ("deal with AddAssembliesInBin in the 2.0 case")]
internal TemplateParser ()
{
imports = new ArrayList ();
imports.Add ("System.Web.UI.HtmlControls");
assemblies = new ArrayList ();
+#if CONFIGURATION_2_0
+ foreach (AssemblyInfo info in CompilationConfig.Assemblies)
+ AddAssemblyByName (info.Assembly);
+#else
foreach (string a in CompilationConfig.Assemblies)
AddAssemblyByName (a);
if (CompilationConfig.AssembliesInBin)
AddAssembliesInBin ();
+#endif
language = CompilationConfig.DefaultLanguage;
}
get { return oc_param; }
}
+#if CONFIGURATION_2_0
+ internal PagesSection PagesConfig {
+ get {
+ return WebConfigurationManager.GetSection ("system.web/pages") as PagesSection;
+ }
+ }
+#else
internal PagesConfiguration PagesConfig {
get { return PagesConfiguration.GetInstance (Context); }
}
+#endif
}
}