2010-06-29 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / class / System / System.CodeDom / CodeNamespace.cs
index 1f5a648c629c7ccd9c7ea8c34fce0fd25c4fc8d3..8a709865b4149519aa388fe7ba56963d8346188e 100644 (file)
@@ -6,8 +6,7 @@
 //   Daniel Stodden (stodden@in.tum.de)
 //
 // (C) 2001 Ximian, Inc.
-//
-
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -41,8 +40,10 @@ namespace System.CodeDom
        {
                private CodeCommentStatementCollection comments;
                private CodeNamespaceImportCollection imports;
-               private CodeTypeDeclarationCollection types;
+               //private CodeNamespaceCollection namespaces;
+               private CodeTypeDeclarationCollection classes;
                private string name;
+               //int populated;
 
                //
                // Constructors
@@ -83,6 +84,9 @@ namespace System.CodeDom
 
                public string Name {
                        get {
+                               if (name == null) {
+                                       return string.Empty;
+                               }
                                return name;
                        }
                        set {
@@ -92,12 +96,12 @@ namespace System.CodeDom
 
                public CodeTypeDeclarationCollection Types {
                        get {
-                               if ( types == null ) {
-                                       types = new CodeTypeDeclarationCollection();
+                               if ( classes == null ) {
+                                       classes = new CodeTypeDeclarationCollection();
                                        if ( PopulateTypes != null )
                                                PopulateTypes( this, EventArgs.Empty );
                                }
-                               return types;
+                               return classes;
                        }
                }