Author: andrews
Date: 2005-04-07 03:57:15 -0400 (Thu, 07 Apr 2005)
New Revision: 42625

Modified:
   trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
   trunk/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs
Log:
XmlSerializer.cs: added TARGET_JVM that does not support on-the-fly code 
generation.


Modified: trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog       
2005-04-07 06:58:31 UTC (rev 42624)
+++ trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog       
2005-04-07 07:57:15 UTC (rev 42625)
@@ -1,3 +1,8 @@
+2004-04-03  Andrew Skiba  <[EMAIL PROTECTED]>
+
+       * XmlSerializer.cs: added TARGET_JVM that does not support on-the-fly
+       code generation.
+
 2005-03-30  Lluis Sanchez Gual  <[EMAIL PROTECTED]>
 
        * SerializationCodeGenerator.cs: 

Modified: trunk/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs        
2005-04-07 06:58:31 UTC (rev 42624)
+++ trunk/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs        
2005-04-07 07:57:15 UTC (rev 42625)
@@ -37,9 +37,11 @@
 using System.Xml;
 using System.Xml.Schema;
 using System.Text;
+#if !TARGET_JVM
 using System.CodeDom;
 using System.CodeDom.Compiler;
 using Microsoft.CSharp;
+#endif
 using System.Configuration;
 using System.Security.Policy;
 
@@ -99,18 +101,14 @@
                
                static XmlSerializer ()
                {
+                       
+#if !TARGET_JVM
+                       string db = null;
+                       string th = null;
+                       generationThreshold = -1;
+                       backgroundGeneration = false;
+#else
                        string db = Environment.GetEnvironmentVariable 
("MONO_XMLSERIALIZER_DEBUG");
-                       deleteTempFiles = (db == null || db == "no");
-                       
-                       IDictionary table = (IDictionary) 
ConfigurationSettings.GetConfig("system.diagnostics");
-                       if (table != null) {
-                               table = (IDictionary) table["switches"];
-                               if (table != null) {
-                                       string val = (string) table 
["XmlSerialization.Compilation"];
-                                       if (val == "1") deleteTempFiles = false;
-                               }
-                       }
-                       
                        string th = Environment.GetEnvironmentVariable 
("MONO_XMLSERIALIZER_THS");
                        
                        if (th == null) {
@@ -124,6 +122,19 @@
                                backgroundGeneration = (generationThreshold != 
0);
                                if (generationThreshold < 1) 
generationThreshold = 1;
                        }
+#endif
+                       deleteTempFiles = (db == null || db == "no");
+                       
+                       IDictionary table = (IDictionary) 
ConfigurationSettings.GetConfig("system.diagnostics");
+                       if (table != null) 
+                       {
+                               table = (IDictionary) table["switches"];
+                               if (table != null) 
+                               {
+                                       string val = (string) table 
["XmlSerialization.Compilation"];
+                                       if (val == "1") deleteTempFiles = false;
+                               }
+                       }
                }
 
 #region Constructors
@@ -561,6 +572,20 @@
                        return new XmlSerializationReaderInterpreter 
(typeMapping);
                }
                
+#if TARGET_JVM
+               void CheckGeneratedTypes (XmlMapping typeMapping)
+               {
+                       throw new NotImplementedException();
+               }
+               void GenerateSerializersAsync (GenerationBatch batch)
+               {
+                       throw new NotImplementedException();
+               }
+               void RunSerializerGeneration (object obj)
+               {
+                       throw new NotImplementedException();
+               }
+#else
                void CheckGeneratedTypes (XmlMapping typeMapping)
                {
                        lock (this)
@@ -715,6 +740,7 @@
                                
                        return res.CompiledAssembly;
                }
+#endif
                
 #if NET_2_0
                GenerationBatch LoadFromSatelliteAssembly (GenerationBatch 
batch)

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

Reply via email to