Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorMarek Habersack <grendel@twistedcode.net>2010-01-21 00:21:01 +0300
committerMarek Habersack <grendel@twistedcode.net>2010-01-21 00:21:01 +0300
commit5e9719f57cef1bcdacb45d1abf932d580126d39a (patch)
treeba0463f5e04c671a63b1822d80734a346870206a /mcs
parentdeaac161c7c9804a337e96ed035fa3655b7a4c82 (diff)
Gotten rid of NET_2_0 ifdefs and 1.1 code from System.Web.UI
svn path=/trunk/mcs/; revision=149929
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs12
-rw-r--r--mcs/class/System.Web/System.Web.UI/AttributeCollection.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/BaseParser.cs17
-rw-r--r--mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs18
-rw-r--r--mcs/class/System.Web/System.Web.UI/BaseTemplateParser.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/BoundPropertyEntry.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/BuilderPropertyEntry.cs7
-rw-r--r--mcs/class/System.Web/System.Web.UI/ChtmlTextWriter.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs74
-rw-r--r--mcs/class/System.Web/System.Web.UI/CodeConstructType.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/CompilationMode.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/CompiledBindableTemplateBuilder.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/CompiledTemplateBuilder.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/ComplexPropertyEntry.cs16
-rw-r--r--mcs/class/System.Web/System.Web.UI/ConflictOptions.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/Control.cs254
-rw-r--r--mcs/class/System.Web/System.Web.UI/ControlBuilder.cs30
-rw-r--r--mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/ControlCollection.cs20
-rw-r--r--mcs/class/System.Web/System.Web.UI/ControlSkin.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/ControlSkinDelegate.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/ControlValuePropertyAttribute.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/CssClassPropertyAttribute.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs26
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataBinder.cs8
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataBindingCollection.cs12
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs16
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceCacheDurationConverter.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceCacheExpiry.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceCapabilities.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceControl.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceControlBuilder.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceOperation.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceSelectArguments.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceView.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceViewOperationCallback.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceViewSelectCallback.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/DesignTimeParseData.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/DesignTimeTemplateParser.cs13
-rw-r--r--mcs/class/System.Web/System.Web.UI/DesignerDataBoundLiteralControl.cs9
-rw-r--r--mcs/class/System.Web/System.Web.UI/EventEntry.cs18
-rw-r--r--mcs/class/System.Web/System.Web.UI/ExpressionBinding.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/ExpressionBindingCollection.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/ExtractTemplateValuesMethod.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs8
-rw-r--r--mcs/class/System.Web/System.Web.UI/HiddenFieldPageStatePersister.cs8
-rw-r--r--mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceControl.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceView.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/Html32TextWriter.cs15
-rw-r--r--mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs30
-rw-r--r--mcs/class/System.Web/System.Web.UI/HtmlTextWriterAttribute.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/HtmlTextWriterStyle.cs11
-rw-r--r--mcs/class/System.Web/System.Web.UI/HtmlTextWriterTag.cs8
-rw-r--r--mcs/class/System.Web/System.Web.UI/IAutoFieldGenerator.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IBindableControl.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IBindableTemplate.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/ICallbackEventHandler.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/ICheckBoxControl.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IControlBuilderAccessor.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IControlDesignerAccessor.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/IDReferencePropertyAttribute.cs7
-rw-r--r--mcs/class/System.Web/System.Web.UI/IDataItemContainer.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IDataSource.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/IDataSourceViewSchemaAccessor.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IEditableTextControl.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IExpressionsAccessor.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IFilterResolutionService.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IHierarchicalDataSource.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/IHierarchicalEnumerable.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/IHierarchyData.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/INavigateUIData.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/INonBindingContainer.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/IResourceUrlGenerator.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IScriptManager.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/IStateFormatter.cs9
-rw-r--r--mcs/class/System.Web/System.Web.UI/IStyleSheet.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/ITextControl.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/IThemeResolutionService.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/IUrlResolutionService.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IUserControlTypeResolutionService.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/IndexedString.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/KeyedList.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/KeyedListEnumerator.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/ListSourceHelper.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/LiteralControl.cs16
-rw-r--r--mcs/class/System.Web/System.Web.UI/LosFormatter.cs19
-rw-r--r--mcs/class/System.Web/System.Web.UI/MasterPage.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/MasterPageControlBuilder.cs9
-rw-r--r--mcs/class/System.Web/System.Web.UI/MasterPageParser.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/MinimizableAttributeTypeConverter.cs13
-rw-r--r--mcs/class/System.Web/System.Web.UI/NonVisualControlAttribute.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/ObjectPersistData.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs45
-rw-r--r--mcs/class/System.Web/System.Web.UI/OutputCacheLocation.cs18
-rw-r--r--mcs/class/System.Web/System.Web.UI/OutputCacheParameters.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/Page.cs371
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageAsyncTask.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs7
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageLifeCycle.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageParser.cs69
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageParserFilter.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageStatePersister.cs9
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageTheme.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageThemeBuilder.cs9
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageThemeFileParser.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageThemeParser.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/Pair.cs14
-rw-r--r--mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs17
-rw-r--r--mcs/class/System.Web/System.Web.UI/PersistChildrenAttribute.cs14
-rw-r--r--mcs/class/System.Web/System.Web.UI/PostBackOptions.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/PropertyConverter.cs14
-rw-r--r--mcs/class/System.Web/System.Web.UI/PropertyEntry.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/ReadOnlyDataSourceView.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/ResourceBasedLiteralControl.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/RootBuilder.cs51
-rw-r--r--mcs/class/System.Web/System.Web.UI/SessionPageStatePersister.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/SimpleHandlerFactory.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/SimplePropertyEntry.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs37
-rw-r--r--mcs/class/System.Web/System.Web.UI/SkinBuilder.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/StateBag.cs17
-rw-r--r--mcs/class/System.Web/System.Web.UI/StateManagedCollection.cs3
-rw-r--r--mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/SupportsEventValidationAttribute.cs14
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateBuilder.cs16
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateContainerAttribute.cs9
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateContentType.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateControl.cs63
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs59
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateInstance.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateInstanceAttribute.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplatePropertyEntry.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/ThemeProvider.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/ThemeableAttribute.cs11
-rw-r--r--mcs/class/System.Web/System.Web.UI/ToolboxDataAttribute.cs14
-rw-r--r--mcs/class/System.Web/System.Web.UI/Triplet.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/UnknownAttributeDescriptor.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/UrlPropertyAttribute.cs16
-rw-r--r--mcs/class/System.Web/System.Web.UI/UrlTypes.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/UserControl.cs29
-rw-r--r--mcs/class/System.Web/System.Web.UI/UserControlControlBuilder.cs9
-rw-r--r--mcs/class/System.Web/System.Web.UI/UserControlParser.cs47
-rw-r--r--mcs/class/System.Web/System.Web.UI/VerificationAttribute.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/VerificationConditionalOperator.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/VerificationReportLevel.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/VerificationRule.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/ViewStateEncryptionMode.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/ViewStateException.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/ViewStateModeByIdAttribute.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/VirtualReferenceType.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/WebHandlerParser.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/WebResourceAttribute.cs11
-rw-r--r--mcs/class/System.Web/System.Web.UI/WebServiceParser.cs25
-rw-r--r--mcs/class/System.Web/System.Web.UI/XPathBinder.cs8
-rw-r--r--mcs/class/System.Web/System.Web.UI/XhtmlMobileDocType.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI/XhtmlTextWriter.cs10
160 files changed, 411 insertions, 1851 deletions
diff --git a/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs b/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
index 55f75c630ff..ac11c6b04ef 100644
--- a/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
-// (c) 2004 Novell, Inc. (http://www.novell.com)
+// (c) 2004-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -41,21 +41,16 @@ namespace System.Web.UI
sealed class ApplicationFileParser : TemplateParser
{
static ArrayList dependencies;
-#if NET_2_0
TextReader reader;
-#endif
public ApplicationFileParser (string fname, HttpContext context)
{
InputFile = fname;
Context = context;
-#if NET_2_0
VirtualPath = new VirtualPath ("/" + Path.GetFileName (fname));
-#endif
LoadConfigDefaults ();
}
-#if NET_2_0
internal ApplicationFileParser (VirtualPath virtualPath, TextReader reader, HttpContext context)
: this (virtualPath, null, reader, context)
{
@@ -75,7 +70,6 @@ namespace System.Web.UI
SetBaseType (null);
LoadConfigDefaults ();
}
-#endif
protected override Type CompileIntoType ()
{
@@ -117,12 +111,10 @@ namespace System.Web.UI
get { return Context.Request.ApplicationPath; }
}
-#if NET_2_0
- internal override TextReader Reader {
+ internal override TextReader Reader {
get { return reader; }
set { reader = value; }
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/AttributeCollection.cs b/mcs/class/System.Web/System.Web.UI/AttributeCollection.cs
index f1599ac1e78..4bcf8835302 100644
--- a/mcs/class/System.Web/System.Web.UI/AttributeCollection.cs
+++ b/mcs/class/System.Web/System.Web.UI/AttributeCollection.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc. (http://www.ximian.com
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -180,7 +180,6 @@ namespace System.Web.UI {
}
}
-#if NET_2_0
internal void CopyFrom (AttributeCollection attributeCollection)
{
if (attributeCollection == null || attributeCollection.Count == 0)
@@ -189,6 +188,5 @@ namespace System.Web.UI {
foreach (string key in attributeCollection.bag.Keys)
this.Add (key, attributeCollection [key]);
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/BaseParser.cs b/mcs/class/System.Web/System.Web.UI/BaseParser.cs
index f8a013dd770..95f719426cf 100644
--- a/mcs/class/System.Web/System.Web.UI/BaseParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/BaseParser.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -47,9 +47,6 @@ namespace System.Web.UI
string baseDir;
string baseVDir;
ILocation location;
-#if !NET_2_0
- CompilationConfiguration compilationConfig;
-#endif
internal string MapPath (string path)
{
@@ -151,7 +148,6 @@ namespace System.Web.UI
}
}
-#if NET_2_0
internal TSection GetConfigSection <TSection> (string section) where TSection: global::System.Configuration.ConfigurationSection
{
VirtualPath vpath = VirtualPath;
@@ -170,17 +166,6 @@ namespace System.Web.UI
internal CompilationSection CompilationConfig {
get { return GetConfigSection <CompilationSection> ("system.web/compilation"); }
}
-
-#else
- internal CompilationConfiguration CompilationConfig {
- get {
- if (compilationConfig == null)
- compilationConfig = CompilationConfiguration.GetInstance (context);
-
- return compilationConfig;
- }
- }
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs b/mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs
index 71002f76b92..39f359bd76f 100644
--- a/mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs
@@ -54,9 +54,7 @@ namespace System.Web.UI
bool slidingExpiration;
Control control;
-#if NET_2_0
ControlCachePolicy cachePolicy;
-#endif
protected BasePartialCachingControl()
{
@@ -112,23 +110,13 @@ namespace System.Web.UI
}
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override void OnInit (EventArgs e)
+ protected internal override void OnInit (EventArgs e)
{
control = CreateControl ();
Controls.Add (control);
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override void Render (HtmlTextWriter output)
+ protected internal override void Render (HtmlTextWriter output)
{
Cache cache = HttpRuntime.InternalCache;
string key = CreateKey ();
@@ -158,7 +146,6 @@ namespace System.Web.UI
CacheItemPriority.Normal, null);
}
-#if NET_2_0
public ControlCachePolicy CachePolicy
{
get {
@@ -168,7 +155,6 @@ namespace System.Web.UI
return cachePolicy;
}
}
-#endif
public CacheDependency Dependency {
get {return dependency;}
diff --git a/mcs/class/System.Web/System.Web.UI/BaseTemplateParser.cs b/mcs/class/System.Web/System.Web.UI/BaseTemplateParser.cs
index d91c919ab5f..17e00d1a089 100644
--- a/mcs/class/System.Web/System.Web.UI/BaseTemplateParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/BaseTemplateParser.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
namespace System.Web.UI {
@@ -47,4 +46,3 @@ namespace System.Web.UI {
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/BoundPropertyEntry.cs b/mcs/class/System.Web/System.Web.UI/BoundPropertyEntry.cs
index 55237d86569..2027cf20d27 100644
--- a/mcs/class/System.Web/System.Web.UI/BoundPropertyEntry.cs
+++ b/mcs/class/System.Web/System.Web.UI/BoundPropertyEntry.cs
@@ -4,7 +4,7 @@
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
-// Copyright (c) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -27,7 +27,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI
{
public class BoundPropertyEntry : PropertyEntry {
@@ -61,5 +60,4 @@ namespace System.Web.UI
}
}
}
-#endif // NET_2_0
diff --git a/mcs/class/System.Web/System.Web.UI/BuilderPropertyEntry.cs b/mcs/class/System.Web/System.Web.UI/BuilderPropertyEntry.cs
index 1a22554825d..693e18c1dc4 100644
--- a/mcs/class/System.Web/System.Web.UI/BuilderPropertyEntry.cs
+++ b/mcs/class/System.Web/System.Web.UI/BuilderPropertyEntry.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Web.UI;
namespace System.Web.UI
@@ -36,10 +35,8 @@ namespace System.Web.UI
public abstract class BuilderPropertyEntry : PropertyEntry
{
public ControlBuilder Builder {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get;
+ set;
}
-
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ChtmlTextWriter.cs b/mcs/class/System.Web/System.Web.UI/ChtmlTextWriter.cs
index 6b6758c7552..f02d74c7d6e 100644
--- a/mcs/class/System.Web/System.Web.UI/ChtmlTextWriter.cs
+++ b/mcs/class/System.Web/System.Web.UI/ChtmlTextWriter.cs
@@ -6,7 +6,7 @@
//
//
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,8 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System;
using System.IO;
using System.Collections;
@@ -180,5 +178,3 @@ namespace System.Web.UI {
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs b/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
index 07caf43744c..012fa3a93db 100644
--- a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
+++ b/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
@@ -8,7 +8,7 @@
// Lluis Sanchez (lluis@novell.com)
//
// (C) 2002,2003 Ximian, Inc. (http://www.ximian.com)
-// (c) 2003 Novell, Inc. (http://www.novell.com)
+// (c) 2003-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -34,9 +34,7 @@
using System;
using System.Collections;
-#if NET_2_0
using System.Collections.Generic;
-#endif
using System.Text;
using System.Collections.Specialized;
using System.Web.Util;
@@ -44,12 +42,7 @@ using System.Globalization;
namespace System.Web.UI
{
- #if NET_2_0
- public sealed partial
- #else
- internal
- #endif
- class ClientScriptManager
+ public sealed partial class ClientScriptManager
{
internal const string EventStateFieldName = "__EVENTVALIDATION";
@@ -59,7 +52,6 @@ namespace System.Web.UI
internal Hashtable hiddenFields;
ScriptEntry submitStatements;
Page page;
-#if NET_2_0
int [] eventValidationValues;
int eventValidationPos = 0;
Hashtable expandoAttributes;
@@ -81,40 +73,25 @@ namespace System.Web.UI
expandoAttributes != null;
}
}
-#endif
internal ClientScriptManager (Page page)
{
this.page = page;
}
-#if !NET_2_0
- public string GetPostBackClientEvent (Control control, string argument)
- {
- return GetPostBackEventReference (control, argument);
- }
-#endif
-
public string GetPostBackClientHyperlink (Control control, string argument)
{
return "javascript:" + GetPostBackEventReference (control, argument);
}
-#if NET_2_0
public string GetPostBackClientHyperlink (Control control, string argument, bool registerForEventValidation)
{
if (registerForEventValidation)
RegisterForEventValidation (control.UniqueID, argument);
return "javascript:" + GetPostBackEventReference (control, argument);
}
-#endif
-#if !NET_2_0
- internal
-#else
- public
-#endif
- string GetPostBackEventReference (Control control, string argument)
+ public string GetPostBackEventReference (Control control, string argument)
{
if (control == null)
throw new ArgumentNullException ("control");
@@ -126,7 +103,6 @@ namespace System.Web.UI
return "__doPostBack('" + control.UniqueID + "','" + argument + "')";
}
-#if NET_2_0
public string GetPostBackEventReference (Control control, string argument, bool registerForEventValidation)
{
if (control == null)
@@ -172,7 +148,7 @@ namespace System.Web.UI
if(options.TrackFocus)
RegisterHiddenField (Page.LastFocusID, String.Empty);
- string prefix = options.RequiresJavaScriptProtocol ? "javascript:" : "";
+ string prefix = options.RequiresJavaScriptProtocol ? "javascript:" : String.Empty;
if (page.IsMultiForm)
prefix += page.theForm + ".";
@@ -243,14 +219,8 @@ namespace System.Web.UI
(clientErrorCallback ?? "null") + "," +
(useAsync ? "true" : "false") + ")";
}
-#endif
-#if NET_2_0
- public
-#else
- internal
-#endif
- string GetWebResourceUrl(Type type, string resourceName)
+ public string GetWebResourceUrl(Type type, string resourceName)
{
if (type == null)
throw new ArgumentNullException ("type");
@@ -420,7 +390,6 @@ namespace System.Web.UI
RegisterScript (ref clientScriptBlocks, type, "include-" + key, url, ScriptEntryFormat.Include);
}
-#if NET_2_0
public void RegisterClientScriptResource (Type type, string resourceName)
{
RegisterScript (ref clientScriptBlocks, type, "resource-" + resourceName, GetWebResourceUrl (type, resourceName), ScriptEntryFormat.Include);
@@ -536,7 +505,7 @@ namespace System.Web.UI
throw InvalidPostBackException ();
}
-#endif
+
void WriteScripts (HtmlTextWriter writer, ScriptEntry scriptList)
{
if (scriptList == null)
@@ -580,7 +549,6 @@ namespace System.Web.UI
}
}
-#if NET_2_0
internal void RestoreEventValidationState (string fieldValue)
{
if (!page.EnableEventValidation || fieldValue == null || fieldValue.Length == 0)
@@ -635,17 +603,9 @@ namespace System.Web.UI
writer.WriteLine ();
}
-#endif
-
-#if NET_2_0
internal const string SCRIPT_BLOCK_START = "//<![CDATA[";
internal const string SCRIPT_BLOCK_END = "//]]>";
internal const string SCRIPT_ELEMENT_START = @"<script type=""text/javascript"">" + SCRIPT_BLOCK_START;
-#else
- internal const string SCRIPT_BLOCK_START = "<!--";
- internal const string SCRIPT_BLOCK_END ="// -->";
- internal const string SCRIPT_ELEMENT_START = @"<script language=""javascript"" type=""text/javascript"">" + SCRIPT_BLOCK_START;
-#endif
internal const string SCRIPT_ELEMENT_END = SCRIPT_BLOCK_END + "</script>";
internal static void WriteBeginScriptBlock (HtmlTextWriter writer)
@@ -663,30 +623,23 @@ namespace System.Web.UI
if (hiddenFields == null)
return;
-#if NET_2_0
writer.WriteLine ();
writer.RenderBeginTag (HtmlTextWriterTag.Div);
int oldIndent = writer.Indent;
writer.Indent = 0;
bool first = true;
-#endif
+
foreach (string key in hiddenFields.Keys) {
string value = hiddenFields [key] as string;
if (first)
first = false;
else
writer.WriteLine ();
-#if NET_2_0
writer.Write ("<input type=\"hidden\" name=\"{0}\" id=\"{0}\" value=\"{1}\" />", key, HttpUtility.HtmlAttributeEncode (value));
-#else
- writer.Write ("<input type=\"hidden\" name=\"{0}\" value=\"{1}\" />", key, HttpUtility.HtmlAttributeEncode (value));
-#endif
}
-#if NET_2_0
writer.Indent = oldIndent;
writer.RenderEndTag (); // DIV
writer.WriteLine ();
-#endif
hiddenFields = null;
}
@@ -744,13 +697,11 @@ namespace System.Web.UI
}
}
-#if NET_2_0
internal string GetClientValidationEvent (string validationGroup) {
if (page.IsMultiForm)
return "if (typeof(" + page.theForm + ".Page_ClientValidate) == 'function') " + page.theForm + ".Page_ClientValidate('" + validationGroup + "');";
return "if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate('" + validationGroup + "');";
}
-#endif
internal string GetClientValidationEvent ()
{
@@ -767,14 +718,9 @@ namespace System.Web.UI
StringBuilder sb = new StringBuilder ();
ScriptEntry entry = submitStatements;
while (entry != null) {
-#if NET_2_0
sb.Append (EnsureEndsWithSemicolon (entry.Script));
-#else
- sb.Append (entry.Script);
-#endif
entry = entry.Next;
}
-#if NET_2_0
RegisterClientScriptBlock (GetType(), "HtmlForm-OnSubmitStatemen",
@"
" + page.WebFormScriptReference + @".WebForm_OnSubmit = function () {
@@ -783,10 +729,6 @@ return true;
}
", true);
return "javascript:return " + page.WebFormScriptReference + ".WebForm_OnSubmit();";
-
-#else
- return sb.ToString ();
-#endif
}
internal static string GetScriptLiteral (object ob)
@@ -851,13 +793,11 @@ return true;
Include,
}
-#if NET_2_0
// helper method
internal static string EnsureEndsWithSemicolon (string value) {
if (value != null && value.Length > 0 && value [value.Length - 1] != ';')
return value += ";";
return value;
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/CodeConstructType.cs b/mcs/class/System.Web/System.Web.UI/CodeConstructType.cs
index bed43dbb229..3babbabbd54 100644
--- a/mcs/class/System.Web/System.Web.UI/CodeConstructType.cs
+++ b/mcs/class/System.Web/System.Web.UI/CodeConstructType.cs
@@ -4,7 +4,7 @@
// Authors:
// Marek Safar (marek.safar@gmail.com)
//
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2009-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
namespace System.Web.UI
{
public enum CodeConstructType
@@ -38,5 +36,3 @@ namespace System.Web.UI
ScriptTag = 3
}
}
-
-#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/CompilationMode.cs b/mcs/class/System.Web/System.Web.UI/CompilationMode.cs
index 557548df61b..2f9aafff8ea 100644
--- a/mcs/class/System.Web/System.Web.UI/CompilationMode.cs
+++ b/mcs/class/System.Web/System.Web.UI/CompilationMode.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI {
public enum CompilationMode {
Auto = 0,
@@ -34,5 +33,4 @@ namespace System.Web.UI {
Always = 2
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/CompiledBindableTemplateBuilder.cs b/mcs/class/System.Web/System.Web.UI/CompiledBindableTemplateBuilder.cs
index ca455d955fb..0a6ead79c29 100644
--- a/mcs/class/System.Web/System.Web.UI/CompiledBindableTemplateBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/CompiledBindableTemplateBuilder.cs
@@ -4,7 +4,7 @@
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
//
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Collections.Specialized;
namespace System.Web.UI
@@ -55,5 +53,3 @@ namespace System.Web.UI
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/CompiledTemplateBuilder.cs b/mcs/class/System.Web/System.Web.UI/CompiledTemplateBuilder.cs
index f0e188fd653..0d4acd2943e 100644
--- a/mcs/class/System.Web/System.Web.UI/CompiledTemplateBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/CompiledTemplateBuilder.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// This is used in the generated C# code from MS and xsp does the same.
// It just seems to be a container implementing an ITemplate interface.
diff --git a/mcs/class/System.Web/System.Web.UI/ComplexPropertyEntry.cs b/mcs/class/System.Web/System.Web.UI/ComplexPropertyEntry.cs
index cf47ba35a90..d7da3dd6019 100644
--- a/mcs/class/System.Web/System.Web.UI/ComplexPropertyEntry.cs
+++ b/mcs/class/System.Web/System.Web.UI/ComplexPropertyEntry.cs
@@ -28,19 +28,25 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI
{
public class ComplexPropertyEntry : BuilderPropertyEntry
{
+ internal ComplexPropertyEntry (bool isCollectionItem, bool readOnly)
+ {
+ this.IsCollectionItem = isCollectionItem;
+ this.ReadOnly = readOnly;
+ }
+
public bool IsCollectionItem {
- get { throw new NotImplementedException (); }
+ get;
+ private set;
}
public bool ReadOnly {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get;
+ set;
}
}
}
-#endif
+
diff --git a/mcs/class/System.Web/System.Web.UI/ConflictOptions.cs b/mcs/class/System.Web/System.Web.UI/ConflictOptions.cs
index e4e868fb8b5..448054872e3 100644
--- a/mcs/class/System.Web/System.Web.UI/ConflictOptions.cs
+++ b/mcs/class/System.Web/System.Web.UI/ConflictOptions.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,12 +26,10 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI {
public enum ConflictOptions {
OverwriteChanges = 0,
- CompareAllValues = 1
+ CompareAllValues = 1
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/Control.cs b/mcs/class/System.Web/System.Web.UI/Control.cs
index 71b4833a2bf..ff8e9075332 100644
--- a/mcs/class/System.Web/System.Web.UI/Control.cs
+++ b/mcs/class/System.Web/System.Web.UI/Control.cs
@@ -3,13 +3,14 @@
//
// Authors:
// Bob Smith <bob@thestuff.net>
-// Gonzalo Paniagua Javier (gonzalo@ximian.com
+// Gonzalo Paniagua Javier (gonzalo@ximian.com)
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
// Sanjay Gupta (gsanjay@novell.com)
+// Marek Habersack <mhabersack@novell.com>
//
// (C) Bob Smith
// (c) 2002,2003 Ximian, Inc. (http://www.ximian.com)
-// (C) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -34,18 +35,16 @@
//
using System.Collections;
+using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
+using System.Globalization;
+using System.IO;
using System.Security.Permissions;
using System.Web;
using System.Web.Util;
-using System.Globalization;
-#if NET_2_0
-using System.Collections.Generic;
using System.Web.UI.Adapters;
-using System.IO;
-#endif
namespace System.Web.UI
{
@@ -56,19 +55,11 @@ namespace System.Web.UI
[DefaultProperty ("ID"), DesignerCategory ("Code"), ToolboxItemFilter ("System.Web.UI", ToolboxItemFilterType.Require)]
[ToolboxItem ("System.Web.UI.Design.WebControlToolboxItem, " + Consts.AssemblySystem_Design)]
[Designer ("System.Web.UI.Design.ControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
-#if NET_2_0
[DesignerSerializer ("Microsoft.VisualStudio.Web.WebForms.ControlCodeDomSerializer, " + Consts.AssemblyMicrosoft_VisualStudio_Web,
"System.ComponentModel.Design.Serialization.CodeDomSerializer, " + Consts.AssemblySystem_Design)]
[Bindable (true)]
[Themeable (false)]
-#else
- [DesignerSerializer ("Microsoft.VSDesigner.WebForms.ControlCodeDomSerializer, " + Consts.AssemblyMicrosoft_VSDesigner,
- "System.ComponentModel.Design.Serialization.CodeDomSerializer, " + Consts.AssemblySystem_Design)]
-#endif
- public partial class Control : IComponent, IDisposable, IParserAccessor, IDataBindingsAccessor
-#if NET_2_0
-, IUrlResolutionService, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor
-#endif
+ public partial class Control : IComponent, IDisposable, IParserAccessor, IDataBindingsAccessor, IUrlResolutionService, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor
{
internal static readonly object DataBindingEvent = new object ();
internal static readonly object DisposedEvent = new object ();
@@ -87,11 +78,9 @@ namespace System.Web.UI
const int unload_mask = 1 << 5;
/* */
-#if NET_2_0
[ThreadStatic]
static Dictionary <Type, bool> loadViewStateByIDCache;
bool? loadViewStateByID;
-#endif
string uniqueID;
string _userId;
ControlCollection _controls;
@@ -107,12 +96,8 @@ namespace System.Web.UI
DataBindingCollection dataBindings;
Hashtable pendingVS; // may hold unused viewstate data from child controls
-
-
-#if NET_2_0
TemplateControl _templateControl;
bool _isChildControlStateCleared;
-#endif
string _templateSourceDirectory;
/*************/
@@ -133,9 +118,7 @@ namespace System.Web.UI
const int VIEWSTATE_LOADED = 1 << 13;
const int LOADED = 1 << 14;
const int PRERENDERED = 1 << 15;
-#if NET_2_0
const int ENABLE_THEMING = 1 << 16;
-#endif
const int AUTOID_SET = 1 << 17;
const int REMOVED = 1 << 18;
/*************/
@@ -144,11 +127,7 @@ namespace System.Web.UI
{
defaultNameArray = new string [100];
for (int i = 0; i < 100; i++)
-#if NET_2_0
defaultNameArray [i] = String.Concat ("ctl", i.ToString ("D2"));
-#else
- defaultNameArray [i] = "_ctl" + i;
-#endif
}
public Control ()
@@ -158,7 +137,6 @@ namespace System.Web.UI
stateMask |= IS_NAMING_CONTAINER;
}
-#if NET_2_0
ControlAdapter adapter;
bool did_adapter_lookup;
protected internal ControlAdapter Adapter {
@@ -201,8 +179,6 @@ namespace System.Web.UI
}
}
-#endif
-
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[EditorBrowsable (EditorBrowsableState.Never), Browsable (false)]
public Control BindingContainer {
@@ -223,28 +199,19 @@ namespace System.Web.UI
string client = UniqueID;
if (client != null)
-#if NET_2_0
client = UniqueID2ClientID (client);
-#else
- client = client.Replace (':', ClientIDSeparator);
-#endif
stateMask |= ID_SET;
return client;
}
}
-#if NET_2_0
internal string UniqueID2ClientID (string uniqueId)
{
return uniqueId.Replace (IdSeparator, ClientIDSeparator);
}
- protected char ClientIDSeparator
-#else
- char ClientIDSeparator
-#endif
- {
+ protected char ClientIDSeparator {
get { return '_'; }
}
@@ -260,18 +227,14 @@ namespace System.Web.UI
}
}
-#if NET_2_0
[MonoTODO ("revisit once we have a real design strategy")]
protected internal bool DesignMode {
get { return false; }
}
-#endif
[DefaultValue (true), WebCategory ("Behavior")]
[WebSysDescription ("An Identification of the control that is rendered.")]
-#if NET_2_0
[Themeable (false)]
-#endif
public virtual bool EnableViewState {
get { return ((stateMask & ENABLE_VIEWSTATE) != 0); }
set { SetMask (ENABLE_VIEWSTATE, value); }
@@ -279,15 +242,12 @@ namespace System.Web.UI
[MergableProperty (false), ParenthesizePropertyName (true)]
[WebSysDescription ("The name of the control that is rendered.")]
-#if NET_2_0
[Filterable (false), Themeable (false)]
-#endif
-
public virtual string ID {
get { return (((stateMask & ID_SET) != 0) ? _userId : null); }
set {
- if (value == "")
+ if (value != null && value.Length == 0)
value = null;
stateMask |= ID_SET;
@@ -296,7 +256,6 @@ namespace System.Web.UI
}
}
-#if NET_2_0
protected internal bool IsChildControlStateCleared {
get { return _isChildControlStateCleared; }
}
@@ -309,12 +268,8 @@ namespace System.Web.UI
return (bool)loadViewStateByID;
}
}
-#endif
-#if NET_2_0
- protected internal
-#endif
- bool IsViewStateEnabled {
+ protected internal bool IsViewStateEnabled {
get {
for (Control control = this; control != null; control = control.Parent)
if (!control.EnableViewState)
@@ -324,15 +279,9 @@ namespace System.Web.UI
}
}
-#if NET_2_0
protected char IdSeparator {
get { return '$'; }
}
-#else
- internal char IdSeparator {
- get { return ':'; }
- }
-#endif
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
@@ -353,9 +302,7 @@ namespace System.Web.UI
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
[WebSysDescription ("The webpage that this control resides on.")]
-#if NET_2_0
[Bindable (false)]
-#endif
public virtual Page Page { //DIT
get {
if (_page == null){
@@ -385,7 +332,6 @@ namespace System.Web.UI
set { _site = value; }
}
-#if NET_2_0
[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public TemplateControl TemplateControl {
@@ -404,7 +350,6 @@ namespace System.Web.UI
return null;
}
}
-#endif
#if !TARGET_J2EE
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
@@ -412,7 +357,6 @@ namespace System.Web.UI
[WebSysDescription ("A virtual directory containing the parent of the control.")]
public virtual string TemplateSourceDirectory {
get {
-#if NET_2_0
if (_templateSourceDirectory == null) {
TemplateControl tc = TemplateControl;
@@ -441,19 +385,6 @@ namespace System.Web.UI
}
return _templateSourceDirectory;
-#else
- if (_templateSourceDirectory == null) {
- HttpContext ctx = HttpContext.Current;
- HttpRequest req = ctx != null ? ctx.Request : null;
-
- _templateSourceDirectory = (_parent == null)
- ? req != null ? VirtualPathUtility.RemoveTrailingSlash (
- VirtualPathUtility.GetDirectory (
- HttpContext.Current.Request.CurrentExecutionFilePath)) : String.Empty
- : _parent.TemplateSourceDirectory;
- }
- return _templateSourceDirectory;
-#endif
}
}
#endif
@@ -531,24 +462,11 @@ namespace System.Web.UI
[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- virtual HttpContext Context { //DIT
+ protected internal virtual HttpContext Context { //DIT
get {
-#if NET_2_0
Page page = Page;
if (page != null)
return page.Context;
-#else
- if (_parent == null)
- return HttpContext.Current;
- HttpContext context = _parent.Context;
- if (context != null)
- return context;
-#endif
return HttpContext.Current;
}
@@ -622,15 +540,10 @@ namespace System.Web.UI
string GetDefaultName ()
{
string defaultName;
- if (defaultNumberID > 99) {
-#if NET_2_0
+ if (defaultNumberID > 99)
defaultName = "ctl" + defaultNumberID++;
-#else
- defaultName = "_ctl" + defaultNumberID++;
-#endif
- } else {
+ else
defaultName = defaultNameArray [defaultNumberID++];
- }
return defaultName;
}
@@ -644,7 +557,6 @@ namespace System.Web.UI
_controls [i].NullifyUniqueID ();
}
-#if NET_2_0
bool IsLoadViewStateByID ()
{
if (loadViewStateByIDCache == null)
@@ -670,7 +582,6 @@ namespace System.Web.UI
loadViewStateByIDCache.Add (myType, ret);
return ret;
}
-#endif
protected internal virtual void AddedControl (Control control, int index)
{
@@ -744,7 +655,6 @@ namespace System.Web.UI
Controls.Add (c);
}
-#if NET_2_0
[EditorBrowsable (EditorBrowsableState.Advanced)]
public virtual void ApplyStyleSheetSkin (Page page)
{
@@ -761,14 +671,12 @@ namespace System.Web.UI
cs.ApplySkin (this);
}
}
-#endif
+ [MonoTODO]
protected void BuildProfileTree (string parentId, bool calcViewState)
{
- //TODO
}
-#if NET_2_0
protected void ClearChildControlState ()
{
_isChildControlStateCleared = true;
@@ -779,19 +687,13 @@ namespace System.Web.UI
ClearChildViewState ();
ClearChildControlState ();
}
-#endif
protected void ClearChildViewState ()
{
pendingVS = null;
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- virtual void CreateChildControls () //DIT
+ protected internal virtual void CreateChildControls () //DIT
{
}
@@ -804,11 +706,9 @@ namespace System.Web.UI
{
if (ChildControlsCreated == false && (stateMask & CREATING_CONTROLS) == 0) {
stateMask |= CREATING_CONTROLS;
-#if NET_2_0
if (Adapter != null)
Adapter.CreateChildControls ();
else
-#endif
CreateChildControls ();
ChildControlsCreated = true;
stateMask &= ~CREATING_CONTROLS;
@@ -824,7 +724,6 @@ namespace System.Web.UI
SetMask (AUTOID_SET, true);
}
-#if NET_2_0
protected void EnsureID ()
{
if (NamingContainer == null)
@@ -837,7 +736,6 @@ namespace System.Web.UI
{
return _events != null;
}
-#endif
void ResetControlsCache ()
{
@@ -854,11 +752,7 @@ namespace System.Web.UI
if ((this.stateMask & IS_NAMING_CONTAINER) != 0 || Parent == null)
//LAMESPEC: MS' docs don't mention it, but FindControl is case insensitive.
-#if NET_2_0
_controlsCache = new Hashtable (StringComparer.OrdinalIgnoreCase);
-#else
- _controlsCache = new Hashtable (CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
-#endif
else
_controlsCache = Parent.InitControlsCache ();
@@ -990,12 +884,7 @@ namespace System.Web.UI
}
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- virtual void OnInit (EventArgs e)
+ protected internal virtual void OnInit (EventArgs e)
{
if ((event_mask & init_mask) != 0) {
EventHandler eh = (EventHandler) (_events [InitEvent]);
@@ -1013,12 +902,7 @@ namespace System.Web.UI
}
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- virtual void OnLoad (EventArgs e)
+ protected internal virtual void OnLoad (EventArgs e)
{
if ((event_mask & load_mask) != 0) {
EventHandler eh = (EventHandler) (_events [LoadEvent]);
@@ -1036,12 +920,7 @@ namespace System.Web.UI
}
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- virtual void OnPreRender (EventArgs e)
+ protected internal virtual void OnPreRender (EventArgs e)
{
if ((event_mask & prerender_mask) != 0) {
EventHandler eh = (EventHandler) (_events [PreRenderEvent]);
@@ -1059,12 +938,7 @@ namespace System.Web.UI
}
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- virtual void OnUnload (EventArgs e)
+ protected internal virtual void OnUnload (EventArgs e)
{
if ((event_mask & unload_mask) != 0) {
EventHandler eh = (EventHandler) (_events [UnloadEvent]);
@@ -1082,7 +956,6 @@ namespace System.Web.UI
}
}
-#if NET_2_0
protected internal Stream OpenFile (string path)
{
try {
@@ -1134,7 +1007,6 @@ namespace System.Web.UI
return page != null ? page.MapPath (path) : Context.Server.MapPath (path);
}
-#endif
protected void RaiseBubbleEvent (object source, EventArgs args)
{
@@ -1163,22 +1035,12 @@ namespace System.Web.UI
}
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- virtual void Render (HtmlTextWriter writer) //DIT
+ protected internal virtual void Render (HtmlTextWriter writer) //DIT
{
RenderChildren (writer);
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- virtual void RenderChildren (HtmlTextWriter writer) //DIT
+ protected internal virtual void RenderChildren (HtmlTextWriter writer) //DIT
{
if (_renderMethodDelegate != null) {
_renderMethodDelegate (writer, this);
@@ -1189,18 +1051,15 @@ namespace System.Web.UI
c = _controls [i];
if (c == null)
continue;
-#if NET_2_0
ControlAdapter tmp = c.Adapter;
if (tmp != null)
c.RenderControl (writer, tmp);
else
-#endif
c.RenderControl (writer);
}
}
}
-#if NET_2_0
protected virtual ControlAdapter ResolveAdapter ()
{
HttpContext context = Context;
@@ -1225,7 +1084,6 @@ namespace System.Web.UI
a = (ControlAdapter)Activator.CreateInstance (adapterType);
return a;
}
-#endif
protected virtual object SaveViewState ()
{
@@ -1312,19 +1170,10 @@ namespace System.Web.UI
public virtual void DataBind () //DIT
{
-#if NET_2_0
DataBind (true);
-#else
- OnDataBinding (EventArgs.Empty);
- DataBindChildren();
-#endif
}
-#if NET_2_0
- protected virtual
-#endif
-
- void DataBindChildren ()
+ protected virtual void DataBindChildren ()
{
if (!HasControls ())
return;
@@ -1341,19 +1190,12 @@ namespace System.Web.UI
return (_controls != null && _controls.Count > 0);
}
-#if NET_2_0
- public virtual
-#else
- public
-#endif
- void RenderControl (HtmlTextWriter writer)
+ public virtual void RenderControl (HtmlTextWriter writer)
{
-#if NET_2_0
if (this.adapter != null) {
RenderControl (writer, this.adapter);
return;
}
-#endif
if ((stateMask & VISIBLE) != 0) {
HttpContext ctx = Context;
@@ -1370,7 +1212,6 @@ namespace System.Web.UI
}
}
-#if NET_2_0
protected void RenderControl (HtmlTextWriter writer, ControlAdapter adapter)
{
if ((stateMask & VISIBLE) != 0) {
@@ -1379,7 +1220,6 @@ namespace System.Web.UI
adapter.EndRender (writer);
}
}
-#endif
public string ResolveUrl (string relativeUrl)
{
@@ -1395,12 +1235,7 @@ namespace System.Web.UI
if (relativeUrl [0] == '#')
return relativeUrl;
-#if NET_2_0
string ts = AppRelativeTemplateSourceDirectory;
-#else
- string ts = TemplateSourceDirectory;
-#endif
-
HttpContext ctx = Context;
HttpResponse resp = ctx != null ? ctx.Response : null;
if (ts == null || ts.Length == 0 || resp == null || relativeUrl.IndexOf (':') >= 0)
@@ -1413,12 +1248,7 @@ namespace System.Web.UI
}
-#if NET_2_0
- public
-#else
- internal
-#endif
- string ResolveClientUrl (string relativeUrl)
+ public string ResolveClientUrl (string relativeUrl)
{
if (relativeUrl == null)
throw new ArgumentNullException ("relativeUrl");
@@ -1507,11 +1337,9 @@ namespace System.Web.UI
trace.Write ("control", String.Concat ("LoadRecursive ", _userId, " ", type_name));
}
#endif
-#if NET_2_0
if (Adapter != null)
Adapter.OnLoad (EventArgs.Empty);
else
-#endif
OnLoad (EventArgs.Empty);
if (HasControls ()) {
int len = _controls.Count;
@@ -1550,12 +1378,10 @@ namespace System.Web.UI
if (trace != null)
trace.Write ("control", String.Concat ("End UnloadRecursive ", _userId, " ", type_name));
#endif
-#if NET_2_0
ControlAdapter tmp = Adapter;
if (tmp != null)
tmp.OnUnload (EventArgs.Empty);
else
-#endif
OnUnload (EventArgs.Empty);
if (dispose)
Dispose ();
@@ -1565,16 +1391,9 @@ namespace System.Web.UI
{
bool visible;
-#if NET_2_0
- visible = Visible;
-#else
- visible = (stateMask & VISIBLE) != 0;
-#endif
-
+ visible = Visible;
if (visible) {
-#if NET_2_0
SetMask (VISIBLE, true);
-#endif
EnsureChildControls ();
#if MONO_TRACE
TraceContext trace = (Context != null && Context.Trace.IsEnabled) ? Context.Trace : null;
@@ -1584,11 +1403,9 @@ namespace System.Web.UI
trace.Write ("control", String.Concat ("PreRenderRecursive ", _userId, " ", type_name));
}
#endif
-#if NET_2_0
if (Adapter != null)
Adapter.OnPreRender (EventArgs.Empty);
else
-#endif
OnPreRender (EventArgs.Empty);
if (!HasControls ())
return;
@@ -1602,11 +1419,8 @@ namespace System.Web.UI
if (trace != null)
trace.Write ("control", String.Concat ("End PreRenderRecursive ", _userId, " ", type_name));
#endif
- }
-#if NET_2_0
- else
+ } else
SetMask (VISIBLE, false);
-#endif
stateMask |= PRERENDERED;
}
@@ -1636,13 +1450,11 @@ namespace System.Web.UI
if ((stateMask & REMOVED) == 0 && (stateMask & INITED) != INITED) {
stateMask |= INITING;
-#if NET_2_0
ApplyTheme ();
ControlAdapter tmp = Adapter;
if (tmp != null)
tmp.OnInit (EventArgs.Empty);
else
-#endif
OnInit (EventArgs.Empty);
TrackViewState ();
stateMask |= INITED;
@@ -1686,11 +1498,10 @@ namespace System.Web.UI
}
}
-#if NET_2_0
object thisAdapterViewState = null;
if (Adapter != null)
thisAdapterViewState = Adapter.SaveAdapterViewState ();
-#endif
+
object thisState = null;
if (IsViewStateEnabled)
@@ -1712,9 +1523,7 @@ namespace System.Web.UI
#endif
trace.SaveViewState (this, thisState);
}
-#if NET_2_0
thisState = new object[] { thisState, thisAdapterViewState };
-#endif
return new Pair (thisState, controlStates);
}
@@ -1732,14 +1541,10 @@ namespace System.Web.UI
}
#endif
Pair savedInfo = (Pair) savedState;
-#if NET_2_0
object[] controlAndAdapterViewStates = (object [])savedInfo.First;
if (Adapter != null)
Adapter.LoadAdapterViewState (controlAndAdapterViewStates [1]);
LoadViewState (controlAndAdapterViewStates [0]);
-#else
- LoadViewState (savedInfo.First);
-#endif
ArrayList controlStates = savedInfo.Second as ArrayList;
if (controlStates == null)
@@ -1791,7 +1596,6 @@ namespace System.Web.UI
stateMask |= VIEWSTATE_LOADED;
}
-#if NET_2_0
internal ControlSkin controlSkin;
internal void ApplyTheme ()
@@ -1816,7 +1620,6 @@ namespace System.Web.UI
trace.Write ("control", String.Concat ("End ApplyThemeRecursive ", _userId, " ", type_name));
#endif
}
-#endif
internal bool AutoID {
get { return (stateMask & AUTOID) != 0; }
@@ -1843,7 +1646,6 @@ namespace System.Web.UI
ResetControlsCache ();
}
-#if NET_2_0
string skinId = string.Empty;
bool _enableTheming = true;
@@ -1994,7 +1796,7 @@ namespace System.Web.UI
if (page != null && CheckForValidationSupport ())
page.ClientScript.ValidateEvent (uniqueId, argument);
}
-#endif
+
void IParserAccessor.AddParsedSubObject (object obj)
{
this.AddParsedSubObject (obj);
diff --git a/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs
index a971e130cfc..881dde2efab 100644
--- a/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs
@@ -4,9 +4,10 @@
// Authors:
// Duncan Mak (duncan@ximian.com)
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+// Marek Habersack <mhabersack@novell.com>
//
// (C) 2002, 2003 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -145,12 +146,10 @@ namespace System.Web.UI {
set { method = value; }
}
-#if NET_2_0
internal CodeMemberMethod DataBindingMethod {
get;
set;
}
-#endif
internal CodeStatementCollection MethodStatements {
get { return methodStatements; }
@@ -256,12 +255,7 @@ namespace System.Web.UI {
}
}
-#if NET_2_0
- public virtual
-#else
- internal
-#endif
- Type BindingContainerType {
+ public virtual Type BindingContainerType {
get {
ControlBuilder cb = (this is TemplateBuilder && !(this is RootBuilder)) ? this : MyNamingContainer;
@@ -272,10 +266,8 @@ namespace System.Web.UI {
return typeof (Control);
}
-#if NET_2_0
if (cb != this && cb is ContentBuilderInternal && !typeof (INonBindingContainer).IsAssignableFrom (cb.BindingContainerType))
return cb.BindingContainerType;
-#endif
Type ct;
if (cb is TemplateBuilder) {
@@ -373,7 +365,6 @@ namespace System.Web.UI {
templateChildren.Add (child);
}
-#if NET_2_0
if (parser == null)
return;
@@ -391,7 +382,6 @@ namespace System.Web.UI {
parser.AddImport (component.Namespace);
parser.AddDependency (component.Source);
-#endif
}
public virtual bool AllowWhitespaceLiterals ()
@@ -470,7 +460,6 @@ namespace System.Web.UI {
{
}
-#if NET_2_0
static Type MapTagType (Type tagType)
{
if (tagType == null)
@@ -538,7 +527,6 @@ namespace System.Web.UI {
return tagType;
}
-#endif
public static ControlBuilder CreateBuilderFromType (TemplateParser parser,
ControlBuilder parentBuilder,
@@ -550,13 +538,8 @@ namespace System.Web.UI {
string sourceFileName)
{
- Type tagType;
-#if NET_2_0
- tagType = MapTagType (type);
-#else
- tagType = type;
-#endif
- ControlBuilder builder;
+ Type tagType = MapTagType (type);
+ ControlBuilder builder;
object [] atts = tagType.GetCustomAttributes (typeof (ControlBuilderAttribute), true);
if (atts != null && atts.Length > 0) {
ControlBuilderAttribute att = (ControlBuilderAttribute) atts [0];
@@ -773,7 +756,7 @@ namespace System.Web.UI {
}
}
}
-#if NET_2_0
+
[MonoTODO ("unsure, lack documentation")]
public virtual object BuildObject ()
{
@@ -802,6 +785,5 @@ namespace System.Web.UI {
}
}
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs b/mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs
index d034c948448..64f8ed2ed69 100644
--- a/mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs
+++ b/mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs
@@ -5,7 +5,7 @@
// Dick Porter <dick@ximian.com>
// Marek Habersack <mhabersack@novell.com>
//
-// Copyright (C) 2005-2008 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Web.Caching;
namespace System.Web.UI
@@ -136,4 +134,3 @@ namespace System.Web.UI
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ControlCollection.cs b/mcs/class/System.Web/System.Web.UI/ControlCollection.cs
index 13264b43416..db51d4725c0 100644
--- a/mcs/class/System.Web/System.Web.UI/ControlCollection.cs
+++ b/mcs/class/System.Web/System.Web.UI/ControlCollection.cs
@@ -5,7 +5,7 @@
// Duncan Mak (duncan@ximian.com)
// Gonzalo Paniagua Javier (gonzalo@novell.com)
//
-// Copyright (c) 2002-2005 Novell, Inc. (http://www.novell.com)
+// Copyright (c) 2002-2010 Novell, Inc. (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -51,11 +51,7 @@ namespace System.Web.UI {
this.owner = owner;
}
- public
-#if NET_2_0
- virtual
-#endif
- int Count {
+ public virtual int Count {
get { return count; }
}
@@ -159,11 +155,7 @@ namespace System.Web.UI {
return (controls != null && Array.IndexOf (controls, c) != -1);
}
- public
-#if NET_2_0
- virtual
-#endif
- void CopyTo (Array array, int index)
+ public virtual void CopyTo (Array array, int index)
{
if (controls == null)
return;
@@ -186,11 +178,7 @@ namespace System.Web.UI {
array.SetValue (controls [i], i + index);
}
- public
-#if NET_2_0
- virtual
-#endif
- IEnumerator GetEnumerator ()
+ public virtual IEnumerator GetEnumerator ()
{
return new SimpleEnumerator (this);
}
diff --git a/mcs/class/System.Web/System.Web.UI/ControlSkin.cs b/mcs/class/System.Web/System.Web.UI/ControlSkin.cs
index 971efab0a0f..f84b1b17fe2 100644
--- a/mcs/class/System.Web/System.Web.UI/ControlSkin.cs
+++ b/mcs/class/System.Web/System.Web.UI/ControlSkin.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2006 Novell, Inc (http://www.novell.com)
+// (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.ComponentModel;
namespace System.Web.UI {
@@ -55,5 +53,3 @@ namespace System.Web.UI {
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ControlSkinDelegate.cs b/mcs/class/System.Web/System.Web.UI/ControlSkinDelegate.cs
index 11564c31538..abe10a118f9 100644
--- a/mcs/class/System.Web/System.Web.UI/ControlSkinDelegate.cs
+++ b/mcs/class/System.Web/System.Web.UI/ControlSkinDelegate.cs
@@ -4,7 +4,7 @@
// Author:
// Sanjay Gupta <gsanjay@novell.com>
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -28,8 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -39,5 +37,3 @@ namespace System.Web.UI
public delegate Control ControlSkinDelegate (Control control);
}
-#endif
-
diff --git a/mcs/class/System.Web/System.Web.UI/ControlValuePropertyAttribute.cs b/mcs/class/System.Web/System.Web.UI/ControlValuePropertyAttribute.cs
index 4d7ef61303a..5810a86b195 100644
--- a/mcs/class/System.Web/System.Web.UI/ControlValuePropertyAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/ControlValuePropertyAttribute.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -27,7 +27,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -79,7 +78,6 @@ namespace System.Web.UI {
public override int GetHashCode ()
{
return base.GetHashCode();
- }
+ }
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/CssClassPropertyAttribute.cs b/mcs/class/System.Web/System.Web.UI/CssClassPropertyAttribute.cs
index b78d0f00a0a..10d77ede62d 100644
--- a/mcs/class/System.Web/System.Web.UI/CssClassPropertyAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/CssClassPropertyAttribute.cs
@@ -4,7 +4,7 @@
// Authors:
// Atsushi Enomoto <atsushi@ximian.com>
//
-// (C) 2008 Novell, Inc. (http://www.novell.com)
+// (C) 2008-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -27,7 +27,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.ComponentModel;
using System.Security.Permissions;
@@ -42,4 +41,3 @@ namespace System.Web.UI {
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs b/mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs
index 76c72fc0c4b..adcf0834b29 100644
--- a/mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs
+++ b/mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -48,11 +48,7 @@ namespace System.Web.UI {
internal CssStyleCollection ()
{
-#if NET_2_0
style = new ListDictionary (StringComparer.OrdinalIgnoreCase);
-#else
- style = new ListDictionary ();
-#endif
}
internal CssStyleCollection (StateBag bag) : this ()
@@ -116,13 +112,8 @@ namespace System.Web.UI {
static void AppendStyle (StringBuilder sb, string key, string value)
{
-#if NET_2_0
if (String.Compare (key, "background-image", StringComparison.OrdinalIgnoreCase) == 0 &&
value.Length >= 3 && String.Compare ("url", 0, value, 0, 3, StringComparison.OrdinalIgnoreCase) != 0)
-#else
- if (key == "background-image" && 0 != String.Compare ("url", value.Substring (0, 3), true,
- Helpers.InvariantCulture))
-#endif
sb.AppendFormat ("{0}:url({1});", key, HttpUtility.UrlPathEncode (value));
else
sb.AppendFormat ("{0}:{1};", key, value);
@@ -168,12 +159,7 @@ namespace System.Web.UI {
bag [AttributeCollection.StyleAttribute] = _value.ToString ();
}
-#if NET_2_0
- public
-#else
- internal
-#endif
- void Add (HtmlTextWriterStyle key, string value)
+ public void Add (HtmlTextWriterStyle key, string value)
{
Add (HtmlTextWriter.StaticGetStyleName (key), value);
}
@@ -194,7 +180,7 @@ namespace System.Web.UI {
else
BagToValue ();
}
-#if NET_2_0
+
public string this [HtmlTextWriterStyle key] {
get { return style [HtmlTextWriter.StaticGetStyleName (key)] as string; }
set { Add (HtmlTextWriter.StaticGetStyleName (key), value); }
@@ -205,11 +191,7 @@ namespace System.Web.UI {
Remove (HtmlTextWriter.StaticGetStyleName (key));
}
- public
-#else
- internal
-#endif
- string Value {
+ public string Value {
get { return _value.ToString (); }
set {
SetValueInternal (value);
diff --git a/mcs/class/System.Web/System.Web.UI/DataBinder.cs b/mcs/class/System.Web/System.Web.UI/DataBinder.cs
index 471138df3ee..822ac4b3463 100644
--- a/mcs/class/System.Web/System.Web.UI/DataBinder.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataBinder.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,12 +29,10 @@
//
using System.Collections;
+using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Security.Permissions;
-#if NET_2_0
-using System.Collections.Generic;
-#endif
namespace System.Web.UI {
@@ -197,7 +195,6 @@ namespace System.Web.UI {
return FormatResult (result, format);
}
- #if NET_2_0
[ThreadStatic]
static Dictionary<Type, PropertyInfo> dataItemCache;
@@ -236,7 +233,6 @@ namespace System.Web.UI {
bool flag;
return GetDataItem (container, out flag);
}
- #endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/DataBindingCollection.cs b/mcs/class/System.Web/System.Web.UI/DataBindingCollection.cs
index c7adf86caac..bd5fa65eede 100644
--- a/mcs/class/System.Web/System.Web.UI/DataBindingCollection.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataBindingCollection.cs
@@ -4,7 +4,7 @@
// Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -41,12 +41,8 @@ namespace System.Web.UI {
ArrayList removed;
EventHandlerList events = new EventHandlerList ();
-#if NET_2_0
- public
-#else
- internal
-#endif
- event EventHandler Changed {
+
+ public event EventHandler Changed {
add { events.AddHandler (changedEvent, value); }
remove { events.RemoveHandler (changedEvent, value); }
}
@@ -126,12 +122,10 @@ namespace System.Web.UI {
list.Remove (propertyName);
}
-#if NET_2_0
public bool Contains (string propertyName)
{
return list.Contains (propertyName);
}
-#endif
internal void RaiseChanged ()
{
diff --git a/mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs b/mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs
index 5b04945f3d6..f37cd4a78d9 100644
--- a/mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -38,10 +38,7 @@ namespace System.Web.UI {
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
[ToolboxItem(false)]
- public sealed class DataBoundLiteralControl : Control
-#if NET_2_0
- , ITextControl
-#endif
+ public sealed class DataBoundLiteralControl : Control, ITextControl
{
int staticLiteralsCount;
string [] staticLiterals;
@@ -86,12 +83,7 @@ namespace System.Web.UI {
}
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override void Render (HtmlTextWriter output)
+ protected internal override void Render (HtmlTextWriter output)
{
int stLength = staticLiterals == null ? 0 : staticLiterals.Length;
int dbLength = dataBoundLiterals.Length;
@@ -124,7 +116,6 @@ namespace System.Web.UI {
staticLiterals [index] = s;
}
-#if NET_2_0
string ITextControl.Text {
get {
return Text;
@@ -133,7 +124,6 @@ namespace System.Web.UI {
throw new NotSupportedException ();
}
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceCacheDurationConverter.cs b/mcs/class/System.Web/System.Web.UI/DataSourceCacheDurationConverter.cs
index 294e01675fd..3ac391e923c 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceCacheDurationConverter.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceCacheDurationConverter.cs
@@ -33,7 +33,6 @@ using System.Collections;
using System.ComponentModel;
using System.Globalization;
-#if NET_2_0
namespace System.Web.UI
{
public class DataSourceCacheDurationConverter : Int32Converter
@@ -90,4 +89,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceCacheExpiry.cs b/mcs/class/System.Web/System.Web.UI/DataSourceCacheExpiry.cs
index b676bcf1488..8413fc95620 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceCacheExpiry.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceCacheExpiry.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,12 +26,10 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI {
public enum DataSourceCacheExpiry {
Absolute = 0,
Sliding = 1
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceCapabilities.cs b/mcs/class/System.Web/System.Web.UI/DataSourceCapabilities.cs
index 60c3d020036..0de8d95c225 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceCapabilities.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceCapabilities.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI {
[Flags]
public enum DataSourceCapabilities {
@@ -36,5 +35,4 @@ namespace System.Web.UI {
RetrieveTotalRowCount = 4
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceControl.cs b/mcs/class/System.Web/System.Web.UI/DataSourceControl.cs
index f862c72d598..751a8ae1d1a 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceControl.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
@@ -160,5 +159,4 @@ namespace System.Web.UI {
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/DataSourceControlBuilder.cs
index 97f8b07ce2a..d678caaa954 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceControlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceControlBuilder.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2006 Novell, Inc (http://www.novell.com)
+// (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
namespace System.Web.UI {
public sealed class DataSourceControlBuilder : ControlBuilder
@@ -35,4 +33,3 @@ namespace System.Web.UI {
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceOperation.cs b/mcs/class/System.Web/System.Web.UI/DataSourceOperation.cs
index 80ecb4c8c08..6cea69cb791 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceOperation.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceOperation.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI {
public enum DataSourceOperation {
Delete = 0,
@@ -36,5 +35,4 @@ namespace System.Web.UI {
SelectCount = 4
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceSelectArguments.cs b/mcs/class/System.Web/System.Web.UI/DataSourceSelectArguments.cs
index bca38f16d8b..6c0f0451912 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceSelectArguments.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceSelectArguments.cs
@@ -4,7 +4,7 @@
// Author:
// Sanjay Gupta <gsanjay@novell.com>
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -163,4 +162,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceView.cs b/mcs/class/System.Web/System.Web.UI/DataSourceView.cs
index 23bf81b24ae..7415b671ec9 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceView.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceView.cs
@@ -6,7 +6,7 @@
// Sanjay Gupta (gsanjay@novell.com)
//
// (C) 2003 Ben Maurer
-// (C) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -30,7 +30,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
using System.Text;
@@ -205,5 +204,4 @@ namespace System.Web.UI {
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceViewOperationCallback.cs b/mcs/class/System.Web/System.Web.UI/DataSourceViewOperationCallback.cs
index 0fb3f9694c7..003aabdd17d 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceViewOperationCallback.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceViewOperationCallback.cs
@@ -4,7 +4,7 @@
// Author:
// Sanjay Gupta <gsanjay@novell.com>
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -28,12 +28,9 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
namespace System.Web.UI
{
public delegate bool DataSourceViewOperationCallback (int recordsAffected, Exception exception);
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceViewSelectCallback.cs b/mcs/class/System.Web/System.Web.UI/DataSourceViewSelectCallback.cs
index 53db740e855..f7345ff3cf6 100644
--- a/mcs/class/System.Web/System.Web.UI/DataSourceViewSelectCallback.cs
+++ b/mcs/class/System.Web/System.Web.UI/DataSourceViewSelectCallback.cs
@@ -4,7 +4,7 @@
// Author:
// Sanjay Gupta <gsanjay@novell.com>
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Collections;
@@ -36,5 +35,3 @@ namespace System.Web.UI
{
public delegate void DataSourceViewSelectCallback (IEnumerable data);
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DesignTimeParseData.cs b/mcs/class/System.Web/System.Web.UI/DesignTimeParseData.cs
index a4890e09751..6de982c6520 100644
--- a/mcs/class/System.Web/System.Web.UI/DesignTimeParseData.cs
+++ b/mcs/class/System.Web/System.Web.UI/DesignTimeParseData.cs
@@ -7,7 +7,7 @@
//
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -42,18 +42,16 @@ namespace System.Web.UI {
string text;
IDesignerHost host;
string durl;
-#if NET_2_0
string filter;
bool theme;
ICollection collection;
-#endif
public DesignTimeParseData (IDesignerHost designerHost, string parseText)
{
host = designerHost;
text = parseText;
}
-#if NET_2_0
+
public DesignTimeParseData (IDesignerHost designerHost, string parseText, string filter)
: this (designerHost, parseText)
{
@@ -64,7 +62,6 @@ namespace System.Web.UI {
{
this.collection = collection;
}
-#endif
public EventHandler DataBindingHandler {
get {
@@ -97,7 +94,7 @@ namespace System.Web.UI {
return text;
}
}
-#if NET_2_0
+
public string Filter {
get { return filter; }
}
@@ -111,6 +108,5 @@ namespace System.Web.UI {
public ICollection UserControlRegisterEntries {
get { return collection; }
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/DesignTimeTemplateParser.cs b/mcs/class/System.Web/System.Web.UI/DesignTimeTemplateParser.cs
index 73f68d07ab6..0706d07d3ca 100644
--- a/mcs/class/System.Web/System.Web.UI/DesignTimeTemplateParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/DesignTimeTemplateParser.cs
@@ -5,7 +5,7 @@
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2003 Andreas Nahr
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -35,15 +35,7 @@ namespace System.Web.UI {
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_2_0
public static class DesignTimeTemplateParser {
-#else
- public sealed class DesignTimeTemplateParser {
-
- DesignTimeTemplateParser ()
- {
- }
-#endif
[SecurityPermission (SecurityAction.Demand, ControlThread = true, UnmanagedCode = true)]
public static Control ParseControl (DesignTimeParseData data)
{
@@ -75,7 +67,7 @@ namespace System.Web.UI {
// Parse data
return NewParser;
}
-#if NET_2_0
+
[MonoTODO("Not implemented")]
[SecurityPermission (SecurityAction.Demand, ControlThread = true, UnmanagedCode = true)]
public static Control[] ParseControls (DesignTimeParseData data)
@@ -89,6 +81,5 @@ namespace System.Web.UI {
{
throw new NotImplementedException ();
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/DesignerDataBoundLiteralControl.cs b/mcs/class/System.Web/System.Web.UI/DesignerDataBoundLiteralControl.cs
index 2b23cd29ec8..e04bd376267 100644
--- a/mcs/class/System.Web/System.Web.UI/DesignerDataBoundLiteralControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/DesignerDataBoundLiteralControl.cs
@@ -5,7 +5,7 @@
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2003 Andreas Nahr
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -67,12 +67,7 @@ namespace System.Web.UI
text = (string) savedState;
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override void Render (HtmlTextWriter output)
+ protected internal override void Render (HtmlTextWriter output)
{
output.Write (text);
}
diff --git a/mcs/class/System.Web/System.Web.UI/EventEntry.cs b/mcs/class/System.Web/System.Web.UI/EventEntry.cs
index cc8c6871ef4..0a5649a3570 100644
--- a/mcs/class/System.Web/System.Web.UI/EventEntry.cs
+++ b/mcs/class/System.Web/System.Web.UI/EventEntry.cs
@@ -28,24 +28,24 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI
{
public class EventEntry
{
- public EventEntry () { throw new NotImplementedException (); }
+ public EventEntry ()
+ {}
+
public string HandlerMethodName {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get;
+ set;
}
public Type HandlerType {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get;
+ set;
}
public string Name {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get;
+ set;
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/ExpressionBinding.cs b/mcs/class/System.Web/System.Web.UI/ExpressionBinding.cs
index 5219fbea13d..b4d348e84f7 100644
--- a/mcs/class/System.Web/System.Web.UI/ExpressionBinding.cs
+++ b/mcs/class/System.Web/System.Web.UI/ExpressionBinding.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
namespace System.Web.UI {
@@ -93,4 +92,3 @@ namespace System.Web.UI {
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ExpressionBindingCollection.cs b/mcs/class/System.Web/System.Web.UI/ExpressionBindingCollection.cs
index bd9d2563812..a9590228e32 100644
--- a/mcs/class/System.Web/System.Web.UI/ExpressionBindingCollection.cs
+++ b/mcs/class/System.Web/System.Web.UI/ExpressionBindingCollection.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.ComponentModel;
using System.Collections;
@@ -150,4 +149,3 @@ namespace System.Web.UI {
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ExtractTemplateValuesMethod.cs b/mcs/class/System.Web/System.Web.UI/ExtractTemplateValuesMethod.cs
index f9ce6822441..150c23cb5cc 100644
--- a/mcs/class/System.Web/System.Web.UI/ExtractTemplateValuesMethod.cs
+++ b/mcs/class/System.Web/System.Web.UI/ExtractTemplateValuesMethod.cs
@@ -4,7 +4,7 @@
// Author:
// Sanjay Gupta <gsanjay@novell.com>
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Collections.Specialized;
@@ -37,4 +36,3 @@ namespace System.Web.UI
public delegate IOrderedDictionary ExtractTemplateValuesMethod (Control control);
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute.cs b/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute.cs
index 948a29e8dea..20857aa8916 100644
--- a/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute.cs
@@ -6,7 +6,7 @@
// Marek Habersack (mhabersack@novell.com)
//
// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-// (C) 2009 Novell, Inc (http://novell.com/)
+// (C) 2009-2010 Novell, Inc (http://novell.com/)
//
//
//
@@ -30,7 +30,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI
{
[AttributeUsageAttribute (AttributeTargets.Class)]
@@ -82,4 +81,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.cs
index 92f9cecca2c..2c86481ad35 100644
--- a/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.cs
@@ -6,7 +6,7 @@
// Marek Habersack <mhabersack@novell.com>
//
// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-// (C) 2009 Novell, Inc (http://novell.com/)
+// (C) 2009-2010 Novell, Inc (http://novell.com/)
//
//
//
@@ -30,7 +30,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Web.UI;
using System.Web.UI.WebControls;
@@ -79,5 +78,4 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.cs
index 9a0f94fcf1e..35b55bfcf1c 100644
--- a/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Web.UI;
namespace System.Web.UI
@@ -40,4 +39,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs b/mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs
index 2626d9e4de7..afbfb3bb68a 100644
--- a/mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/FilterableAttribute.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -27,7 +27,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -84,7 +83,7 @@ namespace System.Web.UI {
if (attrib is FilterableAttribute)
return true;
}
- return false;
+ return false;
}
public static bool IsTypeFilterable (Type type)
@@ -95,8 +94,7 @@ namespace System.Web.UI {
if (attrib is FilterableAttribute)
return true;
}
- return false;
+ return false;
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/HiddenFieldPageStatePersister.cs b/mcs/class/System.Web/System.Web.UI/HiddenFieldPageStatePersister.cs
index 89926fff699..b66bffcb750 100644
--- a/mcs/class/System.Web/System.Web.UI/HiddenFieldPageStatePersister.cs
+++ b/mcs/class/System.Web/System.Web.UI/HiddenFieldPageStatePersister.cs
@@ -5,6 +5,7 @@
// Marek Habersack (grendello@gmail.com)
//
// (C) 2006 Marek Habersack
+// (C) 2007-2010 Novell, Inc (http://novell.com/)
//
//
@@ -31,15 +32,10 @@ using System.Security.Permissions;
namespace System.Web.UI
{
-#if NET_2_0
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public
-#else
- internal
-#endif
- class HiddenFieldPageStatePersister : PageStatePersister
+ public class HiddenFieldPageStatePersister : PageStatePersister
{
public HiddenFieldPageStatePersister (Page page)
: base(page)
diff --git a/mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceControl.cs b/mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceControl.cs
index 7a5e2926e90..545d69fdc53 100644
--- a/mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceControl.cs
@@ -6,7 +6,7 @@
// Lluis Sanchez Gual (lluis@novell.com)
//
// (C) 2003 Ben Maurer
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -30,7 +30,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
using System.Text;
@@ -126,5 +125,4 @@ namespace System.Web.UI
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceView.cs b/mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceView.cs
index d9f6972edbd..83a41acd933 100644
--- a/mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceView.cs
+++ b/mcs/class/System.Web/System.Web.UI/HierarchicalDataSourceView.cs
@@ -6,7 +6,7 @@
// Sanjay Gupta (gsanjay@novell.com)
//
// (C) 2003 Ben Maurer
-// (C) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -30,7 +30,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
using System.Text;
@@ -41,8 +40,7 @@ namespace System.Web.UI {
{
}
- public abstract IHierarchicalEnumerable Select();
+ public abstract IHierarchicalEnumerable Select();
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/Html32TextWriter.cs b/mcs/class/System.Web/System.Web.UI/Html32TextWriter.cs
index 35035c99664..3ecee2c0076 100644
--- a/mcs/class/System.Web/System.Web.UI/Html32TextWriter.cs
+++ b/mcs/class/System.Web/System.Web.UI/Html32TextWriter.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// Copyright (C) Matthijs ter Woord, 2004
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -39,12 +39,11 @@ namespace System.Web.UI
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public class Html32TextWriter : HtmlTextWriter {
-#if NET_2_0
+ public class Html32TextWriter : HtmlTextWriter
+ {
bool div_table_substitution;
bool bold;
bool italic;
-#endif
public Html32TextWriter (TextWriter writer) : base (writer)
{
@@ -54,7 +53,6 @@ namespace System.Web.UI
{
}
-#if NET_2_0
[MonoTODO ("no effect on html generation")]
public bool ShouldPerformDivTableSubstitution {
get { return div_table_substitution; }
@@ -72,7 +70,6 @@ namespace System.Web.UI
get { return italic; }
set { italic = value; }
}
-#endif
public override void RenderBeginTag (HtmlTextWriterTag tagKey)
{
@@ -88,13 +85,13 @@ namespace System.Web.UI
{
if (tagKey == HtmlTextWriterTag.Unknown ||
!Enum.IsDefined (typeof (HtmlTextWriterTag), tagKey))
- return "";
+ return String.Empty;
return tagKey.ToString ().ToLower (Helpers.InvariantCulture);
/* The code below is here just in case we need to split things up
switch (tagkey) {
case HtmlTextWriterTag.Unknown:
- return "";
+ return String.Empty;
case HtmlTextWriterTag.A:
return "a";
case HtmlTextWriterTag.Acronym:
@@ -288,7 +285,7 @@ namespace System.Web.UI
case HtmlTextWriterTag.Xml:
return "xml";
default:
- return "";
+ return String.Empty;
}
*/
}
diff --git a/mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs b/mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs
index ab2e7b7dc7a..4cc18bd3a31 100644
--- a/mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs
+++ b/mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs
@@ -4,7 +4,7 @@
// Author:
// Ben Maurer <bmaurer@novell.com>
//
-// (c) 2005 Novell
+// (c) 2005-2010 Novell, Inc (http://novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -47,20 +47,9 @@ namespace System.Web.UI {
static HtmlTextWriter ()
{
-#if NET_2_0
_tagTable = new Hashtable (tags.Length, StringComparer.OrdinalIgnoreCase);
_attributeTable = new Hashtable (htmlattrs.Length, StringComparer.OrdinalIgnoreCase);
_styleTable = new Hashtable (htmlstyles.Length, StringComparer.OrdinalIgnoreCase);
-#else
- _tagTable = new Hashtable (tags.Length,
- CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
-
- _attributeTable = new Hashtable (htmlattrs.Length,
- CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
-
- _styleTable = new Hashtable (htmlstyles.Length,
- CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
-#endif
foreach (HtmlTag tag in tags)
_tagTable.Add (tag.name, tag);
@@ -162,9 +151,7 @@ namespace System.Web.UI {
styles [styles_pos] = new AddedStyle ();
#endif
styles [styles_pos].name = name;
-#if NET_2_0
value = HttpUtility.HtmlAttributeEncode (value);
-#endif
styles [styles_pos].value = value;
styles [styles_pos].key = key;
}
@@ -228,11 +215,8 @@ namespace System.Web.UI {
for (int i = 0; i <= styles_pos; i++) {
AddedStyle a = styles [i];
if (OnStyleAttributeRender (a.name, a.value, a.key)) {
-#if NET_2_0
- if (a.key == HtmlTextWriterStyle.BackgroundImage) {
+ if (a.key == HtmlTextWriterStyle.BackgroundImage)
a.value = String.Concat ("url(", HttpUtility.UrlPathEncode (a.value), ")");
- }
-#endif
WriteStyleAttribute (a.name, a.value, false);
}
}
@@ -482,7 +466,7 @@ namespace System.Web.UI {
break;
case TagType.Block:
Indent--;
- WriteLineNoTabs ("");
+ WriteLineNoTabs (String.Empty);
WriteEndTag (TagName);
break;
@@ -981,7 +965,7 @@ namespace System.Web.UI {
}
static HtmlTag [] tags = {
- new HtmlTag (HtmlTextWriterTag.Unknown, "", TagType.Block),
+ new HtmlTag (HtmlTextWriterTag.Unknown, String.Empty, TagType.Block),
new HtmlTag (HtmlTextWriterTag.A, "a", TagType.Inline),
new HtmlTag (HtmlTextWriterTag.Acronym, "acronym", TagType.Inline),
new HtmlTag (HtmlTextWriterTag.Address, "address", TagType.Block),
@@ -1121,7 +1105,6 @@ namespace System.Web.UI {
new HtmlAttribute (HtmlTextWriterAttribute.Value, "value"),
new HtmlAttribute (HtmlTextWriterAttribute.Width, "width"),
new HtmlAttribute (HtmlTextWriterAttribute.Wrap, "wrap"),
-#if NET_2_0
new HtmlAttribute (HtmlTextWriterAttribute.Abbr, "abbr"),
new HtmlAttribute (HtmlTextWriterAttribute.AutoComplete, "autocomplete"),
new HtmlAttribute (HtmlTextWriterAttribute.Axis, "axis"),
@@ -1136,7 +1119,6 @@ namespace System.Web.UI {
new HtmlAttribute (HtmlTextWriterAttribute.Shape, "shape"),
new HtmlAttribute (HtmlTextWriterAttribute.Usemap, "usemap"),
new HtmlAttribute (HtmlTextWriterAttribute.VCardName, "vcard_name"),
-#endif
};
static HtmlStyle [] htmlstyles = {
@@ -1154,7 +1136,6 @@ namespace System.Web.UI {
new HtmlStyle (HtmlTextWriterStyle.Height, "height"),
new HtmlStyle (HtmlTextWriterStyle.TextDecoration, "text-decoration"),
new HtmlStyle (HtmlTextWriterStyle.Width, "width"),
-#if NET_2_0
new HtmlStyle (HtmlTextWriterStyle.ListStyleImage, "list-style-image"),
new HtmlStyle (HtmlTextWriterStyle.ListStyleType, "list-style-type"),
new HtmlStyle (HtmlTextWriterStyle.Cursor, "cursor"),
@@ -1184,10 +1165,8 @@ namespace System.Web.UI {
new HtmlStyle (HtmlTextWriterStyle.Visibility, "visibility"),
new HtmlStyle (HtmlTextWriterStyle.WhiteSpace, "white-space"),
new HtmlStyle (HtmlTextWriterStyle.ZIndex, "z-index"),
-#endif
};
-#if NET_2_0
public virtual bool IsValidFormAttribute (string attribute)
{
return true;
@@ -1257,6 +1236,5 @@ namespace System.Web.UI {
public virtual void EndRender ()
{
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/HtmlTextWriterAttribute.cs b/mcs/class/System.Web/System.Web.UI/HtmlTextWriterAttribute.cs
index 6d75a4a33b9..e4d334fb317 100644
--- a/mcs/class/System.Web/System.Web.UI/HtmlTextWriterAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/HtmlTextWriterAttribute.cs
@@ -4,7 +4,7 @@
// Author:
// Ben Maurer <bmaurer@novell.com>
//
-// (c) 2005 Novell
+// (c) 2005-2010 Novell
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,10 +26,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-namespace System.Web.UI {
-#if !NET_2_0
- [Serializable]
-#endif
+namespace System.Web.UI
+{
public enum HtmlTextWriterAttribute {
Accesskey,
Align,
@@ -71,7 +69,6 @@ namespace System.Web.UI {
Value,
Width,
Wrap,
-#if NET_2_0
Abbr,
AutoComplete,
Axis,
@@ -86,6 +83,5 @@ namespace System.Web.UI {
Shape,
Usemap,
VCardName
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/HtmlTextWriterStyle.cs b/mcs/class/System.Web/System.Web.UI/HtmlTextWriterStyle.cs
index 5dd11945d66..95c33db4557 100644
--- a/mcs/class/System.Web/System.Web.UI/HtmlTextWriterStyle.cs
+++ b/mcs/class/System.Web/System.Web.UI/HtmlTextWriterStyle.cs
@@ -4,7 +4,7 @@
// Author:
// Ben Maurer <bmaurer@novell.com>
//
-// (c) 2005 Novell
+// (c) 2005-2010 Novell, Inc (http://novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,10 +26,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-namespace System.Web.UI {
-#if !NET_2_0
- [Serializable]
-#endif
+namespace System.Web.UI
+{
public enum HtmlTextWriterStyle {
BackgroundColor,
BackgroundImage,
@@ -45,7 +43,6 @@ namespace System.Web.UI {
Height,
TextDecoration,
Width,
-#if NET_2_0
ListStyleImage,
ListStyleType,
Cursor,
@@ -75,7 +72,5 @@ namespace System.Web.UI {
Visibility,
WhiteSpace,
ZIndex
-#endif
}
-
}
diff --git a/mcs/class/System.Web/System.Web.UI/HtmlTextWriterTag.cs b/mcs/class/System.Web/System.Web.UI/HtmlTextWriterTag.cs
index 57430ab0e17..37277f58568 100644
--- a/mcs/class/System.Web/System.Web.UI/HtmlTextWriterTag.cs
+++ b/mcs/class/System.Web/System.Web.UI/HtmlTextWriterTag.cs
@@ -4,7 +4,7 @@
// Author:
// Ben Maurer <bmaurer@novell.com>
//
-// (c) 2005 Novell
+// (c) 2005-2010 Novell, Inc (http://novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,10 +26,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-namespace System.Web.UI {
-#if !NET_2_0
- [Serializable]
-#endif
+namespace System.Web.UI
+{
public enum HtmlTextWriterTag {
Unknown,
A,
diff --git a/mcs/class/System.Web/System.Web.UI/IAutoFieldGenerator.cs b/mcs/class/System.Web/System.Web.UI/IAutoFieldGenerator.cs
index 72ab76bebcf..22708f4e668 100644
--- a/mcs/class/System.Web/System.Web.UI/IAutoFieldGenerator.cs
+++ b/mcs/class/System.Web/System.Web.UI/IAutoFieldGenerator.cs
@@ -4,7 +4,7 @@
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
-// (C) 2008 Novell, Inc (http://www.novell.com)
+// (C) 2008-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
using System.Collections;
using System.Security.Permissions;
@@ -43,5 +41,4 @@ namespace System.Web.UI
ICollection GenerateFields (Control control);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IBindableControl.cs b/mcs/class/System.Web/System.Web.UI/IBindableControl.cs
index 79202281c4e..6135da9ca4d 100644
--- a/mcs/class/System.Web/System.Web.UI/IBindableControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/IBindableControl.cs
@@ -4,7 +4,7 @@
// Authors:
// Atsushi Enomoto <atsushi@ximian.com>
//
-// (C) 2008 Novell, Inc (http://www.novell.com)
+// (C) 2008-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
using System.Collections.Specialized;
using System.Security.Permissions;
@@ -43,5 +41,4 @@ namespace System.Web.UI
void ExtractValues (IOrderedDictionary dictionary);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IBindableTemplate.cs b/mcs/class/System.Web/System.Web.UI/IBindableTemplate.cs
index c363223d202..0fbb1fc6b1f 100644
--- a/mcs/class/System.Web/System.Web.UI/IBindableTemplate.cs
+++ b/mcs/class/System.Web/System.Web.UI/IBindableTemplate.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
using System.Collections.Specialized;
@@ -39,5 +37,4 @@ namespace System.Web.UI
IOrderedDictionary ExtractValues (Control control);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ICallbackEventHandler.cs b/mcs/class/System.Web/System.Web.UI/ICallbackEventHandler.cs
index d561ad97130..cd2a65b7d63 100644
--- a/mcs/class/System.Web/System.Web.UI/ICallbackEventHandler.cs
+++ b/mcs/class/System.Web/System.Web.UI/ICallbackEventHandler.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -39,5 +37,4 @@ namespace System.Web.UI
void RaiseCallbackEvent (string eventArgs);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ICheckBoxControl.cs b/mcs/class/System.Web/System.Web.UI/ICheckBoxControl.cs
index 6ebc2a330d7..006804c67b8 100644
--- a/mcs/class/System.Web/System.Web.UI/ICheckBoxControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/ICheckBoxControl.cs
@@ -4,7 +4,7 @@
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
//
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -39,5 +37,4 @@ namespace System.Web.UI
event EventHandler CheckedChanged;
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IControlBuilderAccessor.cs b/mcs/class/System.Web/System.Web.UI/IControlBuilderAccessor.cs
index 1652c097e21..cfd9a1dd534 100644
--- a/mcs/class/System.Web/System.Web.UI/IControlBuilderAccessor.cs
+++ b/mcs/class/System.Web/System.Web.UI/IControlBuilderAccessor.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -38,5 +36,4 @@ namespace System.Web.UI
ControlBuilder ControlBuilder { get; }
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IControlDesignerAccessor.cs b/mcs/class/System.Web/System.Web.UI/IControlDesignerAccessor.cs
index 604f222d538..51f1152594a 100644
--- a/mcs/class/System.Web/System.Web.UI/IControlDesignerAccessor.cs
+++ b/mcs/class/System.Web/System.Web.UI/IControlDesignerAccessor.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
using System.Collections;
@@ -44,5 +42,3 @@ namespace System.Web.UI
IDictionary UserData { get; }
}
}
-#endif
-
diff --git a/mcs/class/System.Web/System.Web.UI/IDReferencePropertyAttribute.cs b/mcs/class/System.Web/System.Web.UI/IDReferencePropertyAttribute.cs
index b8687c372d5..bfc7a33c4d2 100644
--- a/mcs/class/System.Web/System.Web.UI/IDReferencePropertyAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/IDReferencePropertyAttribute.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -49,7 +47,7 @@ namespace System.Web.UI
public override bool Equals (object obj)
{
if (obj != null && obj is IDReferencePropertyAttribute)
- return (this.controlType == ((IDReferencePropertyAttribute) obj).controlType);
+ return (this.controlType == ((IDReferencePropertyAttribute) obj).controlType);
return false;
}
@@ -63,5 +61,4 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IDataItemContainer.cs b/mcs/class/System.Web/System.Web.UI/IDataItemContainer.cs
index 9f58aca71fc..ba9e3abd62d 100644
--- a/mcs/class/System.Web/System.Web.UI/IDataItemContainer.cs
+++ b/mcs/class/System.Web/System.Web.UI/IDataItemContainer.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -40,5 +38,4 @@ namespace System.Web.UI
int DisplayIndex { get; }
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IDataSource.cs b/mcs/class/System.Web/System.Web.UI/IDataSource.cs
index b82694dfa4d..33a21d318fc 100644
--- a/mcs/class/System.Web/System.Web.UI/IDataSource.cs
+++ b/mcs/class/System.Web/System.Web.UI/IDataSource.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
using System.Text;
@@ -40,5 +39,4 @@ namespace System.Web.UI {
ICollection GetViewNames ();
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IDataSourceViewSchemaAccessor.cs b/mcs/class/System.Web/System.Web.UI/IDataSourceViewSchemaAccessor.cs
index 4b90be834a3..63d4f2ea6ee 100644
--- a/mcs/class/System.Web/System.Web.UI/IDataSourceViewSchemaAccessor.cs
+++ b/mcs/class/System.Web/System.Web.UI/IDataSourceViewSchemaAccessor.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -38,5 +36,4 @@ namespace System.Web.UI
object DataSourceViewSchema { get; set; }
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IEditableTextControl.cs b/mcs/class/System.Web/System.Web.UI/IEditableTextControl.cs
index dc9277fce20..5ce858055ca 100644
--- a/mcs/class/System.Web/System.Web.UI/IEditableTextControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/IEditableTextControl.cs
@@ -4,7 +4,7 @@
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
//
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -38,5 +36,4 @@ namespace System.Web.UI
event EventHandler TextChanged;
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IExpressionsAccessor.cs b/mcs/class/System.Web/System.Web.UI/IExpressionsAccessor.cs
index 27cc9271740..22f497d7a30 100644
--- a/mcs/class/System.Web/System.Web.UI/IExpressionsAccessor.cs
+++ b/mcs/class/System.Web/System.Web.UI/IExpressionsAccessor.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -39,5 +37,4 @@ namespace System.Web.UI
bool HasExpressions { get; }
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IFilterResolutionService.cs b/mcs/class/System.Web/System.Web.UI/IFilterResolutionService.cs
index 847055a7a4f..a6111e5a3ea 100644
--- a/mcs/class/System.Web/System.Web.UI/IFilterResolutionService.cs
+++ b/mcs/class/System.Web/System.Web.UI/IFilterResolutionService.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -39,5 +37,4 @@ namespace System.Web.UI
bool EvaluateFilter (string filterName);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IHierarchicalDataSource.cs b/mcs/class/System.Web/System.Web.UI/IHierarchicalDataSource.cs
index 04f876ce490..5416a4cb5fb 100644
--- a/mcs/class/System.Web/System.Web.UI/IHierarchicalDataSource.cs
+++ b/mcs/class/System.Web/System.Web.UI/IHierarchicalDataSource.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
using System.Text;
@@ -39,5 +38,4 @@ namespace System.Web.UI {
HierarchicalDataSourceView GetHierarchicalView (string viewPath);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IHierarchicalEnumerable.cs b/mcs/class/System.Web/System.Web.UI/IHierarchicalEnumerable.cs
index 1e8859e1fb2..ca3f1a53413 100644
--- a/mcs/class/System.Web/System.Web.UI/IHierarchicalEnumerable.cs
+++ b/mcs/class/System.Web/System.Web.UI/IHierarchicalEnumerable.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
namespace System.Web.UI {
@@ -36,5 +35,4 @@ namespace System.Web.UI {
IHierarchyData GetHierarchyData (object enumeratedItem);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IHierarchyData.cs b/mcs/class/System.Web/System.Web.UI/IHierarchyData.cs
index db012871c61..800e7324684 100644
--- a/mcs/class/System.Web/System.Web.UI/IHierarchyData.cs
+++ b/mcs/class/System.Web/System.Web.UI/IHierarchyData.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI {
public interface IHierarchyData {
IHierarchicalEnumerable GetChildren ();
@@ -37,5 +36,4 @@ namespace System.Web.UI {
string Type { get; }
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/INavigateUIData.cs b/mcs/class/System.Web/System.Web.UI/INavigateUIData.cs
index eb648b6902e..d48d5952084 100644
--- a/mcs/class/System.Web/System.Web.UI/INavigateUIData.cs
+++ b/mcs/class/System.Web/System.Web.UI/INavigateUIData.cs
@@ -28,8 +28,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-namespace System.Web.UI {
+namespace System.Web.UI
+{
public interface INavigateUIData {
string Name { get; }
string NavigateUrl { get; }
@@ -37,5 +37,4 @@ namespace System.Web.UI {
string Description { get; }
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/INonBindingContainer.cs b/mcs/class/System.Web/System.Web.UI/INonBindingContainer.cs
index 215b21f49e8..5f428e58c6a 100644
--- a/mcs/class/System.Web/System.Web.UI/INonBindingContainer.cs
+++ b/mcs/class/System.Web/System.Web.UI/INonBindingContainer.cs
@@ -4,7 +4,7 @@
// Authors:
// Marek Habersack (mhabersack@novell.com)
//
-// (C) 2008 Novell, Inc. (http://www.novell.com)
+// (C) 2008-2010 Novell, Inc. (http://www.novell.com)
//
//
diff --git a/mcs/class/System.Web/System.Web.UI/IResourceUrlGenerator.cs b/mcs/class/System.Web/System.Web.UI/IResourceUrlGenerator.cs
index 1416478a81c..496cc9992b5 100644
--- a/mcs/class/System.Web/System.Web.UI/IResourceUrlGenerator.cs
+++ b/mcs/class/System.Web/System.Web.UI/IResourceUrlGenerator.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -38,5 +36,4 @@ namespace System.Web.UI
string GetResourceUrl (Type type, string resource);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IScriptManager.cs b/mcs/class/System.Web/System.Web.UI/IScriptManager.cs
index 1254d97be4e..842c1ff8806 100644
--- a/mcs/class/System.Web/System.Web.UI/IScriptManager.cs
+++ b/mcs/class/System.Web/System.Web.UI/IScriptManager.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -50,4 +49,3 @@ namespace System.Web.UI
void RegisterClientScriptResourceExternal (Control control, Type type, string resourceName);
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/IStateFormatter.cs b/mcs/class/System.Web/System.Web.UI/IStateFormatter.cs
index bd3a45fae90..10378d34b8e 100644
--- a/mcs/class/System.Web/System.Web.UI/IStateFormatter.cs
+++ b/mcs/class/System.Web/System.Web.UI/IStateFormatter.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -32,12 +32,7 @@ using System;
namespace System.Web.UI
{
-#if NET_2_0
- public
-#else
- internal
-#endif
- interface IStateFormatter
+ public interface IStateFormatter
{
object Deserialize (string serializationState);
string Serialize (object state);
diff --git a/mcs/class/System.Web/System.Web.UI/IStyleSheet.cs b/mcs/class/System.Web/System.Web.UI/IStyleSheet.cs
index b14ee83db9a..dc1256c9595 100644
--- a/mcs/class/System.Web/System.Web.UI/IStyleSheet.cs
+++ b/mcs/class/System.Web/System.Web.UI/IStyleSheet.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,9 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
-
using System.Web.UI.WebControls;
namespace System.Web.UI
@@ -39,5 +36,4 @@ namespace System.Web.UI
void RegisterStyle (Style style, IUrlResolutionService urlResolver);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ITextControl.cs b/mcs/class/System.Web/System.Web.UI/ITextControl.cs
index dfa1bd1f48d..f30591665df 100644
--- a/mcs/class/System.Web/System.Web.UI/ITextControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/ITextControl.cs
@@ -4,7 +4,7 @@
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
//
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -38,5 +36,3 @@ namespace System.Web.UI
string Text { get; set; }
}
}
-#endif
-
diff --git a/mcs/class/System.Web/System.Web.UI/IThemeResolutionService.cs b/mcs/class/System.Web/System.Web.UI/IThemeResolutionService.cs
index 4ee874ee2f0..df19c8c1bb1 100644
--- a/mcs/class/System.Web/System.Web.UI/IThemeResolutionService.cs
+++ b/mcs/class/System.Web/System.Web.UI/IThemeResolutionService.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
using System.Collections;
@@ -41,5 +39,3 @@ namespace System.Web.UI
ThemeProvider GetThemeProvider ();
}
}
-#endif
-
diff --git a/mcs/class/System.Web/System.Web.UI/IUrlResolutionService.cs b/mcs/class/System.Web/System.Web.UI/IUrlResolutionService.cs
index 4ca78a0c541..8b01605206b 100644
--- a/mcs/class/System.Web/System.Web.UI/IUrlResolutionService.cs
+++ b/mcs/class/System.Web/System.Web.UI/IUrlResolutionService.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
using System.Collections;
@@ -39,5 +37,4 @@ namespace System.Web.UI
string ResolveClientUrl (string url);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IUserControlTypeResolutionService.cs b/mcs/class/System.Web/System.Web.UI/IUserControlTypeResolutionService.cs
index ce245b2e3b2..3629bde724b 100644
--- a/mcs/class/System.Web/System.Web.UI/IUserControlTypeResolutionService.cs
+++ b/mcs/class/System.Web/System.Web.UI/IUserControlTypeResolutionService.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// (C) 2004 Novell, Inc (http://www.novell.com)
+// (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,8 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-#if NET_2_0
using System;
using System.Collections;
@@ -39,5 +37,4 @@ namespace System.Web.UI
Type GetType (string prefixTag, string tagName);
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/IndexedString.cs b/mcs/class/System.Web/System.Web.UI/IndexedString.cs
index da40d236cae..84a9c28c382 100644
--- a/mcs/class/System.Web/System.Web.UI/IndexedString.cs
+++ b/mcs/class/System.Web/System.Web.UI/IndexedString.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -50,4 +49,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/KeyedList.cs b/mcs/class/System.Web/System.Web.UI/KeyedList.cs
index ed2e78b9782..81ff557f76d 100644
--- a/mcs/class/System.Web/System.Web.UI/KeyedList.cs
+++ b/mcs/class/System.Web/System.Web.UI/KeyedList.cs
@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Collections;
using System.Collections.Specialized;
@@ -219,5 +217,3 @@ namespace System.Web.UI
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/KeyedListEnumerator.cs b/mcs/class/System.Web/System.Web.UI/KeyedListEnumerator.cs
index 918b2adf75a..db916a2766a 100644
--- a/mcs/class/System.Web/System.Web.UI/KeyedListEnumerator.cs
+++ b/mcs/class/System.Web/System.Web.UI/KeyedListEnumerator.cs
@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Collections;
namespace System.Web.UI
@@ -84,5 +82,3 @@ namespace System.Web.UI
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ListSourceHelper.cs b/mcs/class/System.Web/System.Web.UI/ListSourceHelper.cs
index 2f07651505f..84f3d957433 100644
--- a/mcs/class/System.Web/System.Web.UI/ListSourceHelper.cs
+++ b/mcs/class/System.Web/System.Web.UI/ListSourceHelper.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
using System.Text;
@@ -129,6 +128,3 @@ namespace System.Web.UI {
}
-#endif
-
-
diff --git a/mcs/class/System.Web/System.Web.UI/LiteralControl.cs b/mcs/class/System.Web/System.Web.UI/LiteralControl.cs
index 9a6072ba908..b4274ba661f 100644
--- a/mcs/class/System.Web/System.Web.UI/LiteralControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/LiteralControl.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) Bob Smith
-// Copyright (C) 2002-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2002-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -38,10 +38,7 @@ namespace System.Web.UI {
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
[ToolboxItem(false)]
- public class LiteralControl : Control
-#if NET_2_0
- , ITextControl
-#endif
+ public class LiteralControl : Control, ITextControl
{
string _text;
@@ -61,16 +58,11 @@ namespace System.Web.UI {
public virtual string Text {
get { return _text; }
set {
- _text = (value == null) ? "" : value;
+ _text = (value == null) ? String.Empty : value;
}
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override void Render (HtmlTextWriter writer)
+ protected internal override void Render (HtmlTextWriter writer)
{
writer.Write (_text);
}
diff --git a/mcs/class/System.Web/System.Web.UI/LosFormatter.cs b/mcs/class/System.Web/System.Web.UI/LosFormatter.cs
index d146e18af7b..ef8c41613f1 100644
--- a/mcs/class/System.Web/System.Web.UI/LosFormatter.cs
+++ b/mcs/class/System.Web/System.Web.UI/LosFormatter.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2003 Ben Maurer
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -37,8 +37,8 @@ namespace System.Web.UI {
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public sealed class LosFormatter {
-
+ public sealed class LosFormatter
+ {
ObjectStateFormatter osf;
public LosFormatter ()
@@ -46,19 +46,12 @@ namespace System.Web.UI {
osf = new ObjectStateFormatter ();
}
-#if NET_1_1
- public LosFormatter (bool enableMac, string macKeyModifier)
- : this (enableMac, Convert.FromBase64String (macKeyModifier))
+ public LosFormatter (bool enableMac, string macKeyModifier) : this (enableMac, Convert.FromBase64String (macKeyModifier))
{
}
-#endif
+
[MonoTODO]
-#if NET_2_0
- public
-#else
- internal
-#endif
- LosFormatter (bool enableMac, byte[] macKeyModifier)
+ public LosFormatter (bool enableMac, byte[] macKeyModifier)
{
if (enableMac)
osf = new ObjectStateFormatter (macKeyModifier);
diff --git a/mcs/class/System.Web/System.Web.UI/MasterPage.cs b/mcs/class/System.Web/System.Web.UI/MasterPage.cs
index 6f574cef5df..14c3dfdc09d 100644
--- a/mcs/class/System.Web/System.Web.UI/MasterPage.cs
+++ b/mcs/class/System.Web/System.Web.UI/MasterPage.cs
@@ -4,7 +4,7 @@
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
//
-// (C) 2005 Novell, Inc.
+// (C) 2005-2010 Novell, Inc.
//
//
@@ -28,8 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -153,5 +151,3 @@ namespace System.Web.UI
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/MasterPageControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/MasterPageControlBuilder.cs
index 615b04d0fd0..d9f4bb4fee8 100644
--- a/mcs/class/System.Web/System.Web.UI/MasterPageControlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/MasterPageControlBuilder.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2006 Novell, Inc (http://www.novell.com)
+// (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,13 +26,10 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
public class MasterPageControlBuilder : UserControlControlBuilder
{
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/MasterPageParser.cs b/mcs/class/System.Web/System.Web.UI/MasterPageParser.cs
index b4deee56752..fc986d25f1a 100644
--- a/mcs/class/System.Web/System.Web.UI/MasterPageParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/MasterPageParser.cs
@@ -4,7 +4,7 @@
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
//
-// (C) 2005 Novell, Inc.
+// (C) 2005-2010 Novell, Inc.
//
//
@@ -28,8 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -148,5 +146,3 @@ namespace System.Web.UI
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/MinimizableAttributeTypeConverter.cs b/mcs/class/System.Web/System.Web.UI/MinimizableAttributeTypeConverter.cs
index fb09a94a160..cf81715ff7e 100644
--- a/mcs/class/System.Web/System.Web.UI/MinimizableAttributeTypeConverter.cs
+++ b/mcs/class/System.Web/System.Web.UI/MinimizableAttributeTypeConverter.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2005 Novell, Inc.
+// (C) 2005-2010 Novell, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -30,10 +30,10 @@ using System;
using System.Globalization;
using System.ComponentModel;
-#if NET_2_0
-namespace System.Web.UI {
- internal class MinimizableAttributeTypeConverter : TypeConverter {
-
+namespace System.Web.UI
+{
+ internal class MinimizableAttributeTypeConverter : TypeConverter
+ {
public MinimizableAttributeTypeConverter ()
{
}
@@ -60,7 +60,7 @@ namespace System.Web.UI {
public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object value)
{
// culture?
- if (value != null) {
+ if (value != null) {
Type t = value.GetType ();
if (t == typeof (string))
return ((string)value) != String.Empty;
@@ -74,4 +74,3 @@ namespace System.Web.UI {
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/NonVisualControlAttribute.cs b/mcs/class/System.Web/System.Web.UI/NonVisualControlAttribute.cs
index ffc2a8491c9..e5950e69cf9 100644
--- a/mcs/class/System.Web/System.Web.UI/NonVisualControlAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/NonVisualControlAttribute.cs
@@ -4,7 +4,7 @@
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
//
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -28,8 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System;
namespace System.Web.UI
@@ -72,5 +70,3 @@ namespace System.Web.UI
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ObjectPersistData.cs b/mcs/class/System.Web/System.Web.UI/ObjectPersistData.cs
index c332eb16e6c..f353ed77bc5 100644
--- a/mcs/class/System.Web/System.Web.UI/ObjectPersistData.cs
+++ b/mcs/class/System.Web/System.Web.UI/ObjectPersistData.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.Web.UI;
@@ -61,4 +60,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs b/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs
index dad5412b1c6..1464636916f 100644
--- a/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs
+++ b/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs
@@ -47,13 +47,9 @@ using System.Diagnostics;
using System.Security.Cryptography;
using System.Web.Configuration;
-namespace System.Web.UI {
-#if NET_2_0
- public
-#else
- internal
-#endif
- sealed class ObjectStateFormatter : IFormatter, IStateFormatter
+namespace System.Web.UI
+{
+ public sealed class ObjectStateFormatter : IFormatter, IStateFormatter
{
Page page;
HashAlgorithm algo;
@@ -79,16 +75,8 @@ namespace System.Web.UI {
if (vkey == null)
return false;
return true;
- } else {
-
-#if NET_2_0
+ } else
return page.EnableViewStateMac;
-#elif NET_1_1
- return page.EnableViewStateMacInternal;
-#else
- return false;
-#endif
- }
}
}
@@ -101,13 +89,8 @@ namespace System.Web.UI {
byte [] algoKey;
if (page != null) {
-#if NET_2_0
MachineKeySection mconfig = (MachineKeySection) WebConfigurationManager.GetWebApplicationSection ("system.web/machineKey");
algoKey = MachineKeySectionUtils.ValidationKeyBytes (mconfig);
-#else
- MachineKeyConfig mconfig = HttpContext.GetAppConfig ("system.web/machineKey") as MachineKeyConfig;
- algoKey = mconfig.ValidationKey;
-#endif
} else
algoKey = vkey;
@@ -146,48 +129,36 @@ namespace System.Web.UI {
{
if (inputString == null)
throw new ArgumentNullException ("inputString");
-#if NET_2_0
if (inputString.Length == 0)
throw new ArgumentNullException ("inputString");
-#else
- if (inputString == "")
- return "";
-#endif
+
byte [] buffer = Convert.FromBase64String (inputString);
int length;
if (buffer == null || (length = buffer.Length) == 0)
throw new ArgumentNullException ("inputString");
if (page != null && EnableMac)
length = ValidateInput (GetAlgo (), buffer, 0, length);
-#if NET_2_0
+
bool isEncrypted = ((int)buffer [--length] == 1)? true : false;
-#endif
Stream ms = new MemoryStream (buffer, 0, length, false, false);
-#if NET_2_0
if (isEncrypted)
ms = new CryptoStream (ms, page.GetCryptoTransform (CryptoStreamMode.Read), CryptoStreamMode.Read);
-#endif
return Deserialize (ms);
}
public string Serialize (object stateGraph)
{
if (stateGraph == null)
- return "";
+ return String.Empty;
MemoryStream ms = new MemoryStream ();
Stream output = ms;
-#if NET_2_0
bool needEncryption = page == null ? false : page.NeedViewStateEncryption;
if (needEncryption){
output = new CryptoStream (output, page.GetCryptoTransform (CryptoStreamMode.Write), CryptoStreamMode.Write);
}
-#endif
Serialize (output, stateGraph);
-#if NET_2_0
- ms.WriteByte((byte)(needEncryption? 1 : 0));
-#endif
-
+ ms.WriteByte((byte)(needEncryption? 1 : 0));
#if TRACE
ms.WriteTo (File.OpenWrite (Path.GetTempFileName ()));
#endif
diff --git a/mcs/class/System.Web/System.Web.UI/OutputCacheLocation.cs b/mcs/class/System.Web/System.Web.UI/OutputCacheLocation.cs
index 39264e44147..6d5f9fe4e8f 100644
--- a/mcs/class/System.Web/System.Web.UI/OutputCacheLocation.cs
+++ b/mcs/class/System.Web/System.Web.UI/OutputCacheLocation.cs
@@ -33,15 +33,13 @@ using System.Web;
namespace System.Web.UI
{
- public enum OutputCacheLocation
- {
- Any,
- Client,
- Downstream,
- Server,
- None,
-#if NET_1_1
+ public enum OutputCacheLocation
+ {
+ Any,
+ Client,
+ Downstream,
+ Server,
+ None,
ServerAndClient
-#endif
- }
+ }
}
diff --git a/mcs/class/System.Web/System.Web.UI/OutputCacheParameters.cs b/mcs/class/System.Web/System.Web.UI/OutputCacheParameters.cs
index 48cdbfcfc01..c9174f5b1ac 100644
--- a/mcs/class/System.Web/System.Web.UI/OutputCacheParameters.cs
+++ b/mcs/class/System.Web/System.Web.UI/OutputCacheParameters.cs
@@ -23,8 +23,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.ComponentModel;
using System.Security.Permissions;
@@ -123,5 +121,3 @@ namespace System.Web.UI
#endregion
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs
index 2148abd64db..151978fe2dc 100644
--- a/mcs/class/System.Web/System.Web.UI/Page.cs
+++ b/mcs/class/System.Web/System.Web.UI/Page.cs
@@ -8,7 +8,7 @@
// Marek Habersack (mhabersack@novell.com)
//
// (C) 2002,2003 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2003-2008 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2003-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -32,6 +32,7 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design;
@@ -45,43 +46,32 @@ using System.Text;
using System.Threading;
using System.Web;
using System.Web.Caching;
+using System.Web.Compilation;
using System.Web.Configuration;
using System.Web.SessionState;
using System.Web.Util;
+using System.Web.UI.Adapters;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Reflection;
-#if NET_2_0
-using System.Web.Compilation;
-using System.Web.UI.Adapters;
-using System.Collections.Generic;
-#endif
namespace System.Web.UI
{
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if !NET_2_0
-[RootDesignerSerializer ("Microsoft.VSDesigner.WebForms.RootCodeDomSerializer, " + Consts.AssemblyMicrosoft_VSDesigner, "System.ComponentModel.Design.Serialization.CodeDomSerializer, " + Consts.AssemblySystem_Design, true)]
-#endif
[DefaultEvent ("Load"), DesignerCategory ("ASPXCodeBehind")]
[ToolboxItem (false)]
-#if NET_2_0
[Designer ("Microsoft.VisualStudio.Web.WebForms.WebFormDesigner, " + Consts.AssemblyMicrosoft_VisualStudio_Web, typeof (IRootDesigner))]
-#else
-[Designer ("Microsoft.VSDesigner.WebForms.WebFormDesigner, " + Consts.AssemblyMicrosoft_VSDesigner, typeof (IRootDesigner))]
-#endif
+
public partial class Page : TemplateControl, IHttpHandler
{
-#if NET_2_0
static string machineKeyConfigPath = "system.web/machineKey";
bool _eventValidation = true;
object [] _savedControlState;
bool _doLoadPreviousPage;
string _focusedControlID;
bool _hasEnabledControlArray;
-#endif
bool _viewState;
bool _viewStateMac;
string _errorPage;
@@ -123,28 +113,14 @@ public partial class Page : TemplateControl, IHttpHandler
HttpSessionState _session;
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
- public
-#else
- protected
-#endif
- const string postEventArgumentID = "__EVENTARGUMENT";
+ public const string postEventArgumentID = "__EVENTARGUMENT";
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
- public
-#else
- protected
-#endif
- const string postEventSourceID = "__EVENTTARGET";
+ public const string postEventSourceID = "__EVENTTARGET";
-#if NET_2_0
const string ScrollPositionXID = "__SCROLLPOSITIONX";
const string ScrollPositionYID = "__SCROLLPOSITIONY";
const string EnabledControlArrayID = "__enabledControlArray";
-#endif
-
-#if NET_2_0
internal const string LastFocusID = "__LASTFOCUS";
internal const string CallbackArgumentID = "__CALLBACKARGUMENT";
internal const string CallbackSourceID = "__CALLBACKTARGET";
@@ -179,7 +155,6 @@ public partial class Page : TemplateControl, IHttpHandler
ViewStateEncryptionMode viewStateEncryptionMode;
bool controlRegisteredForViewStateEncryption = false;
-#endif
#region Constructors
public Page ()
@@ -187,8 +162,6 @@ public partial class Page : TemplateControl, IHttpHandler
scriptManager = new ClientScriptManager (this);
Page = this;
ID = "__Page";
-
-#if NET_2_0
PagesSection ps = WebConfigurationManager.GetSection ("system.web/pages") as PagesSection;
if (ps != null) {
asyncTimeout = ps.AsyncTimeout;
@@ -199,7 +172,6 @@ public partial class Page : TemplateControl, IHttpHandler
viewStateEncryptionMode = ViewStateEncryptionMode.Auto;
_viewState = true;
}
-#endif
}
#endregion
@@ -214,25 +186,17 @@ public partial class Page : TemplateControl, IHttpHandler
[EditorBrowsable (EditorBrowsableState.Never)]
protected bool AspCompatMode {
-#if NET_2_0
get { return false; }
-#endif
set { throw new NotImplementedException (); }
}
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
public bool Buffer {
get { return Response.BufferOutput; }
set { Response.BufferOutput = value; }
}
-#else
- protected bool Buffer {
- set { Response.BufferOutput = value; }
- }
-#endif
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
@@ -244,9 +208,7 @@ public partial class Page : TemplateControl, IHttpHandler
}
}
-#if NET_2_0
[EditorBrowsableAttribute (EditorBrowsableState.Advanced)]
-#endif
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false), DefaultValue ("")]
[WebSysDescription ("Value do override the automatic browser detection and force the page to use the specified browser.")]
@@ -260,39 +222,22 @@ public partial class Page : TemplateControl, IHttpHandler
}
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
public int CodePage {
get { return Response.ContentEncoding.CodePage; }
set { Response.ContentEncoding = Encoding.GetEncoding (value); }
}
-#else
- protected int CodePage {
- set { Response.ContentEncoding = Encoding.GetEncoding (value); }
- }
-#endif
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
public string ContentType {
get { return Response.ContentType; }
set { Response.ContentType = value; }
}
-#else
- protected string ContentType {
- set { Response.ContentType = value; }
- }
-#endif
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override HttpContext Context {
+ protected internal override HttpContext Context {
get {
if (_context == null)
return HttpContext.Current;
@@ -301,7 +246,6 @@ public partial class Page : TemplateControl, IHttpHandler
}
}
-#if NET_2_0
[EditorBrowsable (EditorBrowsableState.Advanced)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
@@ -309,14 +253,7 @@ public partial class Page : TemplateControl, IHttpHandler
get { return Thread.CurrentThread.CurrentCulture.Name; }
set { Thread.CurrentThread.CurrentCulture = GetPageCulture (value, Thread.CurrentThread.CurrentCulture); }
}
-#else
- [EditorBrowsable (EditorBrowsableState.Never)]
- protected string Culture {
- set { Thread.CurrentThread.CurrentCulture = new CultureInfo (value); }
- }
-#endif
-#if NET_2_0
public virtual bool EnableEventValidation {
get { return _eventValidation; }
set {
@@ -325,7 +262,6 @@ public partial class Page : TemplateControl, IHttpHandler
_eventValidation = value;
}
}
-#endif
[Browsable (false)]
public override bool EnableViewState {
@@ -333,27 +269,18 @@ public partial class Page : TemplateControl, IHttpHandler
set { _viewState = value; }
}
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
-#endif
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
- public
-#else
- protected
-#endif
- bool EnableViewStateMac {
+ public bool EnableViewStateMac {
get { return _viewStateMac; }
set { _viewStateMac = value; }
}
-#if NET_1_1
internal bool EnableViewStateMacInternal {
get { return _viewStateMac; }
set { _viewStateMac = value; }
}
-#endif
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false), DefaultValue ("")]
@@ -369,9 +296,7 @@ public partial class Page : TemplateControl, IHttpHandler
}
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Never)]
protected ArrayList FileDependencies {
set {
@@ -381,9 +306,7 @@ public partial class Page : TemplateControl, IHttpHandler
}
[Browsable (false)]
-#if NET_2_0
[EditorBrowsable (EditorBrowsableState.Never)]
-#endif
public override string ID {
get { return base.ID; }
set { base.ID = value; }
@@ -392,13 +315,7 @@ public partial class Page : TemplateControl, IHttpHandler
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
public bool IsPostBack {
- get {
-#if NET_2_0
- return isPostBack;
-#else
- return _requestValueCollection != null;
-#endif
- }
+ get { return isPostBack; }
}
[EditorBrowsable (EditorBrowsableState.Never), Browsable (false)]
@@ -413,17 +330,13 @@ public partial class Page : TemplateControl, IHttpHandler
if (!is_validated)
throw new HttpException (Locale.GetText ("Page.IsValid cannot be called before validation has taken place. It should be queried in the event handler for a control that has CausesValidation=True and initiated the postback, or after a call to Page.Validate."));
-#if NET_2_0
foreach (IValidator val in Validators)
if (!val.IsValid)
return false;
return true;
-#else
- return ValidateCollection (_validators);
-#endif
}
}
-#if NET_2_0
+
public IDictionary Items {
get {
if (items == null)
@@ -431,32 +344,22 @@ public partial class Page : TemplateControl, IHttpHandler
return items;
}
}
-#endif
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
public int LCID {
get { return Thread.CurrentThread.CurrentCulture.LCID; }
set { Thread.CurrentThread.CurrentCulture = new CultureInfo (value); }
}
-#else
- protected int LCID {
- set { Thread.CurrentThread.CurrentCulture = new CultureInfo (value); }
- }
-#endif
-#if NET_2_0
[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public bool MaintainScrollPositionOnPostBack {
get { return _maintainScrollPositionOnPostBack; }
set { _maintainScrollPositionOnPostBack = value; }
}
-#endif
-#if NET_2_0
public PageAdapter PageAdapter {
get {
return Adapter as PageAdapter;
@@ -514,9 +417,6 @@ public partial class Page : TemplateControl, IHttpHandler
internal IScriptManager ScriptManager {
get { return (IScriptManager) Items [typeof (IScriptManager)]; }
}
-
-#endif
-
#if !TARGET_J2EE
internal string theForm {
get {
@@ -550,18 +450,12 @@ public partial class Page : TemplateControl, IHttpHandler
}
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
public string ResponseEncoding {
get { return Response.ContentEncoding.WebName; }
set { Response.ContentEncoding = Encoding.GetEncoding (value); }
}
-#else
- protected string ResponseEncoding {
- set { Response.ContentEncoding = Encoding.GetEncoding (value); }
- }
-#endif
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
@@ -591,17 +485,14 @@ public partial class Page : TemplateControl, IHttpHandler
}
}
-#if NET_2_0
[FilterableAttribute (false)]
[Obsolete]
-#endif
[Browsable (false)]
public bool SmartNavigation {
get { return _smartNavigation; }
set { _smartNavigation = value; }
}
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Filterable (false)]
[Browsable (false)]
@@ -657,9 +548,6 @@ public partial class Page : TemplateControl, IHttpHandler
#endif
}
-#endif
-
-#if NET_2_0
[Localizable (true)]
[Bindable (true)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
@@ -680,7 +568,6 @@ public partial class Page : TemplateControl, IHttpHandler
_title = value;
}
}
-#endif
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
@@ -689,53 +576,27 @@ public partial class Page : TemplateControl, IHttpHandler
}
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
public bool TraceEnabled {
get { return Trace.IsEnabled; }
set { Trace.IsEnabled = value; }
}
-#else
- protected bool TraceEnabled {
- set { Trace.IsEnabled = value; }
- }
-#endif
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
public TraceMode TraceModeValue {
get { return Trace.TraceMode; }
set { Trace.TraceMode = value; }
}
-#else
- protected TraceMode TraceModeValue {
- set { Trace.TraceMode = value; }
- }
-#endif
[EditorBrowsable (EditorBrowsableState.Never)]
protected int TransactionMode {
-#if NET_2_0
get { return _transactionMode; }
-#endif
set { _transactionMode = value; }
}
-#if !NET_2_0
- //
- // This method is here just to remove the warning about "_transactionMode" not being
- // used. We probably will use it internally at some point.
- //
- internal int GetTransactionMode ()
- {
- return _transactionMode;
- }
-#endif
-
-#if NET_2_0
[EditorBrowsable (EditorBrowsableState.Advanced)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[BrowsableAttribute (false)]
@@ -743,12 +604,6 @@ public partial class Page : TemplateControl, IHttpHandler
get { return Thread.CurrentThread.CurrentUICulture.Name; }
set { Thread.CurrentThread.CurrentUICulture = GetPageCulture (value, Thread.CurrentThread.CurrentUICulture); }
}
-#else
- [EditorBrowsable (EditorBrowsableState.Never)]
- protected string UICulture {
- set { Thread.CurrentThread.CurrentUICulture = new CultureInfo (value); }
- }
-#endif
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
@@ -783,7 +638,6 @@ public partial class Page : TemplateControl, IHttpHandler
#region Methods
-#if NET_2_0
CultureInfo GetPageCulture (string culture, CultureInfo deflt)
{
if (culture == null)
@@ -808,7 +662,6 @@ public partial class Page : TemplateControl, IHttpHandler
return ret;
}
-#endif
[EditorBrowsable (EditorBrowsableState.Never)]
protected IAsyncResult AspCompatBeginProcessRequest (HttpContext context,
@@ -827,11 +680,9 @@ public partial class Page : TemplateControl, IHttpHandler
[EditorBrowsable (EditorBrowsableState.Advanced)]
protected virtual HtmlTextWriter CreateHtmlTextWriter (TextWriter tw)
{
-#if NET_2_0
if (Request.BrowserMightHaveSpecialWriter)
return Request.Browser.CreateHtmlTextWriter(tw);
else
-#endif
return new HtmlTextWriter (tw);
}
@@ -842,11 +693,7 @@ public partial class Page : TemplateControl, IHttpHandler
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
- protected
-#if NET_2_0
- internal
-#endif
- virtual NameValueCollection DeterminePostBackMode ()
+ protected internal virtual NameValueCollection DeterminePostBackMode ()
{
// if request was transfered from other page such Transfer
if (_context.IsProcessingInclude)
@@ -894,14 +741,12 @@ public partial class Page : TemplateControl, IHttpHandler
return coll;
}
-#if NET_2_0
public override Control FindControl (string id) {
if (id == ID)
return this;
else
return base.FindControl (id);
}
-#endif
Control FindControl (string id, bool decode) {
#if TARGET_J2EE
@@ -911,36 +756,28 @@ public partial class Page : TemplateControl, IHttpHandler
return FindControl (id);
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Advanced)]
public string GetPostBackClientEvent (Control control, string argument)
{
return scriptManager.GetPostBackEventReference (control, argument);
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Advanced)]
public string GetPostBackClientHyperlink (Control control, string argument)
{
return scriptManager.GetPostBackClientHyperlink (control, argument);
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Advanced)]
public string GetPostBackEventReference (Control control)
{
return scriptManager.GetPostBackEventReference (control, "");
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Advanced)]
public string GetPostBackEventReference (Control control, string argument)
{
@@ -954,12 +791,10 @@ public partial class Page : TemplateControl, IHttpHandler
internal void RequiresPostBackScript ()
{
-#if NET_2_0
if (requiresPostBackScript)
return;
ClientScript.RegisterHiddenField (postEventSourceID, String.Empty);
ClientScript.RegisterHiddenField (postEventArgumentID, String.Empty);
-#endif
requiresPostBackScript = true;
RequiresFormScriptDeclaration ();
}
@@ -970,7 +805,6 @@ public partial class Page : TemplateControl, IHttpHandler
return 0;
}
-#if NET_2_0
[MonoTODO("The following properties of OutputCacheParameters are silently ignored: CacheProfile, SqlDependency")]
protected internal virtual void InitOutputCache(OutputCacheParameters cacheSettings)
{
@@ -988,18 +822,13 @@ public partial class Page : TemplateControl, IHttpHandler
cache.SetNoStore ();
}
}
-#endif
-
-#if NET_2_0
[MonoTODO ("varyByContentEncoding is not currently used")]
- protected virtual
-#endif
- void InitOutputCache(int duration,
- string varyByContentEncoding,
- string varyByHeader,
- string varyByCustom,
- OutputCacheLocation location,
- string varyByParam)
+ protected virtual void InitOutputCache(int duration,
+ string varyByContentEncoding,
+ string varyByHeader,
+ string varyByCustom,
+ OutputCacheLocation location,
+ string varyByParam)
{
HttpResponse response = Response;
HttpCachePolicy cache = response.Cache;
@@ -1050,7 +879,7 @@ public partial class Page : TemplateControl, IHttpHandler
foreach (string h in hdrs)
cache.VaryByHeaders [h.Trim ()] = true;
}
-#if NET_2_0
+
if (PageAdapter != null) {
if (PageAdapter.CacheVaryByParams != null) {
foreach (string p in PageAdapter.CacheVaryByParams)
@@ -1061,7 +890,6 @@ public partial class Page : TemplateControl, IHttpHandler
cache.VaryByHeaders [h] = true;
}
}
-#endif
}
response.IsCached = true;
@@ -1080,21 +908,13 @@ public partial class Page : TemplateControl, IHttpHandler
InitOutputCache (duration, null, varyByHeader, varyByCustom, location, varyByParam);
}
-#if NET_2_0
[Obsolete]
-#else
- [EditorBrowsable (EditorBrowsableState.Advanced)]
-#endif
public bool IsClientScriptBlockRegistered (string key)
{
return scriptManager.IsClientScriptBlockRegistered (key);
}
-#if NET_2_0
[Obsolete]
-#else
- [EditorBrowsable (EditorBrowsableState.Advanced)]
-#endif
public bool IsStartupScriptRegistered (string key)
{
return scriptManager.IsStartupScriptRegistered (key);
@@ -1105,7 +925,6 @@ public partial class Page : TemplateControl, IHttpHandler
return Request.MapPath (virtualPath);
}
-#if NET_2_0
protected internal override void Render (HtmlTextWriter writer)
{
if (MaintainScrollPositionOnPostBack) {
@@ -1143,29 +962,15 @@ public partial class Page : TemplateControl, IHttpHandler
#endif
base.Render (writer);
}
-#endif
void RenderPostBackScript (HtmlTextWriter writer, string formUniqueID)
{
-#if ONLY_1_1
- writer.WriteLine ("<input type=\"hidden\" name=\"{0}\" value=\"\" />", postEventSourceID);
- writer.WriteLine ("<input type=\"hidden\" name=\"{0}\" value=\"\" />", postEventArgumentID);
-#endif
writer.WriteLine ();
-
ClientScriptManager.WriteBeginScriptBlock (writer);
-
-#if NET_1_1
RenderClientScriptFormDeclaration (writer, formUniqueID);
-#endif
-#if NET_2_0
writer.WriteLine (WebFormScriptReference + "._form = " + theForm + ";");
writer.WriteLine (WebFormScriptReference + ".__doPostBack = function (eventTarget, eventArgument) {");
writer.WriteLine ("\tif(" + theForm + ".onsubmit && " + theForm + ".onsubmit() == false) return;");
-#else
- writer.WriteLine ("__doPostBack = function (eventTarget, eventArgument) {");
- writer.WriteLine ("\tif(document.ValidatorOnSubmit && !ValidatorOnSubmit()) return;");
-#endif
writer.WriteLine ("\t" + theForm + "." + postEventSourceID + ".value = eventTarget;");
writer.WriteLine ("\t" + theForm + "." + postEventArgumentID + ".value = eventArgument;");
writer.WriteLine ("\t" + theForm + ".submit();");
@@ -1178,12 +983,9 @@ public partial class Page : TemplateControl, IHttpHandler
if (formScriptDeclarationRendered)
return;
-#if NET_2_0
if (PageAdapter != null) {
writer.WriteLine ("\tvar {0} = {1};\n", theForm, PageAdapter.GetPostBackFormReference(formUniqueID));
- } else
-#endif
- {
+ } else {
writer.WriteLine ("\tvar {0};\n\tif (document.getElementById) {{ {0} = document.getElementById ('{1}'); }}", theForm, formUniqueID);
writer.WriteLine ("\telse {{ {0} = document.{1}; }}", theForm, formUniqueID);
}
@@ -1205,13 +1007,11 @@ public partial class Page : TemplateControl, IHttpHandler
renderingForm = true;
writer.WriteLine ();
-#if NET_2_0
if (requiresFormScriptDeclaration || (scriptManager != null && scriptManager.ScriptsPresent) || PageAdapter != null) {
ClientScriptManager.WriteBeginScriptBlock (writer);
RenderClientScriptFormDeclaration (writer, formUniqueID);
ClientScriptManager.WriteEndScriptBlock (writer);
}
-#endif
if (handleViewState)
#if TARGET_J2EE
@@ -1233,9 +1033,8 @@ public partial class Page : TemplateControl, IHttpHandler
RenderPostBackScript (writer, formUniqueID);
postBackScriptRendered = true;
}
-#if NET_2_0
+
scriptManager.WriteWebFormClientScript (writer);
-#endif
scriptManager.WriteClientScriptBlocks (writer);
}
@@ -1251,17 +1050,12 @@ public partial class Page : TemplateControl, IHttpHandler
internal void OnFormPostRender (HtmlTextWriter writer, string formUniqueID)
{
-#if NET_2_0
scriptManager.SaveEventValidationState ();
scriptManager.WriteExpandoAttributes (writer);
-#endif
scriptManager.WriteHiddenFields (writer);
if (!postBackScriptRendered && requiresPostBackScript)
RenderPostBackScript (writer, formUniqueID);
-#if NET_2_0
scriptManager.WriteWebFormClientScript (writer);
-#endif
-
scriptManager.WriteArrayDeclares (writer);
scriptManager.WriteStartupScriptBlocks (writer);
renderingForm = false;
@@ -1339,11 +1133,7 @@ public partial class Page : TemplateControl, IHttpHandler
}
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
public virtual void ProcessRequest (HttpContext context)
-#else
- public void ProcessRequest (HttpContext context)
-#endif
{
SetContext (context);
#if TARGET_J2EE
@@ -1425,7 +1215,6 @@ public partial class Page : TemplateControl, IHttpHandler
_appUICulture = null;
}
-#if NET_2_0
delegate void ProcessRequestDelegate (HttpContext context);
sealed class DummyAsyncResult : IAsyncResult
@@ -1484,20 +1273,14 @@ public partial class Page : TemplateControl, IHttpHandler
protected void AsyncPageEndProcessRequest (IAsyncResult result)
{
}
-#endif
void InternalProcessRequest ()
{
-#if NET_2_0
- if (PageAdapter != null) {
+ if (PageAdapter != null)
_requestValueCollection = PageAdapter.DeterminePostBackMode();
- } else
-#endif
- {
+ else
_requestValueCollection = this.DeterminePostBackMode();
- }
-#if NET_2_0
// http://msdn2.microsoft.com/en-us/library/ms178141.aspx
if (_requestValueCollection != null) {
if (!isCrossPagePostBack && _requestValueCollection [PreviousPageID] != null && _requestValueCollection [PreviousPageID] != Request.FilePath) {
@@ -1525,16 +1308,13 @@ public partial class Page : TemplateControl, IHttpHandler
InitializeTheme ();
ApplyMasterPage ();
-#endif
Trace.Write ("aspx.page", "Begin Init");
InitRecursive (null);
Trace.Write ("aspx.page", "End Init");
-#if NET_2_0
Trace.Write ("aspx.page", "Begin InitComplete");
OnInitComplete (EventArgs.Empty);
Trace.Write ("aspx.page", "End InitComplete");
-#endif
renderingForm = false;
@@ -1560,14 +1340,10 @@ public partial class Page : TemplateControl, IHttpHandler
void RestorePageState ()
{
-#if NET_2_0
if (IsPostBack || IsCallback) {
if (_requestValueCollection != null)
scriptManager.RestoreEventValidationState (
_requestValueCollection [ClientScriptManager.EventStateFieldName]);
-#else
- if (IsPostBack) {
-#endif
Trace.Write ("aspx.page", "Begin LoadViewState");
LoadPageViewState ();
Trace.Write ("aspx.page", "End LoadViewState");
@@ -1576,24 +1352,14 @@ public partial class Page : TemplateControl, IHttpHandler
void ProcessPostData ()
{
-
-#if NET_2_0
if (IsPostBack || IsCallback) {
-#else
- if (IsPostBack) {
-#endif
Trace.Write ("aspx.page", "Begin ProcessPostData");
ProcessPostData (_requestValueCollection, false);
Trace.Write ("aspx.page", "End ProcessPostData");
}
ProcessLoad ();
-
-#if NET_2_0
if (IsPostBack || IsCallback) {
-#else
- if (IsPostBack) {
-#endif
Trace.Write ("aspx.page", "Begin ProcessPostData Second Try");
ProcessPostData (secondPostData, true);
Trace.Write ("aspx.page", "End ProcessPostData Second Try");
@@ -1602,11 +1368,9 @@ public partial class Page : TemplateControl, IHttpHandler
void ProcessLoad ()
{
-#if NET_2_0
Trace.Write ("aspx.page", "Begin PreLoad");
OnPreLoad (EventArgs.Empty);
Trace.Write ("aspx.page", "End PreLoad");
-#endif
Trace.Write ("aspx.page", "Begin Load");
LoadRecursive ();
@@ -1615,12 +1379,7 @@ public partial class Page : TemplateControl, IHttpHandler
void ProcessRaiseEvents ()
{
-
-#if NET_2_0
if (IsPostBack || IsCallback) {
-#else
- if (IsPostBack) {
-#endif
Trace.Write ("aspx.page", "Begin Raise ChangedEvents");
RaiseChangedEvents ();
Trace.Write ("aspx.page", "End Raise ChangedEvents");
@@ -1632,8 +1391,6 @@ public partial class Page : TemplateControl, IHttpHandler
bool ProcessLoadComplete ()
{
-
-#if NET_2_0
Trace.Write ("aspx.page", "Begin LoadComplete");
OnLoadComplete (EventArgs.Empty);
Trace.Write ("aspx.page", "End LoadComplete");
@@ -1655,37 +1412,30 @@ public partial class Page : TemplateControl, IHttpHandler
callbackOutput.Flush ();
return true;
}
-#endif
Trace.Write ("aspx.page", "Begin PreRender");
PreRenderRecursiveInternal ();
Trace.Write ("aspx.page", "End PreRender");
-#if NET_2_0
ExecuteRegisteredAsyncTasks ();
Trace.Write ("aspx.page", "Begin PreRenderComplete");
OnPreRenderComplete (EventArgs.Empty);
Trace.Write ("aspx.page", "End PreRenderComplete");
-#endif
Trace.Write ("aspx.page", "Begin SaveViewState");
SavePageViewState ();
Trace.Write ("aspx.page", "End SaveViewState");
-#if NET_2_0
Trace.Write ("aspx.page", "Begin SaveStateComplete");
OnSaveStateComplete (EventArgs.Empty);
Trace.Write ("aspx.page", "End SaveStateComplete");
-#endif // NET_2_0
return false;
}
internal void RenderPage ()
{
-#if NET_2_0
scriptManager.ResetEventValidationState ();
-#endif
//--
Trace.Write ("aspx.page", "Begin Render");
@@ -1724,9 +1474,7 @@ public partial class Page : TemplateControl, IHttpHandler
void RaisePostBackEvents ()
{
-#if NET_2_0
Control targetControl;
-#endif
if (requiresRaiseEvent != null) {
RaisePostBackEvent (requiresRaiseEvent, null);
return;
@@ -1750,12 +1498,8 @@ public partial class Page : TemplateControl, IHttpHandler
return;
}
-#if NET_2_0
targetControl = FindControl (eventTarget, true);
IPostBackEventHandler target = targetControl as IPostBackEventHandler;
-#else
- IPostBackEventHandler target = FindControl (eventTarget) as IPostBackEventHandler;
-#endif
if (target == null)
return;
@@ -1781,27 +1525,21 @@ public partial class Page : TemplateControl, IHttpHandler
sourceControl.RaisePostBackEvent (eventArgument);
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Advanced)]
public void RegisterArrayDeclaration (string arrayName, string arrayValue)
{
scriptManager.RegisterArrayDeclaration (arrayName, arrayValue);
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Advanced)]
public virtual void RegisterClientScriptBlock (string key, string script)
{
scriptManager.RegisterClientScriptBlock (key, script);
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Advanced)]
public virtual void RegisterHiddenField (string hiddenFieldName, string hiddenFieldInitialValue)
{
@@ -1814,9 +1552,7 @@ public partial class Page : TemplateControl, IHttpHandler
throw new NotImplementedException ();
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Advanced)]
public void RegisterOnSubmitStatement (string key, string script)
{
@@ -1831,10 +1567,8 @@ public partial class Page : TemplateControl, IHttpHandler
[EditorBrowsable (EditorBrowsableState.Advanced)]
public void RegisterRequiresPostBack (Control control)
{
-#if NET_2_0
if (!(control is IPostBackDataHandler))
throw new HttpException ("The control to register does not implement the IPostBackDataHandler interface.");
-#endif
if (_requiresPostBack == null)
_requiresPostBack = new ArrayList ();
@@ -1851,9 +1585,7 @@ public partial class Page : TemplateControl, IHttpHandler
requiresRaiseEvent = control;
}
-#if NET_2_0
[Obsolete]
-#endif
[EditorBrowsable (EditorBrowsableState.Advanced)]
public virtual void RegisterStartupScript (string key, string script)
{
@@ -1896,17 +1628,11 @@ public partial class Page : TemplateControl, IHttpHandler
set { _savedViewState = value; }
}
-#if NET_2_0
- protected virtual
-#else
- internal
-#endif
- PageStatePersister PageStatePersister {
+
+ protected virtual PageStatePersister PageStatePersister {
get {
-#if NET_2_0
if (page_state_persister == null && PageAdapter != null)
page_state_persister = PageAdapter.GetStatePersister();
-#endif
if (page_state_persister == null)
page_state_persister = new HiddenFieldPageStatePersister (this);
return page_state_persister;
@@ -1927,14 +1653,9 @@ public partial class Page : TemplateControl, IHttpHandler
{
Pair sState = LoadPageStateFromPersistenceMedium () as Pair;
if (sState != null) {
- if (allow_load
-#if NET_2_0
- || isCrossPagePostBack
-#endif
- ) {
-#if NET_2_0
+ if (allow_load || isCrossPagePostBack) {
LoadPageControlState (sState.Second);
-#endif
+
Pair vsr = sState.First as Pair;
if (vsr != null) {
LoadViewStateRecursive (vsr.First);
@@ -1949,10 +1670,7 @@ public partial class Page : TemplateControl, IHttpHandler
if (!handleViewState)
return;
-#if NET_2_0
object controlState = SavePageControlState ();
-#endif
-
Pair vsr = null;
object viewState = null;
@@ -1965,11 +1683,7 @@ public partial class Page : TemplateControl, IHttpHandler
Pair pair = new Pair ();
pair.First = vsr;
-#if NET_2_0
pair.Second = controlState;
-#else
- pair.Second = null;
-#endif
if (pair.First == null && pair.Second == null)
SavePageStateToPersistenceMedium (null);
else
@@ -1983,27 +1697,22 @@ public partial class Page : TemplateControl, IHttpHandler
ValidateCollection (_validators);
}
-#if NET_2_0
internal bool AreValidatorsUplevel ()
{
return AreValidatorsUplevel (String.Empty);
}
internal bool AreValidatorsUplevel (string valGroup)
-#else
- internal virtual bool AreValidatorsUplevel ()
-#endif
{
bool uplevel = false;
foreach (IValidator v in Validators) {
BaseValidator bv = v as BaseValidator;
- if (bv == null) continue;
+ if (bv == null)
+ continue;
-#if NET_2_0
if (valGroup != bv.ValidationGroup)
continue;
-#endif
if (bv.GetRenderUplevel()) {
uplevel = true;
break;
@@ -2033,10 +1742,8 @@ public partial class Page : TemplateControl, IHttpHandler
{
if (Context == null)
return;
-#if NET_2_0
if (IsCallback)
return;
-#endif
if (!renderingForm)
throw new HttpException ("Control '" +
control.ClientID +
@@ -2048,23 +1755,14 @@ public partial class Page : TemplateControl, IHttpHandler
protected override void FrameworkInitialize ()
{
base.FrameworkInitialize ();
-#if NET_2_0
InitializeStyleSheet ();
-#endif
}
-
#endregion
-#if NET_2_0
- public
-#else
- internal
-#endif
- ClientScriptManager ClientScript {
+ public ClientScriptManager ClientScript {
get { return scriptManager; }
}
-#if NET_2_0
internal static readonly object InitCompleteEvent = new object ();
internal static readonly object LoadCompleteEvent = new object ();
internal static readonly object PreInitEvent = new object ();
@@ -2810,11 +2508,7 @@ public partial class Page : TemplateControl, IHttpHandler
}
#else
IHttpHandler handler;
-#if NET_2_0
handler = BuildManager.CreateInstanceFromVirtualPath (prevPage, typeof (IHttpHandler)) as IHttpHandler;
-#else
- handler = PageParser.GetCompiledPageInstance (prevPage, Server.MapPath (prevPage), Context);
-#endif
previousPage = (Page) handler;
previousPage.isCrossPagePostBack = true;
Server.Execute (handler, null, true, _context.Request.CurrentExecutionFilePath, null, false, false);
@@ -2823,7 +2517,6 @@ public partial class Page : TemplateControl, IHttpHandler
}
}
-
Hashtable contentTemplates;
[EditorBrowsable (EditorBrowsableState.Never)]
protected internal void AddContentTemplate (string templateName, ITemplate template)
@@ -2890,9 +2583,6 @@ public partial class Page : TemplateControl, IHttpHandler
}
}
- #endif
-
-#if NET_2_0
[MonoTODO ("Not implemented. Only used by .net aspx parser")]
protected object GetWrappedFileDependencies (string [] list)
{
@@ -2908,6 +2598,5 @@ public partial class Page : TemplateControl, IHttpHandler
protected internal void AddWrappedFileDependencies (object virtualFileDependencies)
{
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/PageAsyncTask.cs b/mcs/class/System.Web/System.Web.UI/PageAsyncTask.cs
index 4fd685783cb..a1dea048e49 100644
--- a/mcs/class/System.Web/System.Web.UI/PageAsyncTask.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageAsyncTask.cs
@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System;
namespace System.Web.UI
@@ -77,5 +75,3 @@ namespace System.Web.UI
}
}
-#endif
-
diff --git a/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs b/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs
index ea6a12f6746..1746e4d1515 100644
--- a/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs
@@ -33,12 +33,7 @@ using System.Web.Compilation;
namespace System.Web.UI
{
-#if NET_2_0
- public
-#else
- internal
-#endif
- class PageHandlerFactory : IHttpHandlerFactory
+ public class PageHandlerFactory : IHttpHandlerFactory
{
public virtual IHttpHandler GetHandler (HttpContext context, string requestType, string url, string path)
{
diff --git a/mcs/class/System.Web/System.Web.UI/PageLifeCycle.cs b/mcs/class/System.Web/System.Web.UI/PageLifeCycle.cs
index f51e26fcca3..ebab77a22af 100644
--- a/mcs/class/System.Web/System.Web.UI/PageLifeCycle.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageLifeCycle.cs
@@ -27,7 +27,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
internal enum PageLifeCycle
{
Unknown = 1,
@@ -46,4 +45,3 @@ internal enum PageLifeCycle
Unload,
End
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/PageParser.cs b/mcs/class/System.Web/System.Web.UI/PageParser.cs
index ea6b10ed24f..bcbab1d6a8e 100644
--- a/mcs/class/System.Web/System.Web.UI/PageParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageParser.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -60,8 +60,6 @@ namespace System.Web.UI
string errorPage;
bool validateRequest;
string clientTarget;
-
-#if NET_2_0
bool async;
int asyncTimeout = -1;
string masterPage;
@@ -75,7 +73,6 @@ namespace System.Web.UI
int maxPageStateFieldLength = -1;
Type previousPageType;
string previousPageVirtualPath;
-#endif
public PageParser ()
{
@@ -84,10 +81,7 @@ namespace System.Web.UI
internal PageParser (string virtualPath, string inputFile, HttpContext context)
{
-#if NET_2_0
this.VirtualPath = new VirtualPath (virtualPath);
-#endif
-
Context = context;
BaseVirtualDir = VirtualPathUtility.GetDirectory (virtualPath, false);
InputFile = inputFile;
@@ -96,7 +90,6 @@ namespace System.Web.UI
LoadConfigDefaults ();
}
-#if NET_2_0
internal PageParser (VirtualPath virtualPath, TextReader reader, HttpContext context)
: this (virtualPath, null, reader, context)
{
@@ -116,23 +109,17 @@ namespace System.Web.UI
AddApplicationAssembly ();
LoadConfigDefaults ();
}
-#endif
internal override void LoadConfigDefaults ()
{
base.LoadConfigDefaults ();
-#if NET_2_0
PagesSection ps = PagesConfig;
-#else
- PagesConfiguration ps = PagesConfig;
-#endif
notBuffer = !ps.Buffer;
enableSessionState = ps.EnableSessionState;
enableViewStateMac = ps.EnableViewStateMac;
smartNavigation = ps.SmartNavigation;
validateRequest = ps.ValidateRequest;
-#if NET_2_0
masterPage = ps.MasterPageFile;
if (masterPage.Length == 0)
masterPage = null;
@@ -145,25 +132,16 @@ namespace System.Web.UI
if (styleSheetTheme.Length == 0)
styleSheetTheme = null;
maintainScrollPositionOnPostBack = ps.MaintainScrollPositionOnPostBack;
-#endif
}
- public static IHttpHandler GetCompiledPageInstance (string virtualPath,
- string inputFile,
- HttpContext context)
+ public static IHttpHandler GetCompiledPageInstance (string virtualPath, string inputFile, HttpContext context)
{
-#if NET_2_0
bool isFake = false;
if (!String.IsNullOrEmpty (inputFile))
isFake = !inputFile.StartsWith (HttpRuntime.AppDomainAppPath);
return BuildManager.CreateInstanceFromVirtualPath (new VirtualPath (virtualPath, inputFile, isFake), typeof (IHttpHandler)) as IHttpHandler;
-#else
- PageParser pp = new PageParser (virtualPath, inputFile, context);
- IHttpHandler h = (IHttpHandler) pp.GetCompiledInstance ();
- return h;
-#endif
}
internal override void ProcessMainAttributes (Hashtable atts)
@@ -252,9 +230,7 @@ namespace System.Web.UI
CultureInfo ci = null;
try {
-#if NET_2_0
if (!culture.StartsWith ("auto"))
-#endif
ci = new CultureInfo (culture);
} catch {
ThrowParseException ("Unsupported Culture: " + culture);
@@ -275,9 +251,7 @@ namespace System.Web.UI
if (uiculture != null) {
CultureInfo ci = null;
try {
-#if NET_2_0
if (!uiculture.StartsWith ("auto"))
-#endif
ci = new CultureInfo (uiculture);
} catch {
ThrowParseException ("Unsupported Culture: " + uiculture);
@@ -320,7 +294,6 @@ namespace System.Web.UI
clientTarget = GetString (atts, "ClientTarget", null);
if (clientTarget != null) {
clientTarget = clientTarget.Trim ();
-#if NET_2_0
ClientTargetSection sec = GetConfigSection <ClientTargetSection> ("system.web/clientTarget");
ClientTarget ct = null;
@@ -334,30 +307,9 @@ namespace System.Web.UI
clientTarget));
}
clientTarget = ct.UserAgent;
-#else
- NameValueCollection coll;
- coll = (NameValueCollection) HttpContext.GetAppConfig ("system.web/clientTarget");
- object ct = null;
-
- if (coll != null) {
- ct = coll [clientTarget];
- if (ct == null)
- ct = coll [clientTarget.ToLower (Helpers.InvariantCulture)];
- }
-
- if (ct == null) {
- ThrowParseException (String.Format (
- "ClientTarget '{0}' is an invalid alias. See the " +
- "documentation for <clientTarget> config. section.",
- clientTarget));
- }
- clientTarget = (string) ct;
-#endif
}
notBuffer = !GetBool (atts, "Buffer", true);
-
-#if NET_2_0
async = GetBool (atts, "Async", false);
string asyncTimeoutVal = GetString (atts, "AsyncTimeout", null);
if (asyncTimeoutVal != null) {
@@ -382,7 +334,7 @@ namespace System.Web.UI
styleSheetTheme = GetString (atts, "StyleSheetTheme", styleSheetTheme);
enable_event_validation = GetBool (atts, "EnableEventValidation", enable_event_validation);
maintainScrollPositionOnPostBack = GetBool (atts, "MaintainScrollPositionOnPostBack", maintainScrollPositionOnPostBack);
-#endif
+
// Ignored by now
GetString (atts, "EnableViewStateMac", null);
GetString (atts, "SmartNavigation", null);
@@ -390,7 +342,6 @@ namespace System.Web.UI
base.ProcessMainAttributes (atts);
}
-#if NET_2_0
internal override void AddDirective (string directive, Hashtable atts)
{
bool isMasterType = String.Compare ("MasterType", directive, StringComparison.OrdinalIgnoreCase) == 0;
@@ -437,7 +388,6 @@ namespace System.Web.UI
} else
base.AddDirective (directive, atts);
}
-#endif
static string SuggestCulture (string culture)
{
@@ -451,12 +401,7 @@ namespace System.Web.UI
public static Type GetCompiledPageType (string virtualPath, string inputFile, HttpContext context)
{
-#if NET_2_0
return BuildManager.GetCompiledType (virtualPath);
-#else
- PageParser pp = new PageParser (virtualPath, inputFile, context);
- return pp.CompileIntoType ();
-#endif
}
protected override Type CompileIntoType ()
@@ -498,15 +443,9 @@ namespace System.Web.UI
get { return tracemode; }
}
-#if NET_2_0
internal override string DefaultBaseTypeName {
get { return PagesConfig.PageBaseType; }
}
-#else
- internal override string DefaultBaseTypeName {
- get { return "System.Web.UI.Page"; }
- }
-#endif
internal override string DefaultDirectiveName {
get { return "page"; }
@@ -552,7 +491,6 @@ namespace System.Web.UI
get { return notBuffer; }
}
-#if NET_2_0
internal bool Async {
get { return async; }
}
@@ -608,7 +546,6 @@ namespace System.Web.UI
return previousPageType;
}
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/PageParserFilter.cs b/mcs/class/System.Web/System.Web.UI/PageParserFilter.cs
index 01bf9f995a5..4fdd1ffe82d 100644
--- a/mcs/class/System.Web/System.Web.UI/PageParserFilter.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageParserFilter.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
namespace System.Web.UI
@@ -146,4 +145,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/PageStatePersister.cs b/mcs/class/System.Web/System.Web.UI/PageStatePersister.cs
index fdaf6966fcf..08af9fd32de 100644
--- a/mcs/class/System.Web/System.Web.UI/PageStatePersister.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageStatePersister.cs
@@ -4,7 +4,7 @@
// Author:
// Dick Porter <dick@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,12 +28,7 @@
namespace System.Web.UI
{
-#if NET_2_0
- public
-#else
- internal
-#endif
- abstract class PageStatePersister
+ public abstract class PageStatePersister
{
object control_state;
object view_state;
diff --git a/mcs/class/System.Web/System.Web.UI/PageTheme.cs b/mcs/class/System.Web/System.Web.UI/PageTheme.cs
index 68a661cbdd1..457808992a2 100644
--- a/mcs/class/System.Web/System.Web.UI/PageTheme.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageTheme.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2006 Novell, Inc (http://www.novell.com)
+// (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,8 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System;
using System.Collections;
using System.ComponentModel;
@@ -119,5 +117,3 @@ namespace System.Web.UI {
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/PageThemeBuilder.cs b/mcs/class/System.Web/System.Web.UI/PageThemeBuilder.cs
index 0578c5ff429..508e0762d72 100644
--- a/mcs/class/System.Web/System.Web.UI/PageThemeBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageThemeBuilder.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2006 Novell, Inc (http://www.novell.com)
+// (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,10 +26,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
internal class PageThemeBuilder : UserControlControlBuilder
{
public override void AppendLiteralString (string s)
@@ -39,4 +37,3 @@ namespace System.Web.UI {
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/PageThemeFileParser.cs b/mcs/class/System.Web/System.Web.UI/PageThemeFileParser.cs
index 34830ac286d..4447f05e80f 100644
--- a/mcs/class/System.Web/System.Web.UI/PageThemeFileParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageThemeFileParser.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2006 Novell, Inc. (http://www.novell.com)
+// (C) 2006-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -28,8 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System;
using System.Collections;
using System.IO;
@@ -66,5 +64,3 @@ namespace System.Web.UI
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/PageThemeParser.cs b/mcs/class/System.Web/System.Web.UI/PageThemeParser.cs
index 13a087ea40b..8afc3aa9cfd 100644
--- a/mcs/class/System.Web/System.Web.UI/PageThemeParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageThemeParser.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2006 Novell, Inc. (http://www.novell.com)
+// (C) 2006-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -28,8 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System;
using System.Collections;
using System.IO;
@@ -63,5 +61,3 @@ namespace System.Web.UI
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/Pair.cs b/mcs/class/System.Web/System.Web.UI/Pair.cs
index b164a7f56b5..f8601e17c13 100644
--- a/mcs/class/System.Web/System.Web.UI/Pair.cs
+++ b/mcs/class/System.Web/System.Web.UI/Pair.cs
@@ -4,7 +4,7 @@
// Author:
// Ben Maurer <bmaurer@novell.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,17 +28,13 @@
using System.Security.Permissions;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_2_0
[Serializable]
- public sealed class Pair {
-#else
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public class Pair {
-#endif
+ public sealed class Pair
+ {
public Pair (object first, object second)
{
First = first;
diff --git a/mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs b/mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs
index 3edd307b3c2..bdd3968b2d3 100644
--- a/mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc. (http://www.ximian.com
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -41,13 +41,10 @@ namespace System.Web.UI {
bool childrenAsProperties;
string defaultProperty;
public static readonly ParseChildrenAttribute Default = new ParseChildrenAttribute ();
-
-#if NET_2_0
public static readonly ParseChildrenAttribute ParseAsChildren = new ParseChildrenAttribute (false);
public static readonly ParseChildrenAttribute ParseAsProperties = new ParseChildrenAttribute (true);
Type childType = typeof(System.Web.UI.Control);
-#endif
// LAMESPEC
public ParseChildrenAttribute ()
@@ -69,13 +66,12 @@ namespace System.Web.UI {
if (childrenAsProperties)
this.defaultProperty = defaultProperty;
}
-#if NET_2_0
+
public ParseChildrenAttribute (Type childControlType)
{
childType = childControlType;
defaultProperty = "";
}
-#endif
public bool ChildrenAsProperties {
@@ -90,11 +86,9 @@ namespace System.Web.UI {
set { defaultProperty = value; }
}
-#if NET_2_0
public Type ChildControlType {
get { return childType; }
}
-#endif
public override bool Equals (object obj)
{
diff --git a/mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs b/mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs
index fe881d737ee..8a70d0641b5 100644
--- a/mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs
@@ -4,7 +4,7 @@
// Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -40,13 +40,8 @@ namespace System.Web.UI {
string varyByControls;
string varyByCustom;
string varyByParams;
-#if NET_1_1
bool shared;
-#endif
-#if NET_2_0
string sqlDependency;
-#endif
-
public PartialCachingAttribute (int duration)
{
@@ -62,7 +57,6 @@ namespace System.Web.UI {
this.varyByCustom = varyByCustom;
}
-#if NET_1_1
public PartialCachingAttribute (int duration, string varyByParams, string varyByControls,
string varyByCustom, bool shared)
{
@@ -72,8 +66,7 @@ namespace System.Web.UI {
this.varyByCustom = varyByCustom;
this.shared = shared;
}
-#endif
-#if NET_2_0
+
public PartialCachingAttribute (int duration, string varyByParams, string varyByControls,
string varyByCustom, string sqlDependency, bool shared)
{
@@ -84,7 +77,6 @@ namespace System.Web.UI {
this.sqlDependency = sqlDependency;
this.shared = shared;
}
-#endif
public int Duration {
get { return duration; }
@@ -102,15 +94,12 @@ namespace System.Web.UI {
get { return varyByCustom; }
}
-#if NET_1_1
public bool Shared {
get { return shared; }
}
-#endif
-#if NET_2_0
+
public string SqlDependency {
get { return sqlDependency; }
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/PersistChildrenAttribute.cs b/mcs/class/System.Web/System.Web.UI/PersistChildrenAttribute.cs
index 52ec3f1ac21..35f6fad68b3 100644
--- a/mcs/class/System.Web/System.Web.UI/PersistChildrenAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/PersistChildrenAttribute.cs
@@ -4,7 +4,7 @@
// Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -37,23 +37,19 @@ namespace System.Web.UI {
public sealed class PersistChildrenAttribute : Attribute
{
bool persist;
-#if NET_2_0
bool usesCustomPersistence;
-#endif
public PersistChildrenAttribute (bool persist)
{
this.persist = persist;
}
-#if NET_2_0
public PersistChildrenAttribute (bool persist,
bool usesCustomPersistence)
{
this.persist = persist;
this.usesCustomPersistence = usesCustomPersistence;
}
-#endif
public static readonly PersistChildrenAttribute Default = new PersistChildrenAttribute (true);
public static readonly PersistChildrenAttribute Yes = new PersistChildrenAttribute (true);
@@ -63,14 +59,12 @@ namespace System.Web.UI {
get { return persist; }
}
-#if NET_2_0
public bool UsesCustomPersistence
{
get {
return (usesCustomPersistence);
}
}
-#endif
public override bool Equals (object obj)
{
@@ -78,11 +72,7 @@ namespace System.Web.UI {
if (pobj == null)
return false;
- return (pobj.persist == persist
-#if NET_2_0
- && pobj.usesCustomPersistence == usesCustomPersistence
-#endif
- );
+ return (pobj.persist == persist && pobj.usesCustomPersistence == usesCustomPersistence);
}
public override int GetHashCode ()
diff --git a/mcs/class/System.Web/System.Web.UI/PostBackOptions.cs b/mcs/class/System.Web/System.Web.UI/PostBackOptions.cs
index 98a98856a77..25368becb72 100644
--- a/mcs/class/System.Web/System.Web.UI/PostBackOptions.cs
+++ b/mcs/class/System.Web/System.Web.UI/PostBackOptions.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -141,5 +140,3 @@ namespace System.Web.UI
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/PropertyConverter.cs b/mcs/class/System.Web/System.Web.UI/PropertyConverter.cs
index 0a47030dfe8..fbd974056dd 100644
--- a/mcs/class/System.Web/System.Web.UI/PropertyConverter.cs
+++ b/mcs/class/System.Web/System.Web.UI/PropertyConverter.cs
@@ -24,7 +24,7 @@
// Authors:
// Jackson Harper (jackson@ximian.com)
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
using System.Reflection;
using System.ComponentModel;
@@ -34,16 +34,8 @@ namespace System.Web.UI {
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_2_0
- public static class PropertyConverter {
-#else
- public sealed class PropertyConverter {
-
- PropertyConverter ()
- {
- // no instantiation for you
- }
-#endif
+ public static class PropertyConverter
+ {
public static object EnumFromString (Type enumType, string value)
{
object res = null;
diff --git a/mcs/class/System.Web/System.Web.UI/PropertyEntry.cs b/mcs/class/System.Web/System.Web.UI/PropertyEntry.cs
index b83d24b1167..953a55c0248 100644
--- a/mcs/class/System.Web/System.Web.UI/PropertyEntry.cs
+++ b/mcs/class/System.Web/System.Web.UI/PropertyEntry.cs
@@ -4,7 +4,7 @@
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
-// Copyright (c) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -27,7 +27,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Reflection;
@@ -67,5 +66,5 @@ namespace System.Web.UI
}
}
-#endif // NET_2_0
+
diff --git a/mcs/class/System.Web/System.Web.UI/ReadOnlyDataSourceView.cs b/mcs/class/System.Web/System.Web.UI/ReadOnlyDataSourceView.cs
index dacd688385a..cc17059468c 100644
--- a/mcs/class/System.Web/System.Web.UI/ReadOnlyDataSourceView.cs
+++ b/mcs/class/System.Web/System.Web.UI/ReadOnlyDataSourceView.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
namespace System.Web.UI
@@ -48,4 +47,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ResourceBasedLiteralControl.cs b/mcs/class/System.Web/System.Web.UI/ResourceBasedLiteralControl.cs
index eed28b926c1..56fdc1cafb0 100644
--- a/mcs/class/System.Web/System.Web.UI/ResourceBasedLiteralControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/ResourceBasedLiteralControl.cs
@@ -29,7 +29,8 @@
using System.Runtime.InteropServices;
using System.Text;
-namespace System.Web.UI {
+namespace System.Web.UI
+{
class ResourceBasedLiteralControl : LiteralControl
{
IntPtr ptr;
@@ -58,12 +59,7 @@ namespace System.Web.UI {
}
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override void Render (HtmlTextWriter writer)
+ protected internal override void Render (HtmlTextWriter writer)
{
if (length == -1) {
writer.Write (base.Text);
diff --git a/mcs/class/System.Web/System.Web.UI/RootBuilder.cs b/mcs/class/System.Web/System.Web.UI/RootBuilder.cs
index 444eb42640c..77e5e385fc0 100644
--- a/mcs/class/System.Web/System.Web.UI/RootBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/RootBuilder.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2003 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -32,48 +32,34 @@ using System.Security.Permissions;
using System.Web.Compilation;
using System.Web.UI.HtmlControls;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_2_0
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public class RootBuilder : TemplateBuilder {
-
+ public class RootBuilder : TemplateBuilder
+ {
Hashtable built_objects;
-
+ static Hashtable htmlControls;
+ static Hashtable htmlInputControls;
+ AspComponentFoundry foundry;
+
public RootBuilder ()
{
foundry = new AspComponentFoundry ();
Line = 1;
}
-#else
- public sealed class RootBuilder : TemplateBuilder {
-#endif
- static Hashtable htmlControls;
- static Hashtable htmlInputControls;
- AspComponentFoundry foundry;
static RootBuilder ()
{
-#if NET_2_0
htmlControls = new Hashtable (StringComparer.InvariantCultureIgnoreCase);
-#else
- htmlControls = new Hashtable (CaseInsensitiveHashCodeProvider.DefaultInvariant,
- CaseInsensitiveComparer.DefaultInvariant);
-#endif
-
htmlControls.Add ("A", typeof (HtmlAnchor));
htmlControls.Add ("BUTTON", typeof (HtmlButton));
htmlControls.Add ("FORM", typeof (HtmlForm));
-#if NET_2_0
htmlControls.Add ("HEAD", typeof (HtmlHead));
-#endif
htmlControls.Add ("IMG", typeof (HtmlImage));
htmlControls.Add ("INPUT", "INPUT");
-#if NET_2_0
htmlControls.Add ("LINK", typeof (HtmlLink));
htmlControls.Add ("META", typeof (HtmlLink));
-#endif
htmlControls.Add ("SELECT", typeof (HtmlSelect));
htmlControls.Add ("TABLE", typeof (HtmlTable));
htmlControls.Add ("TD", typeof (HtmlTableCell));
@@ -81,32 +67,18 @@ namespace System.Web.UI {
htmlControls.Add ("TR", typeof (HtmlTableRow));
htmlControls.Add ("TEXTAREA", typeof (HtmlTextArea));
-#if NET_2_0
htmlInputControls = new Hashtable (StringComparer.InvariantCultureIgnoreCase);
-#else
- htmlInputControls = new Hashtable (CaseInsensitiveHashCodeProvider.DefaultInvariant,
- CaseInsensitiveComparer.DefaultInvariant);
-#endif
htmlInputControls.Add ("BUTTON", typeof (HtmlInputButton));
-#if NET_2_0
htmlInputControls.Add ("SUBMIT", typeof (HtmlInputSubmit));
htmlInputControls.Add ("RESET", typeof (HtmlInputReset));
-#else
- htmlInputControls.Add ("SUBMIT", typeof (HtmlInputButton));
- htmlInputControls.Add ("RESET", typeof (HtmlInputButton));
-#endif
htmlInputControls.Add ("CHECKBOX", typeof (HtmlInputCheckBox));
htmlInputControls.Add ("FILE", typeof (HtmlInputFile));
htmlInputControls.Add ("HIDDEN", typeof (HtmlInputHidden));
htmlInputControls.Add ("IMAGE", typeof (HtmlInputImage));
htmlInputControls.Add ("RADIO", typeof (HtmlInputRadioButton));
htmlInputControls.Add ("TEXT", typeof (HtmlInputText));
-#if NET_2_0
htmlInputControls.Add ("PASSWORD", typeof (HtmlInputPassword));
-#else
- htmlInputControls.Add ("PASSWORD", typeof (HtmlInputText));
-#endif
}
public RootBuilder (TemplateParser parser)
@@ -126,7 +98,6 @@ namespace System.Web.UI {
AspComponent component = foundry.GetComponent (tagName);
if (component != null) {
-#if NET_2_0
if (!String.IsNullOrEmpty (component.Source)) {
TemplateParser parser = Parser;
@@ -141,7 +112,6 @@ namespace System.Web.UI {
Parser.AddDependency (component.Source);
}
}
-#endif
return component.Type;
} else if (component != null && component.Prefix != String.Empty)
throw new Exception ("Unknown server tag '" + tagName + "'");
@@ -180,7 +150,7 @@ namespace System.Web.UI {
foundry = value;
}
}
-#if NET_2_0
+
// FIXME: it's empty (but not null) when using the new default ctor
// but I'm not sure when something should gets in...
public IDictionary BuiltObjects {
@@ -190,6 +160,5 @@ namespace System.Web.UI {
return built_objects;
}
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/SessionPageStatePersister.cs b/mcs/class/System.Web/System.Web.UI/SessionPageStatePersister.cs
index 243b466b21b..ab12a319d4c 100644
--- a/mcs/class/System.Web/System.Web.UI/SessionPageStatePersister.cs
+++ b/mcs/class/System.Web/System.Web.UI/SessionPageStatePersister.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Web.UI;
namespace System.Web.UI
@@ -51,4 +50,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/SimpleHandlerFactory.cs b/mcs/class/System.Web/System.Web.UI/SimpleHandlerFactory.cs
index f3d8eab2723..3d499d26e6a 100644
--- a/mcs/class/System.Web/System.Web.UI/SimpleHandlerFactory.cs
+++ b/mcs/class/System.Web/System.Web.UI/SimpleHandlerFactory.cs
@@ -4,7 +4,7 @@
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
-// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
+// (C) 2002-2010 Ximian, Inc (http://www.ximian.com)
//
//
@@ -40,15 +40,7 @@ namespace System.Web.UI
string virtualPath,
string path)
{
-#if NET_2_0
return BuildManager.CreateInstanceFromVirtualPath (virtualPath, typeof (IHttpHandler)) as IHttpHandler;
-#else
- Type type = WebHandlerParser.GetCompiledType (context, virtualPath, path);
- if (!(typeof (IHttpHandler).IsAssignableFrom (type)))
- throw new HttpException ("Type does not implement IHttpHandler: " + type.FullName);
-
- return Activator.CreateInstance (type) as IHttpHandler;
-#endif
}
public virtual void ReleaseHandler (IHttpHandler handler)
diff --git a/mcs/class/System.Web/System.Web.UI/SimplePropertyEntry.cs b/mcs/class/System.Web/System.Web.UI/SimplePropertyEntry.cs
index 6bd7912f1f7..1aa28e80b40 100644
--- a/mcs/class/System.Web/System.Web.UI/SimplePropertyEntry.cs
+++ b/mcs/class/System.Web/System.Web.UI/SimplePropertyEntry.cs
@@ -4,7 +4,7 @@
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
-// Copyright (c) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -27,7 +27,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI
{
public class SimplePropertyEntry : PropertyEntry {
@@ -47,5 +46,4 @@ namespace System.Web.UI
}
}
}
-#endif // NET_2_0
diff --git a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs b/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
index 3905466eeaf..be84e64af03 100644
--- a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -58,14 +58,7 @@ namespace System.Web.UI
Hashtable anames;
string baseDir;
string baseVDir;
-#if !NET_2_0
- CompilationConfiguration compilationConfig;
-#endif
-
-#if NET_2_0
TextReader reader;
-#endif
-
int appAssemblyIndex = -1;
Type cachedType;
@@ -75,9 +68,7 @@ namespace System.Web.UI
internal SimpleWebHandlerParser (HttpContext context, string virtualPath, string physicalPath, TextReader reader)
{
-#if NET_2_0
this.reader = reader;
-#endif
cachedType = CachingCompiler.GetTypeFromCache (physicalPath);
if (cachedType != null)
return; // We don't need anything else.
@@ -106,7 +97,6 @@ namespace System.Web.UI
if (location != typeof (TemplateParser).Assembly.Location)
appAssemblyIndex = assemblies.Add (location);
-#if NET_2_0
bool addAssembliesInBin = false;
foreach (AssemblyInfo info in CompilationConfig.Assemblies) {
if (info.Assembly == "*")
@@ -116,12 +106,6 @@ namespace System.Web.UI
}
if (addAssembliesInBin)
AddAssembliesInBin ();
-#else
- assemblies.AddRange (CompilationConfig.Assemblies);
- if (CompilationConfig.AssembliesInBin)
- AddAssembliesInBin ();
-#endif
-
language = CompilationConfig.DefaultLanguage;
GetDirectivesAndContent ();
@@ -142,11 +126,9 @@ namespace System.Web.UI
int idxStart, idxEnd, length;
StreamReader sr;
-#if NET_2_0
if (reader != null)
sr = reader as StreamReader;
else
-#endif
sr = new StreamReader (File.OpenRead (physPath), WebEncoding.FileEncoding);
using (sr) {
@@ -270,11 +252,7 @@ namespace System.Web.UI
internal virtual void AddDefaultDirective (ILocation location, TagAttributes attrs)
{
-#if NET_2_0
CompilationSection compConfig;
-#else
- CompilationConfiguration compConfig;
-#endif
compConfig = CompilationConfig;
if (gotDefault)
@@ -476,7 +454,6 @@ namespace System.Web.UI
return type;
}
-#if NET_2_0
IList toplevelAssemblies = BuildManager.TopLevelAssemblies;
if (toplevelAssemblies != null && toplevelAssemblies.Count > 0) {
foreach (Assembly asm in toplevelAssemblies) {
@@ -488,7 +465,6 @@ namespace System.Web.UI
}
}
}
-#endif
foreach (string dll in HttpApplication.BinDirectoryAssemblies) {
try {
@@ -597,7 +573,6 @@ namespace System.Web.UI
}
}
-#if NET_2_0
CompilationSection CompilationConfig {
get {
string vp = VirtualPath;
@@ -612,16 +587,6 @@ namespace System.Web.UI
get { return reader; }
set { reader = value; }
}
-#else
- internal CompilationConfiguration CompilationConfig {
- get {
- if (compilationConfig == null)
- compilationConfig = CompilationConfiguration.GetInstance (context);
-
- return compilationConfig;
- }
- }
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/SkinBuilder.cs b/mcs/class/System.Web/System.Web.UI/SkinBuilder.cs
index 936cf0493fb..c22d6201269 100644
--- a/mcs/class/System.Web/System.Web.UI/SkinBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/SkinBuilder.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2006 Novell, Inc (http://www.novell.com)
+// (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,10 +26,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
public sealed class SkinBuilder : ControlBuilder
{
//ThemeProvider provider;
@@ -55,5 +53,3 @@ namespace System.Web.UI {
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/StateBag.cs b/mcs/class/System.Web/System.Web.UI/StateBag.cs
index 725bdfabe40..00dc4559d96 100644
--- a/mcs/class/System.Web/System.Web.UI/StateBag.cs
+++ b/mcs/class/System.Web/System.Web.UI/StateBag.cs
@@ -4,7 +4,7 @@
// Author:
// Ben Maurer <bmaurer@novell.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -30,12 +30,12 @@ using System.Collections;
using System.Collections.Specialized;
using System.Security.Permissions;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public sealed class StateBag : IDictionary, IStateManager {
-
+ public sealed class StateBag : IDictionary, IStateManager
+ {
HybridDictionary ht;
bool track;
@@ -270,12 +270,7 @@ namespace System.Web.UI {
}
}
-#if NET_2_0
- public
-#else
- internal
-#endif
- void SetDirty (bool dirty)
+ public void SetDirty (bool dirty)
{
foreach (DictionaryEntry de in ht) {
StateItem si = (StateItem) de.Value;
diff --git a/mcs/class/System.Web/System.Web.UI/StateManagedCollection.cs b/mcs/class/System.Web/System.Web.UI/StateManagedCollection.cs
index b51411ade89..8d2f6249c93 100644
--- a/mcs/class/System.Web/System.Web.UI/StateManagedCollection.cs
+++ b/mcs/class/System.Web/System.Web.UI/StateManagedCollection.cs
@@ -29,8 +29,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Collections;
using System.Collections.Generic;
@@ -369,5 +367,4 @@ namespace System.Web.UI {
#endregion
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs b/mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs
index 031049d1b9b..b6774dfd4c2 100644
--- a/mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs
@@ -5,7 +5,7 @@
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2003 Andreas Nahr
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -53,7 +53,6 @@ namespace System.Web.UI {
this.buildMethod = buildMethod;
}
-#if NET_2_0
[MonoTODO("Consider sqlDependency parameter")]
public static void BuildCachedControl (Control parent, string ctrlID, string guid,
int duration, string varyByParams, string varyByControls,
@@ -63,7 +62,6 @@ namespace System.Web.UI {
duration, varyByParams, varyByControls,
varyByCustom, buildMethod);
}
-#endif
public static void BuildCachedControl (Control parent, string ctrlID, string guid,
int duration, string varyByParams, string varyByControls,
diff --git a/mcs/class/System.Web/System.Web.UI/SupportsEventValidationAttribute.cs b/mcs/class/System.Web/System.Web.UI/SupportsEventValidationAttribute.cs
index 886294179a1..f0f166276d9 100644
--- a/mcs/class/System.Web/System.Web.UI/SupportsEventValidationAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/SupportsEventValidationAttribute.cs
@@ -4,7 +4,7 @@
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,22 +26,18 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Security.Permissions;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
[AttributeUsage (AttributeTargets.Class)]
- public sealed class SupportsEventValidationAttribute : Attribute {
-
+ public sealed class SupportsEventValidationAttribute : Attribute
+ {
public SupportsEventValidationAttribute ()
{
}
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateBuilder.cs b/mcs/class/System.Web/System.Web.UI/TemplateBuilder.cs
index 6709cf4db0c..085ae900ff8 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateBuilder.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2003 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,12 +28,10 @@
//
using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
using System.Reflection;
using System.Security.Permissions;
-#if NET_2_0
-using System.ComponentModel;
-using System.Collections.Generic;
-#endif
namespace System.Web.UI {
@@ -44,10 +42,8 @@ namespace System.Web.UI {
string text;
TemplateContainerAttribute containerAttribute;
-#if NET_2_0
TemplateInstanceAttribute instanceAttribute;
List <TemplateBinding> bindings;
-#endif
public TemplateBuilder ()
{
@@ -59,11 +55,9 @@ namespace System.Web.UI {
if (ats.Length > 0)
containerAttribute = (TemplateContainerAttribute) ats [0];
-#if NET_2_0
ats = prov.GetCustomAttributes (typeof (TemplateInstanceAttribute), true);
if (ats.Length > 0)
instanceAttribute = (TemplateInstanceAttribute) ats [0];
-#endif
}
public virtual string Text {
@@ -75,7 +69,6 @@ namespace System.Web.UI {
get { return containerAttribute != null ? containerAttribute.ContainerType : null; }
}
-#if NET_2_0
internal TemplateInstance? TemplateInstance {
get { return instanceAttribute != null ? instanceAttribute.Instances : (TemplateInstance?)null; }
}
@@ -99,7 +92,6 @@ namespace System.Web.UI {
{
return base.BuildObject ();
}
-#endif
public override void Init (TemplateParser parser,
ControlBuilder parentBuilder,
@@ -130,7 +122,6 @@ namespace System.Web.UI {
}
}
-#if NET_2_0
internal class TemplateBinding
{
public Type ControlType;
@@ -146,6 +137,5 @@ namespace System.Web.UI {
FieldName = fieldName;
}
}
-#endif
}
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateContainerAttribute.cs b/mcs/class/System.Web/System.Web.UI/TemplateContainerAttribute.cs
index e51f42b9659..6780219f5f8 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateContainerAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateContainerAttribute.cs
@@ -4,7 +4,7 @@
// Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,8 +29,8 @@
using System.ComponentModel;
using System.Security.Permissions;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
@@ -38,8 +38,6 @@ namespace System.Web.UI {
public sealed class TemplateContainerAttribute : Attribute
{
Type containerType;
-
-#if NET_2_0
BindingDirection direction;
public TemplateContainerAttribute (Type containerType, BindingDirection direction)
@@ -51,7 +49,6 @@ namespace System.Web.UI {
public BindingDirection BindingDirection {
get { return direction; }
}
-#endif
public TemplateContainerAttribute (Type containerType)
{
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateContentType.cs b/mcs/class/System.Web/System.Web.UI/TemplateContentType.cs
index 8e3579f388e..bf196d46ee7 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateContentType.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateContentType.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,12 +27,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-namespace System.Web.UI {
- public enum TemplateContentType {
+namespace System.Web.UI
+{
+ public enum TemplateContentType
+ {
Complete = 0,
Fragment = 1
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateControl.cs b/mcs/class/System.Web/System.Web.UI/TemplateControl.cs
index 63503e86da5..6dd55c0c8de 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateControl.cs
@@ -7,7 +7,7 @@
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2002 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -40,29 +40,24 @@ using System.IO;
using System.Runtime.InteropServices;
using System.Text;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_2_0
- public abstract class TemplateControl : Control, INamingContainer, IFilterResolutionService {
-#else
- public abstract class TemplateControl : Control, INamingContainer {
-#endif
+ public abstract class TemplateControl : Control, INamingContainer, IFilterResolutionService
+ {
static readonly Assembly _System_Web_Assembly = typeof (TemplateControl).Assembly;
static object abortTransaction = new object ();
static object commitTransaction = new object ();
static object error = new object ();
static string [] methodNames = { "Page_Init",
-#if NET_2_0
"Page_PreInit",
"Page_PreLoad",
"Page_LoadComplete",
"Page_PreRenderComplete",
"Page_SaveStateComplete",
"Page_InitComplete",
-#endif
"Page_Load",
"Page_DataBind",
"Page_PreRender",
@@ -76,17 +71,13 @@ namespace System.Web.UI {
BindingFlags.NonPublic |
BindingFlags.Instance;
-#if NET_2_0
string _appRelativeVirtualPath;
-#endif
StringResourceData resource_data;
#region Constructor
protected TemplateControl ()
{
-#if NET_2_0
TemplateControl = this;
-#endif
Construct ();
}
@@ -94,9 +85,7 @@ namespace System.Web.UI {
#region Properties
[EditorBrowsable (EditorBrowsableState.Never)]
-#if NET_2_0
[Obsolete]
-#endif
protected virtual int AutoHandlers {
get { return 0; }
set { }
@@ -107,12 +96,10 @@ namespace System.Web.UI {
get { return true; }
}
-#if NET_2_0
public string AppRelativeVirtualPath {
get { return _appRelativeVirtualPath; }
set { _appRelativeVirtualPath = value; }
}
-#endif
#endregion
@@ -167,14 +154,8 @@ namespace System.Web.UI {
if (evinfo.noParams) {
NoParamsInvoker npi = new NoParamsInvoker (this, evinfo.method);
evinfo.evt.AddEventHandler (this, npi.FakeDelegate);
- } else {
- evinfo.evt.AddEventHandler (this, Delegate.CreateDelegate (
-#if NET_2_0
- typeof (EventHandler), this, evinfo.method));
-#else
- typeof (EventHandler), this, evinfo.methodName));
-#endif
- }
+ } else
+ evinfo.evt.AddEventHandler (this, Delegate.CreateDelegate (typeof (EventHandler), this, evinfo.method));
}
}
@@ -240,23 +221,13 @@ namespace System.Web.UI {
throw new ArgumentNullException ("virtualPath");
string vpath = UrlUtils.Combine (TemplateSourceDirectory, virtualPath);
-#if NET_2_0
return BuildManager.GetCompiledType (vpath);
-#else
- string realpath = Context.Request.MapPath (vpath);
- return UserControlParser.GetCompiledType (vpath, realpath, Context);
-#endif
}
public Control LoadControl (string virtualPath)
{
-#if NET_2_0
if (virtualPath == null)
throw new ArgumentNullException ("virtualPath");
-#else
- if (virtualPath == null)
- throw new HttpException ("virtualPath is null");
-#endif
Type type = GetTypeFromControlPath (virtualPath);
return LoadControl (type, null);
@@ -286,13 +257,8 @@ namespace System.Web.UI {
public ITemplate LoadTemplate (string virtualPath)
{
-#if NET_2_0
if (virtualPath == null)
throw new ArgumentNullException ("virtualPath");
-#else
- if (virtualPath == null)
- throw new HttpException ("virtualPath is null");
-#endif
Type t = GetTypeFromControlPath (virtualPath);
return new SimpleTemplate (t);
}
@@ -318,15 +284,11 @@ namespace System.Web.UI {
eh (this, e);
}
-#if !NET_2_0
- [MonoTODO ("Not implemented, always returns null")]
-#endif
public Control ParseControl (string content)
{
if (content == null)
throw new ArgumentNullException ("content");
-#if NET_2_0
// FIXME: This method needs to be rewritten in some sane way - the way it is now,
// is a kludge. New version should not use
// UserControlParser.GetCompiledType, but instead resort to some other way
@@ -354,26 +316,19 @@ namespace System.Web.UI {
parsedControl = null;
return ret;
-#else
- return null;
-#endif
}
-#if NET_2_0
[MonoTODO ("Parser filters not implemented yet. Calls ParseControl (string) for now.")]
public Control ParseControl (string content, bool ignoreParserFilter)
{
return ParseControl (content);
}
-#endif
-#if NET_2_0
[EditorBrowsable (EditorBrowsableState.Never)]
public object ReadStringResource ()
{
return ReadStringResource (GetType ());
}
-#endif
class StringResourceData {
public IntPtr Ptr;
@@ -381,7 +336,6 @@ namespace System.Web.UI {
public int MaxOffset;
}
-#if NET_2_0
protected object GetGlobalResourceObject (string className, string resourceKey)
{
return HttpContext.GetGlobalResourceObject (className, resourceKey);
@@ -429,7 +383,6 @@ namespace System.Web.UI {
internal override TemplateControl TemplateControlInternal {
get { return this; }
}
-#endif
[EditorBrowsable (EditorBrowsableState.Never)]
public static object ReadStringResource (Type t)
@@ -539,7 +492,6 @@ namespace System.Web.UI {
}
}
-#if NET_2_0
protected internal object Eval (string expression)
{
return DataBinder.Eval (Page.GetDataItem(), expression);
@@ -593,6 +545,5 @@ namespace System.Web.UI {
{
throw new NotImplementedException ();
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs b/mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs
index e48c9d03390..bb884a6f347 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -36,25 +36,17 @@ using System.Web.Compilation;
using System.Web.Configuration;
using System.Web.Util;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public abstract class TemplateControlParser
-#if NET_2_0
- : BaseTemplateParser
-#else
- : TemplateParser
-#endif
+ public abstract class TemplateControlParser : BaseTemplateParser
{
-
bool autoEventWireup = true;
bool enableViewState = true;
-#if NET_2_0
CompilationMode compilationMode = CompilationMode.Always;
TextReader reader;
-#endif
protected TemplateControlParser ()
{
@@ -64,26 +56,17 @@ namespace System.Web.UI {
internal override void LoadConfigDefaults ()
{
base.LoadConfigDefaults ();
-#if NET_2_0
PagesSection ps = PagesConfig;
-#else
- PagesConfiguration ps = PagesConfig;
-#endif
-
-#if NET_1_1
autoEventWireup = ps.AutoEventWireup;
enableViewState = ps.EnableViewState;
-#endif
-#if NET_2_0
compilationMode = ps.CompilationMode;
-#endif
}
internal override void ProcessMainAttributes (Hashtable atts)
{
autoEventWireup = GetBool (atts, "AutoEventWireup", autoEventWireup);
enableViewState = GetBool (atts, "EnableViewState", enableViewState);
-#if NET_2_0
+
string cmode = GetString (atts, "CompilationMode", compilationMode.ToString ());
if (!String.IsNullOrEmpty (cmode)) {
if (String.Compare (cmode, "always", StringComparison.InvariantCultureIgnoreCase) == 0)
@@ -95,7 +78,6 @@ namespace System.Web.UI {
else
ThrowParseException ("Invalid value of the CompilationMode attribute");
}
-#endif
atts.Remove ("TargetSchema"); // Ignored
base.ProcessMainAttributes (atts);
@@ -126,11 +108,6 @@ namespace System.Web.UI {
string ns = GetString (atts, "Namespace", null);
string assembly = GetString (atts, "Assembly", null);
-#if !NET_2_0
- if (ns != null && assembly == null)
- ThrowParseException ("Need an Assembly attribute with Namespace.");
-#endif
-
if (ns == null && assembly != null)
ThrowParseException ("Need a Namespace attribute with Assembly.");
@@ -151,11 +128,6 @@ namespace System.Web.UI {
if (tagname != null && src == null)
ThrowParseException ("Need a Src attribute with TagName.");
-#if !NET_2_0
- if (!StrUtils.EndsWith (src, ".ascx", true))
- ThrowParseException ("Source file extension for controls must be .ascx");
-#endif
-
RegisterCustomControl (tagprefix, tagname, src);
return;
}
@@ -177,22 +149,15 @@ namespace System.Web.UI {
else
vp = control;
-#if NET_2_0
string virtualPath = GetString (atts, "VirtualPath", null);
if (virtualPath != null)
if (vp != null)
dupe = true;
else
vp = virtualPath;
-#endif
- if (vp == null) {
-#if NET_2_0
+ if (vp == null)
ThrowParseException ("Must provide one of the 'page', 'control' or 'virtualPath' attributes");
-#else
- ThrowParseException ("Must provide one of the 'page' or 'control' attributes");
-#endif
- }
if (dupe)
ThrowParseException ("Only one attribute can be specified.");
@@ -200,17 +165,7 @@ namespace System.Web.UI {
AddDependency (vp);
Type ctype;
-#if NET_2_0
ctype = BuildManager.GetCompiledType (vp);
-#else
- string filepath = MapPath (vp);
- if (is_page) {
- PageParser pp = new PageParser (page, filepath, Context);
- ctype = pp.CompileIntoType ();
- } else {
- ctype = UserControlParser.GetCompiledType (vp, filepath, Dependencies, Context);
- }
-#endif
AddAssembly (ctype.Assembly, true);
if (atts.Count != 0)
@@ -239,7 +194,6 @@ namespace System.Web.UI {
get { return enableViewState; }
}
-#if NET_2_0
internal CompilationMode CompilationMode {
get { return compilationMode; }
}
@@ -248,7 +202,6 @@ namespace System.Web.UI {
get { return reader; }
set { reader = value; }
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateInstance.cs b/mcs/class/System.Web/System.Web.UI/TemplateInstance.cs
index be3207ac149..6cf743d637e 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateInstance.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateInstance.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,12 +27,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-namespace System.Web.UI {
- public enum TemplateInstance {
+namespace System.Web.UI
+{
+ public enum TemplateInstance
+ {
Multiple = 0,
Single = 1
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateInstanceAttribute.cs b/mcs/class/System.Web/System.Web.UI/TemplateInstanceAttribute.cs
index b09b69a0eb2..282915e2fd5 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateInstanceAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateInstanceAttribute.cs
@@ -23,8 +23,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.ComponentModel;
using System.Security.Permissions;
@@ -88,5 +86,3 @@ namespace System.Web.UI
#endregion
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/TemplatePropertyEntry.cs b/mcs/class/System.Web/System.Web.UI/TemplatePropertyEntry.cs
index 391145a1305..f58c8ee7eb5 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplatePropertyEntry.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplatePropertyEntry.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI
{
public class TemplatePropertyEntry : BuilderPropertyEntry
@@ -40,4 +39,3 @@ namespace System.Web.UI
public bool BindableTemplate { get { throw new NotImplementedException (); } }
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ThemeProvider.cs b/mcs/class/System.Web/System.Web.UI/ThemeProvider.cs
index f9be3569b71..3bd49437a30 100644
--- a/mcs/class/System.Web/System.Web.UI/ThemeProvider.cs
+++ b/mcs/class/System.Web/System.Web.UI/ThemeProvider.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2006 Novell, Inc (http://www.novell.com)
+// (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,15 +26,13 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
public sealed class ThemeProvider
{
IDesignerHost host;
@@ -93,5 +91,3 @@ namespace System.Web.UI {
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ThemeableAttribute.cs b/mcs/class/System.Web/System.Web.UI/ThemeableAttribute.cs
index 184e446469a..6dc7d59728d 100644
--- a/mcs/class/System.Web/System.Web.UI/ThemeableAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/ThemeableAttribute.cs
@@ -5,7 +5,7 @@
// Sanjay Gupta (gsanjay@novell.com)
//
// (C) 2004 Novell, Inc. (http://www.novell.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,17 +27,15 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.ComponentModel;
using System.Security.Permissions;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
- [AttributeUsage (AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
+ [AttributeUsage (AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public sealed class ThemeableAttribute : Attribute {
bool themeable;
@@ -92,4 +90,3 @@ namespace System.Web.UI {
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ToolboxDataAttribute.cs b/mcs/class/System.Web/System.Web.UI/ToolboxDataAttribute.cs
index bf7744c0f32..3f328df289a 100644
--- a/mcs/class/System.Web/System.Web.UI/ToolboxDataAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/ToolboxDataAttribute.cs
@@ -24,18 +24,18 @@
// Authors:
// Jackson Harper (jackson@ximian.com)
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
using System.Security.Permissions;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
[AttributeUsage(AttributeTargets.Class)]
- public sealed class ToolboxDataAttribute : Attribute {
-
+ public sealed class ToolboxDataAttribute : Attribute
+ {
public static readonly ToolboxDataAttribute Default = new ToolboxDataAttribute (String.Empty);
string data;
@@ -66,11 +66,7 @@ namespace System.Web.UI {
public override bool IsDefaultAttribute ()
{
-#if NET_2_0
return ((data == null) || (data.Length == 0));
-#else
- return ((data != null) && (data.Length == 0));
-#endif
}
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/Triplet.cs b/mcs/class/System.Web/System.Web.UI/Triplet.cs
index f27de1fd5cc..7175b6cda73 100644
--- a/mcs/class/System.Web/System.Web.UI/Triplet.cs
+++ b/mcs/class/System.Web/System.Web.UI/Triplet.cs
@@ -4,7 +4,7 @@
// Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -32,13 +32,9 @@ namespace System.Web.UI {
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_2_0
[Serializable]
- public sealed class Triplet {
-#else
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public class Triplet {
-#endif
+ public sealed class Triplet
+ {
public object First;
public object Second;
public object Third;
diff --git a/mcs/class/System.Web/System.Web.UI/UnknownAttributeDescriptor.cs b/mcs/class/System.Web/System.Web.UI/UnknownAttributeDescriptor.cs
index 3202d02d089..9a818293e6b 100644
--- a/mcs/class/System.Web/System.Web.UI/UnknownAttributeDescriptor.cs
+++ b/mcs/class/System.Web/System.Web.UI/UnknownAttributeDescriptor.cs
@@ -4,7 +4,7 @@
// Authors:
// Marek Habersack <mhabersack@novell.com>
//
-// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2007-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Reflection;
@@ -43,4 +42,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/UrlPropertyAttribute.cs b/mcs/class/System.Web/System.Web.UI/UrlPropertyAttribute.cs
index b26b55f495f..8888c2e1768 100644
--- a/mcs/class/System.Web/System.Web.UI/UrlPropertyAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/UrlPropertyAttribute.cs
@@ -5,7 +5,7 @@
// Sanjay Gupta (gsanjay@novell.com)
// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,20 +27,18 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.ComponentModel;
-namespace System.Web.UI {
-
- [AttributeUsage (AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
+namespace System.Web.UI
+{
+ [AttributeUsage (AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public sealed class UrlPropertyAttribute : Attribute
{
string filter;
public UrlPropertyAttribute ()
: this ("*.*")
- {
+ {
}
public UrlPropertyAttribute (string filter)
@@ -65,7 +63,7 @@ namespace System.Web.UI {
public override int GetHashCode ()
{
return this.filter.GetHashCode ();
- }
+ }
}
}
-#endif
+
diff --git a/mcs/class/System.Web/System.Web.UI/UrlTypes.cs b/mcs/class/System.Web/System.Web.UI/UrlTypes.cs
index 6fd54304e6f..01c7640c2cc 100644
--- a/mcs/class/System.Web/System.Web.UI/UrlTypes.cs
+++ b/mcs/class/System.Web/System.Web.UI/UrlTypes.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,15 +27,15 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-namespace System.Web.UI {
+namespace System.Web.UI
+{
[FlagsAttribute, SerializableAttribute]
- public enum UrlTypes {
+ public enum UrlTypes
+ {
Absolute = 1,
AppRelative = 2,
DocRelative = 4,
RootRelative = 8
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/UserControl.cs b/mcs/class/System.Web/System.Web.UI/UserControl.cs
index dd472ddbd6e..d10173417b5 100644
--- a/mcs/class/System.Web/System.Web.UI/UserControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/UserControl.cs
@@ -6,7 +6,7 @@
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2002 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -35,8 +35,8 @@ using System.Security.Permissions;
using System.Web.Caching;
using System.Web.SessionState;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
@@ -46,19 +46,10 @@ namespace System.Web.UI {
[ToolboxItem (false)]
[Designer ("System.Web.UI.Design.UserControlDesigner, " + Consts.AssemblySystem_Design, typeof (IDesigner))]
[ParseChildren (true)]
-#if NET_2_0
[Designer ("Microsoft.VisualStudio.Web.WebForms.WebFormDesigner, " + Consts.AssemblyMicrosoft_VisualStudio_Web, typeof (IRootDesigner))]
-#else
- [RootDesignerSerializer ("Microsoft.VSDesigner.WebForms.RootCodeDomSerializer, " + Consts.AssemblyMicrosoft_VSDesigner, "System.ComponentModel.Design.Serialization.CodeDomSerializer, " + Consts.AssemblySystem_Design, true)]
-#endif
- public class UserControl : TemplateControl, IAttributeAccessor, IUserControlDesignerAccessor
-#if NET_2_0
- , INamingContainer, IFilterResolutionService, INonBindingContainer
-#endif
+ public class UserControl : TemplateControl, IAttributeAccessor, IUserControlDesignerAccessor, INamingContainer, IFilterResolutionService, INonBindingContainer
{
-#if NET_2_0
ControlCachePolicy cachePolicy;
-#endif
bool initialized;
AttributeCollection attributes;
StateBag attrBag;
@@ -111,7 +102,6 @@ namespace System.Web.UI {
}
}
-#if NET_2_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
public ControlCachePolicy CachePolicy
@@ -127,7 +117,6 @@ namespace System.Web.UI {
return cachePolicy;
}
}
-#endif
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
@@ -243,12 +232,7 @@ namespace System.Web.UI {
}
-#if NET_2_0
- protected internal
-#else
- protected
-#endif
- override void OnInit (EventArgs e)
+ protected internal override void OnInit (EventArgs e)
{
InitializeAsUserControl (Page);
@@ -300,7 +284,7 @@ namespace System.Web.UI {
}
set { ViewState["!DesignTimeTagName"] = value; }
}
-#if NET_2_0
+
[MonoTODO ("Not implemented")]
int IFilterResolutionService.CompareFilters (string filter1, string filter2)
{
@@ -312,6 +296,5 @@ namespace System.Web.UI {
{
throw new NotImplementedException ();
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/UserControlControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/UserControlControlBuilder.cs
index 3b28e011287..3053fa48e8a 100644
--- a/mcs/class/System.Web/System.Web.UI/UserControlControlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/UserControlControlBuilder.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2003 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,8 +29,8 @@
using System.Security.Permissions;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
@@ -46,11 +46,10 @@ namespace System.Web.UI {
{
// Do something with the text
}
-#if NET_2_0
+
public override object BuildObject ()
{
return base.BuildObject ();
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/UserControlParser.cs b/mcs/class/System.Web/System.Web.UI/UserControlParser.cs
index 9edf2fdd006..05cfb841c1d 100644
--- a/mcs/class/System.Web/System.Web.UI/UserControlParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/UserControlParser.cs
@@ -38,33 +38,9 @@ namespace System.Web.UI
{
internal class UserControlParser : TemplateControlParser
{
-#if NET_2_0
string masterPage;
-#endif
-#if !NET_2_0
- internal UserControlParser (string virtualPath, string inputFile, HttpContext context)
- : this (virtualPath, inputFile, context, null)
- {
- }
-
- internal UserControlParser (string virtualPath, string inputFile, ArrayList deps, HttpContext context)
- : this (virtualPath, inputFile, context, null)
- {
- this.Dependencies = deps;
- }
-
- internal UserControlParser (string virtualPath, string inputFile, HttpContext context, string type)
- {
- Context = context;
- BaseVirtualDir = VirtualPathUtility.GetDirectory (virtualPath, false);
- InputFile = inputFile;
- SetBaseType (type);
- AddApplicationAssembly ();
- }
-
-#else
internal UserControlParser (VirtualPath virtualPath, string inputFile, HttpContext context)
: this (virtualPath, inputFile, context, null)
{
@@ -132,25 +108,18 @@ namespace System.Web.UI
UserControlParser ucp = new UserControlParser (reader, inputHashCode, context);
return ucp.CompileIntoType ();
}
-#endif
internal static Type GetCompiledType (string virtualPath, string inputFile, ArrayList deps, HttpContext context)
{
-#if NET_2_0
UserControlParser ucp = new UserControlParser (new VirtualPath (virtualPath), inputFile, deps, context);
-#else
- UserControlParser ucp = new UserControlParser (virtualPath, inputFile, deps, context);
-#endif
+
return ucp.CompileIntoType ();
}
public static Type GetCompiledType (string virtualPath, string inputFile, HttpContext context)
{
-#if NET_2_0
UserControlParser ucp = new UserControlParser (new VirtualPath (virtualPath), inputFile, context);
-#else
- UserControlParser ucp = new UserControlParser (virtualPath, inputFile, context);
-#endif
+
return ucp.CompileIntoType ();
}
@@ -162,34 +131,24 @@ namespace System.Web.UI
internal override void ProcessMainAttributes (Hashtable atts)
{
-#if NET_2_0
masterPage = GetString (atts, "MasterPageFile", null);
if (masterPage != null)
AddDependency (masterPage);
-#endif
base.ProcessMainAttributes (atts);
}
-#if NET_2_0
internal override string DefaultBaseTypeName {
get { return PagesConfig.UserControlBaseType; }
}
-#else
- internal override string DefaultBaseTypeName {
- get { return "System.Web.UI.UserControl"; }
- }
-#endif
+
internal override string DefaultDirectiveName {
get { return "control"; }
}
-#if NET_2_0
internal string MasterPageFile {
get { return masterPage; }
}
-#endif
-
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/VerificationAttribute.cs b/mcs/class/System.Web/System.Web.UI/VerificationAttribute.cs
index b021b3fca71..2001c52ae96 100644
--- a/mcs/class/System.Web/System.Web.UI/VerificationAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/VerificationAttribute.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI
{
[AttributeUsageAttribute (AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true)]
@@ -111,4 +110,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/VerificationConditionalOperator.cs b/mcs/class/System.Web/System.Web.UI/VerificationConditionalOperator.cs
index 558e8dea688..7a0cd892086 100644
--- a/mcs/class/System.Web/System.Web.UI/VerificationConditionalOperator.cs
+++ b/mcs/class/System.Web/System.Web.UI/VerificationConditionalOperator.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,12 +27,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-namespace System.Web.UI {
- public enum VerificationConditionalOperator {
+namespace System.Web.UI
+{
+ public enum VerificationConditionalOperator
+ {
Equals = 0,
NotEquals = 1
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/VerificationReportLevel.cs b/mcs/class/System.Web/System.Web.UI/VerificationReportLevel.cs
index 74d9553d9cc..5ca97a07b3f 100644
--- a/mcs/class/System.Web/System.Web.UI/VerificationReportLevel.cs
+++ b/mcs/class/System.Web/System.Web.UI/VerificationReportLevel.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,13 +27,13 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-namespace System.Web.UI {
- public enum VerificationReportLevel {
+namespace System.Web.UI
+{
+ public enum VerificationReportLevel
+ {
Error = 0,
Warning = 1,
Guideline = 2
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/VerificationRule.cs b/mcs/class/System.Web/System.Web.UI/VerificationRule.cs
index a03e2cb167a..f5f9f4b8ee4 100644
--- a/mcs/class/System.Web/System.Web.UI/VerificationRule.cs
+++ b/mcs/class/System.Web/System.Web.UI/VerificationRule.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,13 +27,13 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-namespace System.Web.UI {
- public enum VerificationRule {
+namespace System.Web.UI
+{
+ public enum VerificationRule
+ {
Required = 0,
Prohibited = 1,
NotEmptyString = 2
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ViewStateEncryptionMode.cs b/mcs/class/System.Web/System.Web.UI/ViewStateEncryptionMode.cs
index 2ad97d589ed..03593a04b43 100644
--- a/mcs/class/System.Web/System.Web.UI/ViewStateEncryptionMode.cs
+++ b/mcs/class/System.Web/System.Web.UI/ViewStateEncryptionMode.cs
@@ -4,7 +4,7 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -28,8 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
namespace System.Web.UI
{
public enum ViewStateEncryptionMode
@@ -39,5 +37,3 @@ namespace System.Web.UI
Never
}
}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ViewStateException.cs b/mcs/class/System.Web/System.Web.UI/ViewStateException.cs
index 91f8312ff95..926d6453306 100644
--- a/mcs/class/System.Web/System.Web.UI/ViewStateException.cs
+++ b/mcs/class/System.Web/System.Web.UI/ViewStateException.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Runtime.Serialization;
namespace System.Web.UI
@@ -84,4 +83,3 @@ namespace System.Web.UI
}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ViewStateModeByIdAttribute.cs b/mcs/class/System.Web/System.Web.UI/ViewStateModeByIdAttribute.cs
index 6d52be1e277..e10c2ac41b8 100644
--- a/mcs/class/System.Web/System.Web.UI/ViewStateModeByIdAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/ViewStateModeByIdAttribute.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
namespace System.Web.UI
{
[AttributeUsageAttribute (AttributeTargets.Class)]
@@ -38,4 +37,3 @@ namespace System.Web.UI
{}
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/VirtualReferenceType.cs b/mcs/class/System.Web/System.Web.UI/VirtualReferenceType.cs
index 21e8e9d1617..8c7f349af68 100644
--- a/mcs/class/System.Web/System.Web.UI/VirtualReferenceType.cs
+++ b/mcs/class/System.Web/System.Web.UI/VirtualReferenceType.cs
@@ -4,7 +4,7 @@
// Author:
// Chris Toshok <toshok@ximian.com>
//
-// (c) 2006 Novell
+// (c) 2006-2010 Novell
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,9 +26,10 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-namespace System.Web.UI {
- public enum VirtualReferenceType {
+namespace System.Web.UI
+{
+ public enum VirtualReferenceType
+ {
Page,
UserControl,
Master,
@@ -36,4 +37,3 @@ namespace System.Web.UI {
Other
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/WebHandlerParser.cs b/mcs/class/System.Web/System.Web.UI/WebHandlerParser.cs
index 46f147a1e1d..2841cec16cd 100644
--- a/mcs/class/System.Web/System.Web.UI/WebHandlerParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/WebHandlerParser.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2003 Ximian, Inc (http://www.ximian.com)
-// (C) 2008 Novell, Inc (http://novell.com/)
+// (C) 2008-2010 Novell, Inc (http://novell.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -41,7 +41,6 @@ namespace System.Web.UI
{
}
-#if NET_2_0
internal WebHandlerParser (HttpContext context, VirtualPath virtualPath, TextReader reader)
: this (context, virtualPath, null, reader)
{
@@ -51,7 +50,6 @@ namespace System.Web.UI
: base (context, virtualPath.Original, physicalPath, reader)
{
}
-#endif
public static Type GetCompiledType (HttpContext context, string virtualPath, string physicalPath)
{
diff --git a/mcs/class/System.Web/System.Web.UI/WebResourceAttribute.cs b/mcs/class/System.Web/System.Web.UI/WebResourceAttribute.cs
index bda53b023b6..71b328f5148 100644
--- a/mcs/class/System.Web/System.Web.UI/WebResourceAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/WebResourceAttribute.cs
@@ -5,7 +5,7 @@
// Ben Maurer (bmaurer@users.sourceforge.net)
//
// (C) 2003 Ben Maurer
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -30,13 +30,8 @@
namespace System.Web.UI {
[AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
-#if NET_2_0
- public
-#else
- internal
-#endif
- sealed class WebResourceAttribute : Attribute {
-
+ public sealed class WebResourceAttribute : Attribute
+ {
public WebResourceAttribute (string webResource, string contentType)
{
this.webResource = webResource;
diff --git a/mcs/class/System.Web/System.Web.UI/WebServiceParser.cs b/mcs/class/System.Web/System.Web.UI/WebServiceParser.cs
index c6b44ebd9f9..8a2e62cc805 100644
--- a/mcs/class/System.Web/System.Web.UI/WebServiceParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/WebServiceParser.cs
@@ -5,7 +5,7 @@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2002 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -31,8 +31,8 @@ using System.IO;
using System.Security.Permissions;
using System.Web.Compilation;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
@@ -43,7 +43,6 @@ namespace System.Web.UI {
{
}
-#if NET_2_0
internal WebServiceParser (HttpContext context, VirtualPath virtualPath, TextReader reader)
: this (context, virtualPath, null, reader)
{
@@ -53,28 +52,10 @@ namespace System.Web.UI {
: base (context, virtualPath.Original, physicalPath, reader)
{
}
-#endif
public static Type GetCompiledType (string inputFile, HttpContext context)
{
-#if NET_2_0
return BuildManager.GetCompiledType (inputFile);
-#else
- string physPath;
- HttpRequest req = context != null ? context.Request : null;
-
- if (req != null)
- physPath = req.MapPath (inputFile);
- else // likely to fail
- physPath = inputFile;
-
- WebServiceParser parser = new WebServiceParser (context, inputFile, physPath);
- Type type = parser.GetCompiledTypeFromCache ();
- if (type != null)
- return type;
-
- return WebServiceCompiler.CompileIntoType (parser);
-#endif
}
protected override string DefaultDirectiveName {
diff --git a/mcs/class/System.Web/System.Web.UI/XPathBinder.cs b/mcs/class/System.Web/System.Web.UI/XPathBinder.cs
index 52a69088b8b..135edad6a4b 100644
--- a/mcs/class/System.Web/System.Web.UI/XPathBinder.cs
+++ b/mcs/class/System.Web/System.Web.UI/XPathBinder.cs
@@ -28,15 +28,16 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
using System.Text;
using System.Xml.XPath;
using System.Xml;
-namespace System.Web.UI {
- public sealed class XPathBinder {
+namespace System.Web.UI
+{
+ public sealed class XPathBinder
+ {
XPathBinder ()
{
}
@@ -115,5 +116,4 @@ namespace System.Web.UI {
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/XhtmlMobileDocType.cs b/mcs/class/System.Web/System.Web.UI/XhtmlMobileDocType.cs
index 7344d709e7f..c7d57d8c44b 100644
--- a/mcs/class/System.Web/System.Web.UI/XhtmlMobileDocType.cs
+++ b/mcs/class/System.Web/System.Web.UI/XhtmlMobileDocType.cs
@@ -4,7 +4,7 @@
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,13 +27,13 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-namespace System.Web.UI {
- public enum XhtmlMobileDocType {
+namespace System.Web.UI
+{
+ public enum XhtmlMobileDocType
+ {
XhtmlBasic = 0,
XhtmlMobileProfile = 1,
Wml20 = 2
}
}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/XhtmlTextWriter.cs b/mcs/class/System.Web/System.Web.UI/XhtmlTextWriter.cs
index 5b2d56b7a13..883d887c476 100644
--- a/mcs/class/System.Web/System.Web.UI/XhtmlTextWriter.cs
+++ b/mcs/class/System.Web/System.Web.UI/XhtmlTextWriter.cs
@@ -6,7 +6,7 @@
//
//
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006-2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,13 +28,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.IO;
using System.Collections;
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
public class XhtmlTextWriter : HtmlTextWriter
{
static Hashtable default_common_attrs;
@@ -264,5 +262,3 @@ namespace System.Web.UI {
}
}
}
-
-#endif