2007-01-22 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Mon, 22 Jan 2007 19:55:12 +0000 (19:55 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Mon, 22 Jan 2007 19:55:12 +0000 (19:55 -0000)
* CodeDomProvider.cs: Prevent Moma from getting confused.

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

mcs/class/System/System.CodeDom.Compiler/ChangeLog
mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs

index c951cdb69203cf2a1391ccf3e2da60f33da25468..e1040c8a5f37a4299a2140d74603d9ef31147d50 100644 (file)
@@ -1,3 +1,7 @@
+2007-01-22  Miguel de Icaza  <miguel@novell.com>
+
+       * CodeDomProvider.cs: Prevent Moma from getting confused.
+
 2006-11-17  Atsushi Enomoto  <atsushi@ximian.com>
 
        * TempFileCollection.cs : make it work under non-libc environment.
index e21c644cc447b6eb863135c01ecfe9a6240cbc97..352b01cbae5c44af742dcbdf2c25c53afcea90fe 100644 (file)
@@ -66,6 +66,14 @@ namespace System.CodeDom.Compiler {
                        }
                }
 
+               //
+               // This is used to prevent confusing Moma about methods not implemented.
+               //
+               Exception GetNotImplemented ()
+               {
+                       return new NotImplementedException ();
+               }
+               
                //
                // Methods
                //
@@ -107,7 +115,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeCompiler cc = CreateCompiler ();
                        if (cc == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        return cc.CompileAssemblyFromDomBatch (options, compilationUnits);
                }
 
@@ -115,7 +123,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeCompiler cc = CreateCompiler ();
                        if (cc == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        return cc.CompileAssemblyFromFileBatch (options, fileNames);
                }
 
@@ -123,7 +131,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeCompiler cc = CreateCompiler ();
                        if (cc == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        return cc.CompileAssemblyFromSourceBatch (options, fileNames);
                }
 
@@ -131,7 +139,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        return cg.CreateEscapedIdentifier (value);
                }
 
@@ -149,7 +157,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        return cg.CreateValidIdentifier (value);
                }
 
@@ -158,7 +166,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        cg.GenerateCodeFromCompileUnit (compileUnit, writer, options);
                }
 
@@ -166,14 +174,14 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        cg.GenerateCodeFromExpression (expression, writer, options);
                }
 
                public virtual void GenerateCodeFromMember (CodeTypeMember member, TextWriter writer, CodeGeneratorOptions options)
                {
                        // Documented to always throw an exception (if not overriden)
-                       throw new NotImplementedException ();
+                       throw GetNotImplemented ();
                        // Note: the pattern is different from other GenerateCodeFrom* because 
                        // ICodeGenerator doesn't have a GenerateCodeFromMember member
                }
@@ -182,7 +190,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        cg.GenerateCodeFromNamespace (codeNamespace, writer, options);
                }
 
@@ -190,7 +198,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        cg.GenerateCodeFromStatement (statement, writer, options);
                }
 
@@ -198,7 +206,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        cg.GenerateCodeFromType (codeType, writer, options);
                }
 
@@ -241,7 +249,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        return cg.GetTypeOutput (type);
                }
 
@@ -277,7 +285,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        return cg.IsValidIdentifier (value);
                }
 
@@ -285,7 +293,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeParser cp = CreateParser ();
                        if (cp == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        return cp.Parse (codeStream);
                }
 
@@ -293,7 +301,7 @@ namespace System.CodeDom.Compiler {
                {
                        ICodeGenerator cg = CreateGenerator ();
                        if (cg == null)
-                               throw new NotImplementedException ();
+                               throw GetNotImplemented ();
                        return cg.Supports (supports);
                }