2003-10-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 14 Oct 2003 11:12:47 +0000 (11:12 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 14 Oct 2003 11:12:47 +0000 (11:12 -0000)
* System.Web.dll.sources: new files in System.Web.Configuration.

* System.Web.Configuration/CompilationConfiguration.cs:
* System.Web.Configuration/CompilationConfigurationHandler.cs:
* System.Web.Configuration/CompilerCollection.cs:
* System.Web.Configuration/WebCompiler.cs: new files that process and
store system.web/compilation info (compilers + assemblies).

* System.Web.Configuration/HttpHandlersSectionHandler.cs: added option
for an attribute to be empty.

* System.Web.UI/BaseParser.cs: added CompilationConfig property.

* System.Web.UI/TemplateParser.cs:
* System.Web.UI/SimpleWebHandlerParser.cs: added CompilationConfig
property. Don't hardcode assembly names any more, assemblies in bin
are added depending on the configuration. The default language is
also taken from the configuration.

* System.Web.Compilation/BaseCompiler.cs: now gets the CodeCompiler
from configuration files.

In short, this changes make our ASP.NET support any language
that has CodeDom CodeCompiler and CodeGenerator.

VB.NET currently fails because of its buggy handling of options.

svn path=/trunk/mcs/; revision=19035

13 files changed:
mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
mcs/class/System.Web/System.Web.Compilation/ChangeLog
mcs/class/System.Web/System.Web.Configuration/ChangeLog
mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web.Configuration/CompilerCollection.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web.Configuration/HttpHandlersSectionHandler.cs
mcs/class/System.Web/System.Web.Configuration/WebCompiler.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web.UI/BaseParser.cs
mcs/class/System.Web/System.Web.UI/ChangeLog
mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
mcs/class/System.Web/System.Web.UI/TemplateParser.cs
mcs/class/System.Web/System.Web.dll.sources

index 0fb1e116689a53e6208a2ed9608528e30dfb5c53..6e02f9e0f9d0f3b401b6dbc0ee4e8378f18ee125 100644 (file)
@@ -14,8 +14,7 @@ using System.Collections;
 using System.Reflection;
 using System.Text;
 using System.Web.UI;
-//temp:
-using Microsoft.CSharp;
+using System.Web.Configuration;
 using System.IO;
 
 namespace System.Web.Compilation
@@ -150,14 +149,24 @@ namespace System.Web.Compilation
                                        return a.GetType (mainClassExpr.Type.BaseType, true);
                        }
 
-                       //TODO: get the compiler and default options from system.web/compileroptions
-                       provider = new CSharpCodeProvider ();
+                       string lang = parser.Language;
+                       CompilationConfiguration config;
+
+                       config = CompilationConfiguration.GetInstance (parser.Context);
+                       provider = config.GetProvider (lang);
+                       if (provider == null)
+                               throw new HttpException ("Configuration error. Language not supported: " +
+                                                         lang, 500);
+
                        compiler = provider.CreateCompiler ();
 
                        CreateMethods ();
                        compilerParameters.IncludeDebugInformation = parser.Debug;
                        CompilerResults results = CachingCompiler.Compile (this);
                        CheckCompilerErrors (results);
+                       if (results.CompiledAssembly == null)
+                               throw new CompilationException (parser.InputFile, results.Errors,
+                                       "No assembly returned after compilation!?");
 
                        return results.CompiledAssembly.GetType (mainClassExpr.Type.BaseType, true);
                }
index af15eebfe52e1684c8dba27fb00c6be7e65ddb6e..0aebb66c35fbb29770c2564ec64b3787601347c5 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * System.Web.Compilation/BaseCompiler.cs: now gets the CodeCompiler
+       from configuration files.
+
 2003-10-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * Directive.cs: new attribute for @Page directive in 1.1.
index d9eadcce1efd67a335cee750309a3b31c8699581..133ecf39a6419ce03d859f03d9aec33147b68216 100644 (file)
@@ -1,3 +1,14 @@
+2003-10-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * CompilationConfiguration.cs:
+       * CompilationConfigurationHandler.cs:
+       * CompilerCollection.cs:
+       * WebCompiler.cs: new files that process and store
+       system.web/compilation info (compilers + assemblies).
+
+       * HttpHandlersSectionHandler.cs: added option for an attribute to be
+       empty.
+
 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * WebControlsSectionHandler.cs: new file to handle <webControls>
diff --git a/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs b/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs
new file mode 100644 (file)
index 0000000..5bd499a
--- /dev/null
@@ -0,0 +1,169 @@
+//
+// System.Web.Configuration.CompilationConfiguration
+//
+// Authors:
+//     Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+
+using System;
+using System.CodeDom.Compiler;
+using System.Collections;
+using System.Configuration;
+using System.IO;
+using System.Web;
+using System.Xml;
+
+namespace System.Web.Configuration
+{
+       sealed class CompilationConfiguration
+       {
+               bool debug = false;
+               bool batch = false;
+               int batch_timeout;
+               string default_language = "c#";
+               bool _explicit = true;
+               int max_batch_size = 30;
+               int max_batch_file_size = 3000;
+               int num_recompiles_before_app_restart = 15;
+               bool strict = false;
+               string temp_directory;
+               CompilerCollection compilers;
+               ArrayList assemblies;
+               bool assembliesInBin = false;
+
+               /* Only the config. handler should create instances of this. Use GetInstance (context) */
+               public CompilationConfiguration (object p)
+               {
+                       CompilationConfiguration parent = p as CompilationConfiguration;
+                       if (parent != null)
+                               Init (parent);
+
+                       if (compilers == null)
+                               compilers = new CompilerCollection ();
+
+                       if (assemblies == null)
+                               assemblies = new ArrayList ();
+
+                       if (temp_directory == null)
+                               temp_directory = Path.GetTempPath ();
+               }
+
+               static public CompilationConfiguration GetInstance (HttpContext context)
+               {
+                       CompilationConfiguration config;
+                       config = HttpContext.Context.GetConfig ("system.web/compilation")
+                                                       as CompilationConfiguration;
+
+                       if (config == null)
+                               throw new HttpException ("Configuration error.", 500);
+
+                       return config;
+               }
+               
+               public CodeDomProvider GetProvider (string language)
+               {
+                       WebCompiler compiler = Compilers [language];
+                       if (compiler == null)
+                               return null;
+
+                       if (compiler.Provider != null)
+                               return compiler.Provider;
+
+                       Type t = Type.GetType (compiler.Type);
+                       compiler.Provider = Activator.CreateInstance (t) as CodeDomProvider;
+                       return compiler.Provider;
+               }
+
+               void Init (CompilationConfiguration parent)
+               {
+                       debug = parent.debug;
+                       batch = parent.batch;
+                       batch_timeout = parent.batch_timeout;
+                       default_language = parent.default_language;
+                       _explicit = parent._explicit;
+                       max_batch_size = parent.max_batch_size;
+                       max_batch_file_size = parent.max_batch_file_size;
+                       num_recompiles_before_app_restart = parent.num_recompiles_before_app_restart;
+                       strict = parent.strict;
+                       temp_directory = parent.temp_directory;
+                       compilers = new CompilerCollection (parent.compilers);
+                       ArrayList p = parent.assemblies;
+                       ICollection coll = (p == null) ? (ICollection) new object [0] : p;
+                       assemblies = new ArrayList (coll);
+               }
+
+               public bool Debug {
+                       get { return debug; }
+                       set { debug = value; }
+               }
+
+               public bool Batch {
+                       get { return batch; }
+                       set { batch = value; }
+               }
+
+               public int BatchTimeout {
+                       get { return batch_timeout; }
+                       set { batch_timeout = value; }
+               }
+
+               public string DefaultLanguage {
+                       get { return default_language; }
+                       set { default_language = value; }
+               }
+
+               public bool Explicit {
+                       get { return _explicit; }
+                       set { _explicit = value; }
+               }
+
+               public int MaxBatchSize {
+                       get { return max_batch_size; }
+                       set { max_batch_size = value; }
+               }
+
+               public int MaxBatchFileSize {
+                       get { return max_batch_file_size; }
+                       set { max_batch_file_size = value; }
+               }
+
+               public int NumRecompilesBeforeAppRestart {
+                       get { return num_recompiles_before_app_restart; }
+                       set { num_recompiles_before_app_restart = value; }
+               }
+
+               public bool Strict {
+                       get { return strict; }
+                       set { strict = value; }
+               }
+
+               public string TempDirectory {
+                       get { return temp_directory; }
+                       set {
+                               if (value == null || value == "")
+                                       value = Path.GetTempPath ();
+
+                               if (!Directory.Exists (value))
+                                       throw new ArgumentException ("Directory does not exist");
+
+                               temp_directory = value;
+                       }
+               }
+
+               public CompilerCollection Compilers {
+                       get { return compilers; }
+               }
+
+               public ArrayList Assemblies {
+                       get { return assemblies; }
+               }
+
+               public bool AssembliesInBin {
+                       get { return assembliesInBin; }
+                       set { assembliesInBin = value; }
+               }
+       }
+}
+
diff --git a/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs b/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs
new file mode 100644 (file)
index 0000000..918050f
--- /dev/null
@@ -0,0 +1,176 @@
+//
+// System.Web.Configuration.CompilationConfigurationHandler
+//
+// Authors:
+//     Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+
+using System;
+using System.Collections;
+using System.Configuration;
+using System.Xml;
+
+namespace System.Web.Configuration
+{
+       class CompilationConfigurationHandler : IConfigurationSectionHandler
+       {
+               public object Create (object parent, object context, XmlNode section)
+               {
+                       CompilationConfiguration config = new CompilationConfiguration (parent);
+
+                       config.TempDirectory = AttValue ("tempDirectory", section, true);
+                       config.DefaultLanguage = AttValue ("defaultLanguage", section);
+                       if (config.DefaultLanguage == null)
+                               config.DefaultLanguage = "c#";
+
+                       config.Debug = AttBoolValue ("debug", section, false);
+                       config.Batch = AttBoolValue ("batch", section, false);
+                       config.Explicit = AttBoolValue ("explicit", section, true);
+                       config.Strict = AttBoolValue ("strict", section, false);
+                       config.BatchTimeout = AttUIntValue ("batchTimeout", section, 0);
+                       config.MaxBatchSize = AttUIntValue ("maxBatchSize", section, 0);
+                       config.MaxBatchFileSize = AttUIntValue ("maxBatchFileSize", section, 0);
+                       config.NumRecompilesBeforeAppRestart =
+                                       AttUIntValue ("numRecompilesBeforeAppRestart", section, 15);
+
+                       if (section.Attributes != null && section.Attributes.Count != 0)
+                               ThrowException ("Unrecognized attribute.", section);
+
+                       XmlNodeList authNodes = section.ChildNodes;
+                       foreach (XmlNode child in authNodes) {
+                               XmlNodeType ntype = child.NodeType;
+                               if (ntype != XmlNodeType.Element)
+                                       continue;
+                               
+                               if (child.Name == "compilers") {
+                                       ReadCompilers (child.ChildNodes, config);
+                                       continue;
+                               }
+
+                               if (child.Name == "assemblies") {
+                                       ReadAssemblies (child.ChildNodes, config);
+                                       continue;
+                               }
+
+                               ThrowException ("Unexpected element", child);
+                       }
+
+                       return config;
+               }
+
+               static void ReadCompilers (XmlNodeList nodes, CompilationConfiguration config)
+               {
+                       foreach (XmlNode child in nodes) {
+                               XmlNodeType ntype = child.NodeType;
+                               if (ntype != XmlNodeType.Element)
+                                       continue;
+
+                               if (child.Name != "compiler")
+                                       ThrowException ("Unexpected element", child);
+
+                               WebCompiler compiler = new WebCompiler ();
+                               compiler.Languages = 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;
+                       }
+               }
+
+               static void ReadAssemblies (XmlNodeList nodes, CompilationConfiguration config)
+               {
+                       ArrayList assemblies = config.Assemblies;
+
+                       foreach (XmlNode child in nodes) {
+                               XmlNodeType ntype = child.NodeType;
+                               if (ntype != XmlNodeType.Element)
+                                       continue;
+
+                               if (child.Name == "clear") {
+                                       assemblies.Clear ();
+                                       config.AssembliesInBin = false;
+                                       continue;
+                               }
+
+                               string aname = AttValue ("assembly", child);
+                               if (child.Name == "add") {
+                                       if (aname == "*") {
+                                               config.AssembliesInBin = true;
+                                               continue;
+                                       }
+
+                                       aname = aname + ".dll";
+                                       if (!assemblies.Contains (aname))
+                                               assemblies.Add (aname);
+
+                                       continue;
+                               }
+
+                               if (child.Name == "remove") {
+                                       if (aname == "*") {
+                                               config.AssembliesInBin = false;
+                                               continue;
+                                       }
+                                       aname = aname + ".dll";
+                                       assemblies.Remove (aname);
+                                       continue;
+                               }
+
+                               ThrowException ("Unexpected element " + child.Name, child);
+                       }
+               }
+
+               static string AttValue (string name, XmlNode node, bool optional)
+               {
+                       return AttValue (name, node, optional, false);
+               }
+               
+               static string AttValue (string name, XmlNode node, bool optional, bool allowEmpty)
+               {
+                       return HandlersUtil.ExtractAttributeValue (name, node, optional, allowEmpty);
+               }
+
+               static bool AttBoolValue (string name, XmlNode node, bool _default)
+               {
+                       string v = AttValue (name, node, true);
+                       if (v == null)
+                               return _default;
+
+                       bool result = (v == "true");
+                       if (!result && v != "false")
+                               ThrowException ("Invalid boolean value in " + name, node);
+
+                       return result;
+               }
+
+               static int AttUIntValue (string name, XmlNode node, int _default)
+               {
+                       string v = AttValue (name, node, true);
+                       if (v == null)
+                               return _default;
+
+                       int result = 0;
+                       try {
+                               result = (int) UInt32.Parse (v);
+                       } catch {
+                               ThrowException ("Invalid number in " + name, node);
+                       }
+
+                       return result;
+               }
+
+               static string AttValue (string name, XmlNode node)
+               {
+                       return HandlersUtil.ExtractAttributeValue (name, node, true);
+               }
+
+               static void ThrowException (string message, XmlNode node)
+               {
+                       HandlersUtil.ThrowException (message, node);
+               }
+       }
+}
+
diff --git a/mcs/class/System.Web/System.Web.Configuration/CompilerCollection.cs b/mcs/class/System.Web/System.Web.Configuration/CompilerCollection.cs
new file mode 100644 (file)
index 0000000..12dc610
--- /dev/null
@@ -0,0 +1,46 @@
+//
+// System.Web.Configuration.CompilerCollection
+//
+// Authors:
+//     Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+
+using System;
+using System.Collections;
+
+namespace System.Web.Configuration
+{
+       sealed class CompilerCollection
+       {
+               Hashtable compilers;
+
+               public CompilerCollection () : this (null) {}
+
+               public CompilerCollection (CompilerCollection parent)
+               {
+                       compilers = new Hashtable (CaseInsensitiveHashCodeProvider.Default,
+                                                  CaseInsensitiveComparer.Default);
+
+                       if (parent != null && parent.compilers != null) {
+                               foreach (DictionaryEntry entry in parent.compilers)
+                                       compilers [entry.Key] = entry.Value;
+                       }
+               }
+
+               public WebCompiler this [string language] {
+                       get { return compilers [language] as WebCompiler; }
+                       set {
+                               compilers [language] = value;
+                               string [] langs = language.Split (';');
+                               foreach (string s in langs) {
+                                       string x = s.Trim ();
+                                       if (x != "")
+                                               compilers [x] = value;
+                               }
+                       }
+               }
+       }
+}
+
index 85f573f47eef7655a99358a32e12c4703f3a2bfc..93b817d123495db9d6be0fd729afb6f797e66a30 100644 (file)
@@ -96,6 +96,12 @@ namespace System.Web.Configuration
                }
                        
                static internal string ExtractAttributeValue (string attKey, XmlNode node, bool optional)
+               {
+                       return ExtractAttributeValue (attKey, node, optional, false);
+               }
+               
+               static internal string ExtractAttributeValue (string attKey, XmlNode node, bool optional,
+                                                             bool allowEmpty)
                {
                        if (node.Attributes == null) {
                                if (optional)
@@ -112,7 +118,7 @@ namespace System.Web.Configuration
                        }
 
                        string value = att.Value;
-                       if (value == String.Empty) {
+                       if (!allowEmpty && value == String.Empty) {
                                string opt = optional ? "Optional" : "Required";
                                ThrowException (opt + " attribute is empty: " + attKey, node);
                        }
diff --git a/mcs/class/System.Web/System.Web.Configuration/WebCompiler.cs b/mcs/class/System.Web/System.Web.Configuration/WebCompiler.cs
new file mode 100644 (file)
index 0000000..1501fa1
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// System.Web.Configuration.WebCompiler
+//
+// Authors:
+//     Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) 2003 Ximian, Inc (http://www.ximian.com)
+//
+
+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";
+               }
+       }
+}
+
index b907394a0a560d14931c7c75a8a138699d862ae5..e70fcb20569d9e89991757aa91544092cc7d4210 100755 (executable)
@@ -13,6 +13,7 @@ using System.Collections;
 using System.IO;
 using System.Web;
 using System.Web.Compilation;
+using System.Web.Configuration;
 using System.Web.Util;
 
 namespace System.Web.UI
@@ -23,6 +24,7 @@ namespace System.Web.UI
                string baseDir;
                string baseVDir;
                ILocation location;
+               CompilationConfiguration compilationConfig;
 
                internal string MapPath (string path)
                {
@@ -111,6 +113,15 @@ namespace System.Web.UI
 
                        set { baseVDir = value; }
                }
+
+               internal CompilationConfiguration CompilationConfig {
+                       get {
+                               if (compilationConfig == null)
+                                       compilationConfig = CompilationConfiguration.GetInstance (context);
+
+                               return compilationConfig;
+                       }
+               }
        }
 }
 
index 4b2241c24e589e7dd4f83ea6583f0b6a154acf0d..3260ebd905f4695c41e860268f6f1939d078389e 100644 (file)
@@ -1,3 +1,13 @@
+2003-10-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * BaseParser.cs: added CompilationConfig property.
+
+       * TemplateParser.cs:
+       * SimpleWebHandlerParser.cs: added CompilationConfig property.
+       Don't hardcode assembly names any more, assemblies in bin are added
+       depending on the configuration. The default language is also taken
+       from the configuration.
+
 2003-10-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * LosFormatter.cs: fixed bug #49604. Patch by yaronsh@mainsoft.com.
index a4032638f3b2fbc5a1e00675b65850f09e2ebf07..db88ac238f0c1da579042fb0cdb541e3a966adad 100644 (file)
@@ -15,6 +15,7 @@ using System.Reflection;
 using System.Text;
 using System.Web;
 using System.Web.Compilation;
+using System.Web.Configuration;
 using System.Web.Util;
 
 namespace System.Web.UI
@@ -36,6 +37,7 @@ namespace System.Web.UI
                string privateBinPath;
                string baseDir;
                string baseVDir;
+               CompilationConfiguration compilationConfig;
 
                protected SimpleWebHandlerParser (HttpContext context, string virtualPath, string physicalPath)
                {
@@ -45,13 +47,11 @@ namespace System.Web.UI
                        AddDependency (physicalPath);
 
                        assemblies = new ArrayList ();
-                       assemblies.Add ("System.dll");
-                       assemblies.Add ("System.Drawing.dll");
-                       assemblies.Add ("System.Data.dll");
-                       assemblies.Add ("System.Web.dll");
-                       assemblies.Add ("System.Web.Services.dll");
-                       assemblies.Add ("System.Xml.dll");
-                       AddAssembliesInBin ();
+                       assemblies.AddRange (CompilationConfig.Assemblies);
+                       if (CompilationConfig.AssembliesInBin)
+                               AddAssembliesInBin ();
+
+                       language = CompilationConfig.DefaultLanguage;
 
                        GetDirectivesAndContent ();
                }
@@ -146,10 +146,8 @@ namespace System.Web.UI
                        }
 
                        language = GetAndRemove (attributes, "language");
-                       if (language != null) {
-                               if (0 != String.Compare (language, "C#", true))
-                                       throw new ParseException (null, "Only C# language is supported by now.");
-                       }
+                       if (language == null)
+                               language = CompilationConfig.DefaultLanguage;
 
                        codeBehind = GetAndRemove (attributes, "codebehind");
                        if (attributes.Count > 0)
@@ -399,6 +397,15 @@ namespace System.Web.UI
                                return baseVDir;
                        }
                }
+
+               internal CompilationConfiguration CompilationConfig {
+                       get {
+                               if (compilationConfig == null)
+                                       compilationConfig = CompilationConfiguration.GetInstance (context);
+
+                               return compilationConfig;
+                       }
+               }
        }
 }
 
index bbfee7627268a52416455a8178d56fd9069bf574..aa0d15e6da490c17a8e81b811f7e247e5db766b3 100755 (executable)
@@ -55,12 +55,11 @@ namespace System.Web.UI
                        imports.Add ("System.Web.UI.HtmlControls");
 
                        assemblies = new ArrayList ();
-                       assemblies.Add ("System.dll");
-                       assemblies.Add ("System.Drawing.dll");
-                       assemblies.Add ("System.Data.dll");
-                       assemblies.Add ("System.Web.dll");
-                       assemblies.Add ("System.Xml.dll");
-                       AddAssembliesInBin ();
+                       assemblies.AddRange (CompilationConfig.Assemblies);
+                       if (CompilationConfig.AssembliesInBin)
+                               AddAssembliesInBin ();
+
+                       language = CompilationConfig.DefaultLanguage;
                }
 
                protected abstract Type CompileIntoType ();
@@ -282,10 +281,7 @@ namespace System.Web.UI
 
                        debug = GetBool (atts, "Debug", true);
                        compilerOptions = GetString (atts, "CompilerOptions", null);
-                       language = GetString (atts, "Language", "C#");
-                       if (String.Compare (language, "c#", true) != 0)
-                               ThrowParseException ("Only C# supported.");
-
+                       language = GetString (atts, "Language", CompilationConfig.DefaultLanguage);
                        string src = GetString (atts, "Src", null);
                        Assembly srcAssembly = null;
                        if (src != null)
index 00528b1cb1c3b83ccba12a02193c3d67e8c0504c..13e959f7d0d1378b8834971f1cd488161432eeeb 100755 (executable)
@@ -88,6 +88,9 @@ System.Web.Compilation/TemplateControlCompiler.cs
 System.Web.Configuration/AuthConfig.cs
 System.Web.Configuration/AuthenticationMode.cs
 System.Web.Configuration/ClientTargetSectionHandler.cs
+System.Web.Configuration/CompilationConfiguration.cs
+System.Web.Configuration/CompilationConfigurationHandler.cs
+System.Web.Configuration/CompilerCollection.cs
 System.Web.Configuration/FormsAuthPasswordFormat.cs
 System.Web.Configuration/FormsProtectionEnum.cs
 System.Web.Configuration/GlobalizationConfiguration.cs
@@ -106,6 +109,7 @@ System.Web.Configuration/AuthenticationConfigHandler.cs
 System.Web.Configuration/MachineKeyConfig.cs
 System.Web.Configuration/AuthorizationConfig.cs
 System.Web.Configuration/GlobalizationConfigurationHandler.cs
+System.Web.Configuration/WebCompiler.cs
 System.Web.Configuration/WebControlsSectionHandler.cs
 System.Web.Handlers/TraceHandler.cs
 System.Web.Hosting/AppDomainFactory.cs