From aa31ebd7da9fea53b551c2a2f0f021fd97f408fd Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Tue, 1 Nov 2005 20:06:17 +0000 Subject: [PATCH] 2005-11-01 Sebastien Pouliot * CodeGenerator.cs: Added/stubbed missing 2.0 stuff. svn path=/trunk/mcs/; revision=52457 --- .../System/System.CodeDom.Compiler/ChangeLog | 4 +++ .../System.CodeDom.Compiler/CodeGenerator.cs | 31 +++++++++++++++---- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/mcs/class/System/System.CodeDom.Compiler/ChangeLog b/mcs/class/System/System.CodeDom.Compiler/ChangeLog index ee377c811ca..fd3e2064ee6 100644 --- a/mcs/class/System/System.CodeDom.Compiler/ChangeLog +++ b/mcs/class/System/System.CodeDom.Compiler/ChangeLog @@ -1,3 +1,7 @@ +2005-11-01 Sebastien Pouliot + + * CodeGenerator.cs: Added/stubbed missing 2.0 stuff. + 2005-11-01 Sebastien Pouliot CodeDomProvider.cs: Added missing 2.0 methods. Added CAS permissions. diff --git a/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs b/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs index 0828ac2b08e..ece7f487bd5 100644 --- a/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs +++ b/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs @@ -57,6 +57,14 @@ namespace System.CodeDom.Compiler { // // Properties // +#if NET_2_0 + protected CodeTypeDeclaration CurrentClass { + get { + return currentType; + } + } +#endif + protected CodeTypeMember CurrentMember { get { return currentMember; @@ -65,8 +73,8 @@ namespace System.CodeDom.Compiler { protected string CurrentMemberName { get { - if (currentType == null) - return null; + if (currentMember == null) + return "<% unknown %>"; return currentMember.Name; } } @@ -74,7 +82,7 @@ namespace System.CodeDom.Compiler { protected string CurrentTypeName { get { if (currentType == null) - return null; + return "<% unknown %>"; return currentType.Name; } } @@ -175,6 +183,13 @@ namespace System.CodeDom.Compiler { } protected abstract void GenerateCastExpression (CodeCastExpression e); +#if NET_2_0 + [MonoTODO] + public virtual void GenerateCodeFromMember (CodeTypeMember member, TextWriter writer, CodeGeneratorOptions options) + { + throw new NotImplementedException (); + } +#endif protected abstract void GenerateComment (CodeComment comment); protected virtual void GenerateCommentStatement (CodeCommentStatement statement) @@ -234,7 +249,13 @@ namespace System.CodeDom.Compiler { { Output.Write (d.ToString (CultureInfo.InvariantCulture)); } - +#if NET_2_0 + [MonoTODO] + protected virtual void GenerateDefaultValueExpression (CodeDefaultValueExpression e) + { + throw new NotImplementedException (); + } +#endif protected abstract void GenerateDelegateCreateExpression (CodeDelegateCreateExpression e); protected abstract void GenerateDelegateInvokeExpression (CodeDelegateInvokeExpression e); @@ -1252,12 +1273,10 @@ namespace System.CodeDom.Compiler { typeof (CodeEntryPointMethod) }; - #if NET_2_0 protected virtual void GenerateDirectives (CodeDirectiveCollection directives) { } #endif - } } -- 2.25.1