Author: gonzalo
Date: 2005-03-14 20:01:38 -0500 (Mon, 14 Mar 2005)
New Revision: 41813

Added:
   
trunk/mcs/class/System.Web/System.Web.Configuration/BuildProviderCollection.cs
   
trunk/mcs/class/System.Web/System.Web.Configuration/CodeSubDirectoriesCollection.cs
   trunk/mcs/class/System.Web/System.Web.Configuration/CodeSubDirectory.cs
   trunk/mcs/class/System.Web/System.Web.Configuration/CompilationSection.cs
   trunk/mcs/class/System.Web/System.Web.Configuration/Compiler.cs
   trunk/mcs/class/System.Web/System.Web.Configuration/ExpressionBuilder.cs
   
trunk/mcs/class/System.Web/System.Web.Configuration/ExpressionBuilderCollection.cs
Removed:
   trunk/mcs/class/System.Web/System.Web.Configuration/WebCompiler.cs
Modified:
   trunk/mcs/class/System.Web/ChangeLog
   trunk/mcs/class/System.Web/System.Web.Configuration/ChangeLog
   
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs
   
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs
   trunk/mcs/class/System.Web/System.Web.Configuration/CompilerCollection.cs
   trunk/mcs/class/System.Web/System.Web.dll.sources
Log:
2005-03-14 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>

        * System.Web.dll.sources: added new files in System.Web.Configuration.

        * System.Web.Configuration/CodeSubDirectoriesCollection.cs:
        * System.Web.Configuration/ExpressionBuilderCollection.cs:
        * System.Web.Configuration/BuildProviderCollection.cs:
        * System.Web.Configuration/CompilerCollection.cs:
        * System.Web.Configuration/CompilationConfigurationHandler.cs:
        * System.Web.Configuration/ExpressionBuilder.cs:
        * System.Web.Configuration/Compiler.cs:
        * System.Web.Configuration/CompilationSection.cs:
        * System.Web.Configuration/CompilationConfiguration.cs:
        * System.Web.Configuration/CodeSubDirectory.cs: added and implemented
        most of these files that are used when reading configuration files in
        NET_2_0.

        * System.Web.Configuration/WebCompiler.cs: renamed to Compiler.cs



Modified: trunk/mcs/class/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/ChangeLog        2005-03-14 23:14:02 UTC (rev 
41812)
+++ trunk/mcs/class/System.Web/ChangeLog        2005-03-15 01:01:38 UTC (rev 
41813)
@@ -1,3 +1,7 @@
+2005-03-14 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * System.Web.dll.sources: added new files in System.Web.Configuration.
+
 2005-03-11  Lluis Sanchez Gual <[EMAIL PROTECTED]>
 
        * Makefile: Added new resource file: GridView.js.

Added: 
trunk/mcs/class/System.Web/System.Web.Configuration/BuildProviderCollection.cs
===================================================================
--- 
trunk/mcs/class/System.Web/System.Web.Configuration/BuildProviderCollection.cs  
    2005-03-14 23:14:02 UTC (rev 41812)
+++ 
trunk/mcs/class/System.Web/System.Web.Configuration/BuildProviderCollection.cs  
    2005-03-15 01:01:38 UTC (rev 41813)
@@ -0,0 +1,103 @@
+//
+// System.Web.Configuration.BuildProviderCollection
+//
+// Authors:
+//     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
+//
+// (c) Copyright 2005 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections;
+using System.Configuration;
+
+namespace System.Web.Configuration
+{
+       public sealed class BuildProviderCollection : 
ConfigurationElementCollection
+       {
+               static ConfigurationPropertyCollection props;
+
+               static BuildProviderCollection ()
+               {
+                       //FIXME: add properties
+                       props = new ConfigurationPropertyCollection ();
+               }
+
+               public BuildProvider this [int index] {
+                       get { return (BuildProvider) BaseGet (index); }
+                       set {
+                               if (BaseGet (index) != null)
+                                       BaseRemoveAt (index);
+
+                               BaseAdd (index, value);
+                       }
+               }
+
+               public new BuildProvider this [string name] {
+                       get { return (BuildProvider) BaseGet (name); }
+               }
+
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return props; }
+               }
+
+               public void Add (BuildProvider buildProvider)
+               {
+                       BaseAdd (buildProvider);
+               }
+
+               public void Clear ()
+               {
+                       BaseClear ();
+               }
+
+               public void Remove (string name)
+               {
+                       BaseRemove (name);
+               }
+
+               public void RemoveAt (int index)
+               {
+                       BaseRemoveAt (index);
+               }
+
+               protected override bool CompareKeys (object key1, object key2)
+               {
+                       return (0 == CaseInsensitiveComparer.Default.Compare 
((string) key1, (string) key2));
+               }
+
+               protected override ConfigurationElement CreateNewElement ()
+               {
+                       return new BuildProvider ();
+               }
+
+               protected override object GetElementKey (ConfigurationElement 
element)
+               {
+                       BuildProvider prov = (BuildProvider) element;
+                       return prov.Extension;
+               }
+       }
+}
+#endif // NET_2_0
+

Modified: trunk/mcs/class/System.Web/System.Web.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration/ChangeLog       
2005-03-14 23:14:02 UTC (rev 41812)
+++ trunk/mcs/class/System.Web/System.Web.Configuration/ChangeLog       
2005-03-15 01:01:38 UTC (rev 41813)
@@ -1,3 +1,20 @@
+2005-03-14 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * CodeSubDirectoriesCollection.cs:
+       * ExpressionBuilderCollection.cs:
+       * BuildProviderCollection.cs:
+       * CompilerCollection.cs:
+       * CompilationConfigurationHandler.cs:
+       * ExpressionBuilder.cs:
+       * Compiler.cs:
+       * CompilationSection.cs:
+       * CompilationConfiguration.cs:
+       * CodeSubDirectory.cs: added and implemented
+       most of these files that are used when reading configuration files in
+       NET_2_0.
+
+       * WebCompiler.cs: renamed to Compiler.cs
+
 2004-12-15 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * WebConfigurationSettings.cs: correctly detect web.config changes.

Added: 
trunk/mcs/class/System.Web/System.Web.Configuration/CodeSubDirectoriesCollection.cs
===================================================================
--- 
trunk/mcs/class/System.Web/System.Web.Configuration/CodeSubDirectoriesCollection.cs
 2005-03-14 23:14:02 UTC (rev 41812)
+++ 
trunk/mcs/class/System.Web/System.Web.Configuration/CodeSubDirectoriesCollection.cs
 2005-03-15 01:01:38 UTC (rev 41813)
@@ -0,0 +1,92 @@
+//
+// System.Web.Configuration.CodeSubDirectoriesCollection
+//
+// Authors:
+//     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
+//
+// (c) Copyright 2005 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections;
+using System.Configuration;
+
+namespace System.Web.Configuration
+{
+       public sealed class CodeSubDirectoriesCollection : 
ConfigurationElementCollection
+       {
+               static ConfigurationPropertyCollection props;
+
+               static CodeSubDirectoriesCollection ()
+               {
+                       //FIXME: add properties
+                       props = new ConfigurationPropertyCollection ();
+               }
+
+               public CodeSubDirectory this [int index] {
+                       get { return (CodeSubDirectory) BaseGet (index); }
+                       set {
+                               if (BaseGet (index) != null)
+                                       BaseRemoveAt (index);
+
+                               BaseAdd (index, value);
+                       }
+               }
+
+               protected override ConfigurationElementCollectionType 
CollectionType {
+                       get { return 
ConfigurationElementCollectionType.AddRemoveClearMap; }
+               }
+
+               protected override string ElementName {
+                       get { return "add"; }
+               }
+
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return props; }
+               }
+
+               public void Add (CodeSubDirectory codeSubDirectory)
+               {
+                       BaseAdd (codeSubDirectory);
+               }
+
+               protected override bool CompareKeys (object key1, object key2)
+               {
+                       return (0 == CaseInsensitiveComparer.Default.Compare 
((string) key1, (string) key2));
+               }
+
+               protected override ConfigurationElement CreateNewElement ()
+               {
+                       return new CodeSubDirectory ();
+               }
+
+               protected override object GetElementKey (ConfigurationElement 
element)
+               {
+                       CodeSubDirectory sd = (CodeSubDirectory) element;
+                       return sd.DirectoryName;
+               }
+       }
+}
+#endif // NET_2_0
+

Added: trunk/mcs/class/System.Web/System.Web.Configuration/CodeSubDirectory.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration/CodeSubDirectory.cs     
2005-03-14 23:14:02 UTC (rev 41812)
+++ trunk/mcs/class/System.Web/System.Web.Configuration/CodeSubDirectory.cs     
2005-03-15 01:01:38 UTC (rev 41813)
@@ -0,0 +1,61 @@
+//
+// System.Web.Configuration.CodeSubDirectory
+//
+// Authors:
+//     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
+//
+// (c) Copyright 2005 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Configuration;
+
+namespace System.Web.Configuration
+{
+       public sealed class CodeSubDirectory : ConfigurationElement
+       {
+               static ConfigurationPropertyCollection props;
+               string directoryName;
+
+               static CodeSubDirectory ()
+               {
+                       props = new ConfigurationPropertyCollection ();
+                       ConfigurationPropertyFlags flags = 
ConfigurationPropertyFlags.IsKey | ConfigurationPropertyFlags.Required;
+                       NonEmptyStringFlags strFlags = 
NonEmptyStringFlags.TrimWhitespace;
+                       ConfigurationProperty prop = new 
NonEmptyStringConfigurationProperty ("directoryName", "", flags, strFlags);
+                       props.Add (prop);
+               }
+
+               public string DirectoryName {
+                       get { return directoryName; }
+                       set { directoryName = value; }
+               }
+
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return props; }
+               }
+       }
+}
+#endif // NET_2_0
+

Modified: 
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs
===================================================================
--- 
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs 
    2005-03-14 23:14:02 UTC (rev 41812)
+++ 
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs 
    2005-03-15 01:01:38 UTC (rev 41813)
@@ -87,7 +87,7 @@
                
                public CodeDomProvider GetProvider (string language)
                {
-                       WebCompiler compiler = Compilers [language];
+                       Compiler compiler = Compilers [language];
                        if (compiler == null)
                                return null;
 
@@ -101,7 +101,7 @@
 
                public string GetCompilerOptions (string language)
                {
-                       WebCompiler compiler = Compilers [language];
+                       Compiler compiler = Compilers [language];
                        if (compiler == null)
                                return null;
 
@@ -110,7 +110,7 @@
 
                public int GetWarningLevel (string language)
                {
-                       WebCompiler compiler = Compilers [language];
+                       Compiler compiler = Compilers [language];
                        if (compiler == null)
                                return 0;
 
@@ -129,7 +129,11 @@
                        num_recompiles_before_app_restart = 
parent.num_recompiles_before_app_restart;
                        strict = parent.strict;
                        temp_directory = parent.temp_directory;
+#if !NET_2_0
                        compilers = new CompilerCollection (parent.compilers);
+#else
+                       compilers = new CompilerCollection ();
+#endif
                        ArrayList p = parent.assemblies;
                        assembliesInBin = parent.assembliesInBin;
                        ICollection coll = (p == null) ? (ICollection) new 
object [0] : p;

Modified: 
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs
===================================================================
--- 
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs
      2005-03-14 23:14:02 UTC (rev 41812)
+++ 
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs
      2005-03-15 01:01:38 UTC (rev 41813)
@@ -91,13 +91,16 @@
                                if (child.Name != "compiler")
                                        ThrowException ("Unexpected element", 
child);
 
-                               WebCompiler compiler = new WebCompiler ();
-                               compiler.Languages = AttValue ("language", 
child);
-                               compiler.Extension = AttValue ("extension", 
child);
+                               Compiler compiler = new Compiler ();
+#if !NET_2_0
+// Removing this for 2.0 is a hack until the whole config. system is migrated 
to 2.0
+                               compiler.Language  = AttValue ("language", 
child);
+                               compiler.Extension  = AttValue ("extension", 
child);
                                compiler.Type = AttValue ("type", child);
                                compiler.CompilerOptions = AttValue 
("compilerOptions", child, true, true);
                                compiler.WarningLevel = AttUIntValue 
("warningLevel", child, 0);
-                               config.Compilers [compiler.Languages] = 
compiler;
+#endif
+                               config.Compilers [compiler.Language] = compiler;
                        }
                }
 

Added: trunk/mcs/class/System.Web/System.Web.Configuration/CompilationSection.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration/CompilationSection.cs   
2005-03-14 23:14:02 UTC (rev 41812)
+++ trunk/mcs/class/System.Web/System.Web.Configuration/CompilationSection.cs   
2005-03-15 01:01:38 UTC (rev 41813)
@@ -0,0 +1,187 @@
+//
+// System.Web.Configuration.CompilationSection
+//
+// Authors:
+//     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
+//
+// (c) Copyright 2005 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Configuration;
+using System.ComponentModel;
+
+namespace System.Web.Configuration
+{
+       public sealed class CompilationSection : InternalSection
+       {
+               static ConfigurationPropertyCollection props;
+               static ConfigurationProperty compilers;
+               static ConfigurationProperty tempDirectory;
+               static ConfigurationProperty debug;
+               static ConfigurationProperty strict;
+               static ConfigurationProperty _explicit;
+               static ConfigurationProperty batch;
+               static ConfigurationProperty batchTimeout;
+               static ConfigurationProperty maxBatchSize;
+               static ConfigurationProperty maxBatchGeneratedFileSize;
+               static ConfigurationProperty numRecompilesBeforeAppRestart;
+               static ConfigurationProperty defaultLanguage;
+               static ConfigurationProperty assemblies;
+               static ConfigurationProperty buildProviders;
+               static ConfigurationProperty expressionBuilders;
+               static ConfigurationProperty urlLinePragmas;
+               static ConfigurationProperty codeSubDirectories;
+
+               static CompilationSection ()
+               {
+                       props = new ConfigurationPropertyCollection ();
+                       Type strType = typeof (string);
+                       TypeConverter strTypeConv = new StringConverter ();
+                       Type boolType = typeof (bool);
+                       TypeConverter boolTypeConv = new BooleanConverter ();
+                       Type intType = typeof (int);
+                       TypeConverter intTypeConv = new Int32Converter ();
+
+                       assemblies = new ConfigurationProperty ("assemblies", 
typeof (AssemblyCollection), 0);
+                       props.Add (assemblies);
+                       batch = new ConfigurationProperty ("batch", boolType, 
true, boolTypeConv, null, 0);
+                       props.Add (batch);
+                       buildProviders = new ConfigurationProperty 
("buidProviders", typeof (BuildProviderCollection), 0);
+                       props.Add (buildProviders);
+                       batchTimeout = new ConfigurationProperty 
("batchTimeout", typeof (TimeSpan), new TimeSpan (0, 15, 0),
+                                                       new TimeSpanConverter 
(), null, 0);
+                       props.Add (batchTimeout);
+                       codeSubDirectories = new ConfigurationProperty 
("codeSubDirectories", typeof (CodeSubDirectoriesCollection), 0);
+                       props.Add (codeSubDirectories);
+                       compilers = new ConfigurationProperty ("compilers", 
typeof (CompilerCollection), 0);
+                       props.Add (compilers);
+                       debug = new ConfigurationProperty ("debug", boolType, 
false, boolTypeConv, null, 0);
+                       props.Add (debug);
+                       defaultLanguage = new ConfigurationProperty 
("defaultLanguage", strType, "c#", strTypeConv, null, 0);
+                       props.Add (defaultLanguage);
+                       expressionBuilders = new ConfigurationProperty 
("expressionBuilders", typeof (ExpressionBuilderCollection), 0);
+                       props.Add (expressionBuilders);
+                       _explicit = new ConfigurationProperty ("explicit", 
boolType, true, boolTypeConv, null, 0);
+                       props.Add (_explicit);
+                       maxBatchSize = new ConfigurationProperty 
("maxBatchSize", intType, 1000, intTypeConv, null, 0);
+                       props.Add (maxBatchSize);
+                       maxBatchGeneratedFileSize = new ConfigurationProperty 
("maxBatchGeneratedFileSize", intType, 3000, intTypeConv, null, 0);
+                       props.Add (maxBatchGeneratedFileSize);
+                       numRecompilesBeforeAppRestart = new 
ConfigurationProperty ("numRecompilesBeforeAppRestart", intType, 15, 
intTypeConv, null, 0);
+                       props.Add (numRecompilesBeforeAppRestart);
+                       strict = new ConfigurationProperty ("strict", boolType, 
false, boolTypeConv, null, 0);
+                       props.Add (strict);
+                       tempDirectory = new ConfigurationProperty 
("tempDirectory", strType, "", strTypeConv, null, 0);
+                       props.Add (tempDirectory);
+                       urlLinePragmas = new ConfigurationProperty 
("urlLinePragmas", boolType, false, boolTypeConv, null, 0);
+                       props.Add (urlLinePragmas);
+               }
+
+               public CompilationSection ()
+               {
+               }
+
+               public AssemblyCollection Assemblies {
+                       get { return (AssemblyCollection) this [assemblies]; }
+               }
+
+               public bool Batch {
+                       get { return (bool) this [batch]; }
+                       set { this [batch] = value; }
+               }
+
+               public TimeSpan BatchTimeout {
+                       get { return (TimeSpan) this [batchTimeout]; }
+                       set { this [batchTimeout] = value; }
+               }
+
+               public BuildProviderCollection BuildProviders {
+                       get { return (BuildProviderCollection) this 
[buildProviders]; }
+               }
+
+               public CodeSubDirectoriesCollection CodeSubDirectories {
+                       get { return (CodeSubDirectoriesCollection) this 
[codeSubDirectories]; }
+               }
+
+               public CompilerCollection Compilers {
+                       get { return (CompilerCollection) this [compilers]; }
+               }
+
+               public bool Debug {
+                       get { return (bool) this [debug]; }
+                       set { this [debug] = value; }
+               }
+
+               public string DefaultLanguage {
+                       get { return (string) this [defaultLanguage]; }
+                       set { this [defaultLanguage] = value; }
+               }
+
+               public bool Explicit {
+                       get { return (bool) this [_explicit]; }
+                       set { this [_explicit] = value; }
+               }
+
+               public ExpressionBuilderCollection ExpressionBuilders {
+                       get { return (ExpressionBuilderCollection) this 
[expressionBuilders]; }
+               }
+
+               public int MaxBatchGeneratedFileSize {
+                       get { return (int) this [maxBatchGeneratedFileSize]; }
+                       set { this [maxBatchGeneratedFileSize] = value; }
+               }
+
+               public int MaxBatchSize {
+                       get { return (int) this [maxBatchSize]; }
+                       set { this [maxBatchSize] = value; }
+               }
+
+               public int NumRecompilesBeforeAppRestart {
+                       get { return (int) this 
[numRecompilesBeforeAppRestart]; }
+                       set { this [numRecompilesBeforeAppRestart] = value; }
+               }
+
+               public bool Strict {
+                       get { return (bool) this [strict]; }
+                       set { this [strict] = value; }
+               }
+
+               public string TempDirectory {
+                       get { return (string) this [tempDirectory]; }
+                       set { this [tempDirectory] = value; }
+               }
+
+               public bool UrlLinePragmas {
+                       get { return (bool) this [urlLinePragmas]; }
+                       set { this [urlLinePragmas] = value; }
+               }
+
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return props; }
+               }
+       }
+}
+#endif // NET_2_0
+

Added: trunk/mcs/class/System.Web/System.Web.Configuration/Compiler.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration/Compiler.cs     
2005-03-14 23:14:02 UTC (rev 41812)
+++ trunk/mcs/class/System.Web/System.Web.Configuration/Compiler.cs     
2005-03-15 01:01:38 UTC (rev 41813)
@@ -0,0 +1,117 @@
+//
+// System.Web.Configuration.Compiler
+//
+// Authors:
+//     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
+//
+// (C) 2005 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.CodeDom.Compiler;
+using System.Collections;
+using System.Configuration;
+
+namespace System.Web.Configuration
+{
+#if !NET_2_0
+       class Compiler
+       {
+               public string Language;
+               public string Extension;
+               public string Type;
+               public int WarningLevel;
+               public string CompilerOptions;
+               public CodeDomProvider Provider;
+
+               public override string ToString ()
+               {
+                       return "Language: " + Language + "\n" +
+                               "Extension: " + Extension + "\n" +
+                               "Type: " + Type + "\n" +
+                               "WarningLevel: " + WarningLevel + "\n" +
+                               "CompilerOptions: " + CompilerOptions + "\n";
+               }
+       }
+#else // NET_2_0
+       public sealed class Compiler : ConfigurationElement
+       {
+               static ConfigurationPropertyCollection props;
+               static ConfigurationProperty compilerOptions;
+               static ConfigurationProperty extension;
+               static ConfigurationProperty language;
+               static ConfigurationProperty type;
+               static ConfigurationProperty warningLevel;
+
+               CodeDomProvider provider;
+
+               static Compiler ()
+               {
+                       Type strType = typeof (string);
+                       compilerOptions = new ConfigurationProperty 
("compilerOptions", strType, "", 0);
+                       extension = new ConfigurationProperty ("extension", 
strType, "", 0);
+                       language = new ConfigurationProperty ("language", 
strType, "", 0);
+                       ConfigurationPropertyFlags flags = 
ConfigurationPropertyFlags.Required | ConfigurationPropertyFlags.IsKey;
+                       type = new ConfigurationProperty ("type", strType, "", 
flags);
+                       warningLevel = new ConfigurationProperty 
("warningLevel", typeof (int), 0, 0);
+
+                       props = new ConfigurationPropertyCollection ();
+                       props.Add (compilerOptions);
+                       props.Add (extension);
+                       props.Add (language);
+                       props.Add (type);
+                       props.Add (warningLevel);
+               }
+
+               public string CompilerOptions {
+                       get { return (string) this [compilerOptions]; }
+               }
+
+               public string Extension {
+                       get { return (string) this [extension]; }
+               }
+
+               public string Language {
+                       get { return (string) this [language]; }
+               }
+
+               public string Type {
+                       get { return (string) this [type]; }
+               }
+
+               internal CodeDomProvider Provider {
+                       get { return provider; }
+                       set { provider = value; }
+               }
+
+               public int WarningLevel {
+                       get { return (int) this [warningLevel]; }
+               }
+
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return props; }
+               }
+       }
+#endif
+}
+

Modified: 
trunk/mcs/class/System.Web/System.Web.Configuration/CompilerCollection.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration/CompilerCollection.cs   
2005-03-14 23:14:02 UTC (rev 41812)
+++ trunk/mcs/class/System.Web/System.Web.Configuration/CompilerCollection.cs   
2005-03-15 01:01:38 UTC (rev 41813)
@@ -4,7 +4,7 @@
 // Authors:
 //     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
 //
-// (C) 2003 Ximian, Inc (http://www.ximian.com)
+// (C) 2003,2005 Novell, Inc (http://www.novell.com)
 //
 
 //
@@ -30,9 +30,11 @@
 
 using System;
 using System.Collections;
+using System.Configuration;
 
 namespace System.Web.Configuration
 {
+#if !NET_2_0
        sealed class CompilerCollection
        {
                Hashtable compilers;
@@ -50,8 +52,8 @@
                        }
                }
 
-               public WebCompiler this [string language] {
-                       get { return compilers [language] as WebCompiler; }
+               public Compiler this [string language] {
+                       get { return compilers [language] as Compiler; }
                        set {
                                compilers [language] = value;
                                string [] langs = language.Split (';');
@@ -63,5 +65,72 @@
                        }
                }
        }
+#else // NET_2_0
+       public sealed class CompilerCollection : ConfigurationElementCollection
+       {
+               static ConfigurationPropertyCollection props;
+
+               static CompilerCollection ()
+               {
+                       //FIXME: add properties
+                       props = new ConfigurationPropertyCollection ();
+               }
+
+               public string [] AllKeys {
+                       get { return BaseGetAllKeys (); }
+               }
+
+               public Compiler this [int index] {
+                       get { return (Compiler) BaseGet (index); }
+               }
+
+               public new Compiler this [string language] {
+                       get { return (Compiler) BaseGet (language); }
+               }
+
+               protected override ConfigurationElementCollectionType 
CollectionType {
+                       get { return 
ConfigurationElementCollectionType.AddRemoveClearMap; }
+               }
+
+               protected override string ElementName {
+                       get { return "compiler"; }
+               }
+
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return props; }
+               }
+
+               public Compiler Get (int index)
+               {
+                       return (Compiler) BaseGet (index);
+               }
+
+               public Compiler Get (string language)
+               {
+                       return (Compiler) BaseGet (language);
+               }
+
+               public string GetKey (int index)
+               {
+                       return BaseGetKey (index);
+               }
+
+               protected override bool CompareKeys (object key1, object key2)
+               {
+                       return (0 == CaseInsensitiveComparer.Default.Compare 
((string) key1, (string) key2));
+               }
+
+               protected override ConfigurationElement CreateNewElement ()
+               {
+                       return new Compiler ();
+               }
+
+               protected override object GetElementKey (ConfigurationElement 
element)
+               {
+                       Compiler c = (Compiler) element;
+                       return c.Language;
+               }
+       }
+#endif
 }
 

Added: trunk/mcs/class/System.Web/System.Web.Configuration/ExpressionBuilder.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration/ExpressionBuilder.cs    
2005-03-14 23:14:02 UTC (rev 41812)
+++ trunk/mcs/class/System.Web/System.Web.Configuration/ExpressionBuilder.cs    
2005-03-15 01:01:38 UTC (rev 41813)
@@ -0,0 +1,71 @@
+//
+// System.Web.Configuration.ExpressionBuilder
+//
+// Authors:
+//     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
+//
+// (C) 2005 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections;
+using System.Configuration;
+
+namespace System.Web.Configuration
+{
+       public sealed class ExpressionBuilder : ConfigurationElement
+       {
+               static ConfigurationPropertyCollection props;
+               static ConfigurationProperty expressionPrefix;
+               static ConfigurationProperty type;
+
+               static ExpressionBuilder ()
+               {
+                       ConfigurationPropertyFlags flags = 
ConfigurationPropertyFlags.Required | ConfigurationPropertyFlags.IsKey;
+                       type = new NonEmptyStringConfigurationProperty ("type", 
"", flags);
+                       flags = ConfigurationPropertyFlags.Required;
+                       expressionPrefix = new 
NonEmptyStringConfigurationProperty ("expressionPrefix", "", flags);
+
+                       props = new ConfigurationPropertyCollection ();
+                       props.Add (type);
+                       props.Add (expressionPrefix);
+               }
+
+               public string ExpressionPrefix {
+                       get { return (string) this [expressionPrefix]; }
+                       set { this [expressionPrefix] = value; }
+               }
+
+               public string Type {
+                       get { return (string) this [type]; }
+                       set { this [type] = value; }
+               }
+
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return props; }
+               }
+       }
+}
+#endif // NET_2_0
+

Added: 
trunk/mcs/class/System.Web/System.Web.Configuration/ExpressionBuilderCollection.cs
===================================================================
--- 
trunk/mcs/class/System.Web/System.Web.Configuration/ExpressionBuilderCollection.cs
  2005-03-14 23:14:02 UTC (rev 41812)
+++ 
trunk/mcs/class/System.Web/System.Web.Configuration/ExpressionBuilderCollection.cs
  2005-03-15 01:01:38 UTC (rev 41813)
@@ -0,0 +1,105 @@
+//
+// System.Web.Configuration.ExpressionBuilderCollection
+//
+// Authors:
+//     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
+//
+// (c) Copyright 2005 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections;
+using System.Configuration;
+
+namespace System.Web.Configuration
+{
+       public sealed class ExpressionBuilderCollection : 
ConfigurationElementCollection
+       {
+               static ConfigurationPropertyCollection props;
+
+               static ExpressionBuilderCollection ()
+               {
+                       props = new ConfigurationPropertyCollection ();
+                       ConfigurationPropertyFlags flags = 
ConfigurationPropertyFlags.DefaultCollection;
+                       ConfigurationProperty prop = new ConfigurationProperty 
(null, typeof (ExpressionBuilderCollection), null, flags);
+                       props.Add (prop);
+               }
+
+               public ExpressionBuilder this [int index] {
+                       get { return (ExpressionBuilder) BaseGet (index); }
+                       set {
+                               if (BaseGet (index) != null)
+                                       BaseRemoveAt (index);
+
+                               BaseAdd (index, value);
+                       }
+               }
+
+               public new ExpressionBuilder this [string name] {
+                       get { return (ExpressionBuilder) BaseGet (name); }
+               }
+
+               protected override ConfigurationPropertyCollection Properties {
+                       get { return props; }
+               }
+
+               public void Add (ExpressionBuilder buildProvider)
+               {
+                       BaseAdd (buildProvider);
+               }
+
+               public void Clear ()
+               {
+                       BaseClear ();
+               }
+
+               public void Remove (string name)
+               {
+                       BaseRemove (name);
+               }
+
+               public void RemoveAt (int index)
+               {
+                       BaseRemoveAt (index);
+               }
+
+               protected override bool CompareKeys (object key1, object key2)
+               {
+                       return (0 == CaseInsensitiveComparer.Default.Compare 
((string) key1, (string) key2));
+               }
+
+               protected override ConfigurationElement CreateNewElement ()
+               {
+                       return new ExpressionBuilder ();
+               }
+
+               protected override object GetElementKey (ConfigurationElement 
element)
+               {
+                       ExpressionBuilder eb = (ExpressionBuilder) element;
+                       return eb.ExpressionPrefix;
+               }
+       }
+}
+#endif // NET_2_0
+

Deleted: trunk/mcs/class/System.Web/System.Web.Configuration/WebCompiler.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration/WebCompiler.cs  
2005-03-14 23:14:02 UTC (rev 41812)
+++ trunk/mcs/class/System.Web/System.Web.Configuration/WebCompiler.cs  
2005-03-15 01:01:38 UTC (rev 41813)
@@ -1,56 +0,0 @@
-//
-// System.Web.Configuration.WebCompiler
-//
-// Authors:
-//     Gonzalo Paniagua Javier ([EMAIL PROTECTED])
-//
-// (C) 2003 Ximian, Inc (http://www.ximian.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections;
-using System.CodeDom.Compiler;
-
-namespace System.Web.Configuration
-{
-       class WebCompiler
-       {
-               public string Languages;
-               public string Extension;
-               public string Type;
-               public int WarningLevel;
-               public string CompilerOptions;
-               public CodeDomProvider Provider;
-
-               public override string ToString ()
-               {
-                       return "Languages: " + Languages + "\n" +
-                               "Extension: " + Extension + "\n" +
-                               "Type: " + Type + "\n" +
-                               "WarningLevel: " + WarningLevel + "\n" +
-                               "CompilerOptions: " + CompilerOptions + "\n";
-               }
-       }
-}
-

Modified: trunk/mcs/class/System.Web/System.Web.dll.sources
===================================================================
--- trunk/mcs/class/System.Web/System.Web.dll.sources   2005-03-14 23:14:02 UTC 
(rev 41812)
+++ trunk/mcs/class/System.Web/System.Web.dll.sources   2005-03-15 01:01:38 UTC 
(rev 41813)
@@ -48,12 +48,19 @@
 System.Web.Configuration/AuthorizationRuleAction.cs
 System.Web.Configuration/BuildProvider.cs
 System.Web.Configuration/BuildProviderAppliesTo.cs
+System.Web.Configuration/BuildProviderCollection.cs
 System.Web.Configuration/ClientTargetSectionHandler.cs
+System.Web.Configuration/CodeSubDirectoriesCollection.cs
+System.Web.Configuration/CodeSubDirectory.cs
 System.Web.Configuration/CompilationConfiguration.cs
 System.Web.Configuration/CompilationConfigurationHandler.cs
+System.Web.Configuration/CompilationSection.cs
+System.Web.Configuration/Compiler.cs
 System.Web.Configuration/CompilerCollection.cs
 System.Web.Configuration/CustomErrorsConfigHandler.cs
 System.Web.Configuration/CustomErrorsMode.cs
+System.Web.Configuration/ExpressionBuilder.cs
+System.Web.Configuration/ExpressionBuilderCollection.cs
 System.Web.Configuration/FormsAuthenticationConfiguration.cs
 System.Web.Configuration/FormsAuthPasswordFormat.cs
 System.Web.Configuration/FormsProtectionEnum.cs
@@ -88,7 +95,6 @@
 System.Web.Configuration/TraceConfig.cs
 System.Web.Configuration/TraceConfigurationHandler.cs
 System.Web.Configuration/TraceDisplayMode.cs
-System.Web.Configuration/WebCompiler.cs
 System.Web.Configuration/WebConfigurationSettings.cs
 System.Web.Configuration/WebControlsSectionHandler.cs
 System.Web.Handlers/AssemblyResourceLoader.cs

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to