/// <summary> /// Generates code from a codeTypeDeclaration. /// </summary> /// <param name="writer">The textwriter the code is written to.</param> /// <param name="namespaceName">The namespace that will contain the class.</param> /// <param name="codeTypeDeclaration">The CodeDom definition to generate.</param> public void GenerateCode(TextWriter writer, string namespaceName, ICodeDom<System.CodeDom.CodeTypeDeclaration> codeTypeDeclaration) { NamespaceDeclaration nsdecl = new NamespaceDeclaration(namespaceName); nsdecl.AddClass(codeTypeDeclaration); this.GenerateCode(writer, nsdecl); }
/// <summary> /// Adds an object, presumably an ActiveRecord class definition, to the namespace. /// </summary> /// <param name="classDeclaration">The class declaration.</param> public void AddClass(ICodeDom<CodeTypeDeclaration> classDeclaration) { _classes.Add(classDeclaration); }