Permalink
Browse files

Revert r84521 from p4 1.2.5 mcs tag

svn path=/tags/mono-1-2-5-p4/mcs/; revision=84906
  • Loading branch information...
1 parent dee7e0b commit b80cb128d794441da87095b62dda79fc977b43a2 Wade Berrier committed Aug 27, 2007
@@ -1,8 +1,3 @@
-2007-08-10 Gert Driesen <drieseng@users.sourceforge.net>
-
- * PagesConfigurationHandler.cs: Use enum for EnableSessionState.
- * PagesConfiguration.cs: Use enum for EnableSessionState.
-
2007-05-01 Marek Habersack <mhabersack@novell.com>
* HttpCapabilitiesBase.cs: move the User-Agent code to a separate
@@ -36,7 +36,7 @@ namespace System.Web.Configuration
class PagesConfiguration
{
internal bool Buffer = true;
- internal PagesEnableSessionState EnableSessionState = PagesEnableSessionState.True;
+ internal string EnableSessionState = "true";
internal bool EnableViewState = true;
internal bool EnableViewStateMac = false;
internal bool SmartNavigation = false;
@@ -48,22 +48,11 @@ public object Create (object parent, object configContext, XmlNode section)
attvalue = AttValue ("enableSessionState", section);
if (attvalue != null) {
- switch (attvalue) {
- case "true":
- config.EnableSessionState = PagesEnableSessionState.True;
- break;
- case "ReadOnly":
- config.EnableSessionState = PagesEnableSessionState.ReadOnly;
- break;
- case "false":
- config.EnableSessionState = PagesEnableSessionState.False;
- break;
- default:
+ if (attvalue != "true" && attvalue != "false" && attvalue != "ReadOnly")
HandlersUtil.ThrowException ("The 'enableSessionState' attribute"
+ " is case sensitive and must be one of the following values:"
+ " false, true, ReadOnly.", section);
- break;
- }
+ config.EnableSessionState = attvalue;
}
attvalue = AttValue ("enableViewState", section);
@@ -1,7 +1,3 @@
-2007-08-10 Gert Driesen <drieseng@users.sourceforge.net>
-
- * PagesEnableSessionState.cs: Marked internal on 1.0 profile.
-
2007-07-16 Vladimir Krasnov <vladimirk@mainsoft.com>
* ProfileGroupSettingsCollection.cs: added ResetInternal internal
@@ -28,17 +28,14 @@
using System.Resources;
+#if NET_2_0
namespace System.Web.Configuration
{
-#if NET_2_0
- public
-#else
- internal
-#endif
- enum PagesEnableSessionState
- {
- False = 0,
- ReadOnly = 1,
- True = 2
- }
+ public enum PagesEnableSessionState
+ {
+ False = 0,
+ ReadOnly = 1,
+ True = 2
+ }
}
+#endif
@@ -1,21 +1,7 @@
-2007-08-10 Gert Driesen <drieseng@users.sourceforge.net>
-
- * PageParser.cs: Replace enableSessionState and readOnlySessionState
- bools with enum backed field. Move 1.0 profile code for checking value
- of EnableSessionState pages config to PagesConfigurationHandler.
- Fixes bug #82392 for 1.0 profile.
-
-2007-08-09 Marek Habersack <mhabersack@novell.com>
-
- * PageParser.cs: honor web.config enableSessionState
- ReadOnly setting instead of overwriting based on default value for
- page directive EnableSessionState. Patch from Joel Reed
- <joelwreed@comcast.com>, thanks! Fixes bug #82392
-
2007-07-24 Igor Zelmanovich <igorz@mainsoft.com>
* ClientScriptManager.cs: fixed: GetCallbackEventReference method.
-
+
2007-07-23 Igor Zelmanovich <igorz@mainsoft.com>
* Page.cs: refactoring: __doPostBack client script
@@ -43,13 +43,14 @@ namespace System.Web.UI
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class PageParser : TemplateControlParser
{
- PagesEnableSessionState enableSessionState = PagesEnableSessionState.True;
+ bool enableSessionState = true;
bool enableViewStateMac = true;
- bool smartNavigation;
+ bool smartNavigation = false;
bool haveTrace;
bool trace;
bool notBuffer;
TraceMode tracemode;
+ bool readonlySessionState;
string responseEncoding;
string contentType;
int codepage = -1;
@@ -111,7 +112,24 @@ internal override void LoadPagesConfigDefaults ()
#endif
notBuffer = !ps.Buffer;
- enableSessionState = ps.EnableSessionState;
+#if NET_2_0
+ switch (ps.EnableSessionState) {
+ case PagesEnableSessionState.True:
+ case PagesEnableSessionState.ReadOnly:
+ enableSessionState = true;
+ break;
+
+ default:
+ enableSessionState = false;
+ break;
+ }
+#else
+ if (String.Compare (ps.EnableSessionState, "true", true, CultureInfo.InvariantCulture) == 0)
+ enableSessionState = true;
+ else
+ enableSessionState = false;
+#endif
+
enableViewStateMac = ps.EnableViewStateMac;
smartNavigation = ps.SmartNavigation;
validateRequest = ps.ValidateRequest;
@@ -147,23 +165,23 @@ internal override void ProcessMainAttributes (Hashtable atts)
// note: the 'enableSessionState' configuration property is
// processed in a case-sensitive manner while the page-level
// attribute is processed case-insensitive
- string enabless = GetString (atts, "EnableSessionState", null);
+ string enabless = GetString (atts, "EnableSessionState", enableSessionState.ToString ());
if (enabless != null) {
- if (String.Compare (enabless, "readonly", true) == 0)
- enableSessionState = PagesEnableSessionState.ReadOnly;
- else if (String.Compare (enabless, "true", true) == 0)
- enableSessionState = PagesEnableSessionState.True;
- else if (String.Compare (enabless, "false", true) == 0)
- enableSessionState = PagesEnableSessionState.False;
- else
+ 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 {
ThrowParseException ("Invalid value for enableSessionState: " + enabless);
+ }
}
string cp = GetString (atts, "CodePage", null);
if (cp != null) {
if (responseEncoding != null)
ThrowParseException ("CodePage and ResponseEncoding are " +
- "mutually exclusive.");
+ "mutually exclusive.");
int codepage = 0;
try {
@@ -418,10 +436,7 @@ protected override Type CompileIntoType ()
}
internal bool EnableSessionState {
- get {
- return enableSessionState == PagesEnableSessionState.True ||
- ReadOnlySessionState;
- }
+ get { return enableSessionState; }
}
internal bool EnableViewStateMac {
@@ -433,9 +448,7 @@ protected override Type CompileIntoType ()
}
internal bool ReadOnlySessionState {
- get {
- return enableSessionState == PagesEnableSessionState.ReadOnly;
- }
+ get { return readonlySessionState; }
}
internal bool HaveTrace {

0 comments on commit b80cb12

Please sign in to comment.