Author: mhabersack
Date: 2006-11-07 08:57:10 -0500 (Tue, 07 Nov 2006)
New Revision: 67454

Modified:
   trunk/mcs/class/System/System.CodeDom.Compiler/ChangeLog
   trunk/mcs/class/System/System.CodeDom.Compiler/CodeDomConfigurationHandler.cs
   trunk/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs
Log:
A default value of WarningLevel change and implementation of a missing API

Modified: trunk/mcs/class/System/System.CodeDom.Compiler/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.CodeDom.Compiler/ChangeLog    2006-11-07 
13:22:54 UTC (rev 67453)
+++ trunk/mcs/class/System/System.CodeDom.Compiler/ChangeLog    2006-11-07 
13:57:10 UTC (rev 67454)
@@ -1,3 +1,11 @@
+2006-11-07  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * CompilerInfo.cs: Implement the CreateDefaultCompilerParameters API.
+
+       * CodeDomConfigurationHandler.cs: WarningLevel of CompilerInfo
+       should default to -1 if it is absent from the config file, as per
+       MSDN.
+
 2006-11-06  Marek Habersack  <[EMAIL PROTECTED]>
 
        * CodeDomProvider.cs: IsDefinedLanguage should return true if

Modified: 
trunk/mcs/class/System/System.CodeDom.Compiler/CodeDomConfigurationHandler.cs
===================================================================
--- 
trunk/mcs/class/System/System.CodeDom.Compiler/CodeDomConfigurationHandler.cs   
    2006-11-07 13:22:54 UTC (rev 67453)
+++ 
trunk/mcs/class/System/System.CodeDom.Compiler/CodeDomConfigurationHandler.cs   
    2006-11-07 13:57:10 UTC (rev 67454)
@@ -104,7 +104,7 @@
                                compiler.Extensions = AttValue ("extension", 
child);
                                compiler.TypeName = AttValue ("type", child);
                                compiler.CompilerOptions = AttValue 
("compilerOptions", child, true, true);
-                               compiler.WarningLevel = AttUIntValue 
("warningLevel", child, 0);
+                               compiler.WarningLevel = AttUIntValue 
("warningLevel", child, -1);
                                compiler.Init ();
                                
                                foreach (string l in 
compiler.Languages.Split(';'))
@@ -234,7 +234,7 @@
                                Init (parent);
 
                        if (compilers == null)
-                               compilers = new CompilerCollection ();
+                               compilers = new CompilerCollection ();          
        
 
                        if (temp_directory == null)
                                temp_directory = Path.GetTempPath ();

Modified: trunk/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs
===================================================================
--- trunk/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs      
2006-11-07 13:22:54 UTC (rev 67453)
+++ trunk/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs      
2006-11-07 13:57:10 UTC (rev 67454)
@@ -72,10 +72,16 @@
                        get { return type != null; }
                }
 
-               [MonoTODO]
                public CompilerParameters CreateDefaultCompilerParameters ()
                {
-                       throw new NotImplementedException ();
+                       CompilerParameters cparams = new CompilerParameters ();
+                       if (CompilerOptions == null)
+                               cparams.CompilerOptions = String.Empty;
+                       else
+                               cparams.CompilerOptions = CompilerOptions;
+                       cparams.WarningLevel = WarningLevel;
+
+                       return cparams;
                }
 
                public CodeDomProvider CreateProvider ()

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

Reply via email to