/// <summary> /// Get the generated code /// </summary> /// <returns></returns> public override string ToString() { StringBuilder s = new StringBuilder(); if (!string.IsNullOrEmpty(compilationDirective)) { s.Append("#if ").Append(compilationDirective).Append(Token.EOL); } s.Append(usingNode.ToString()).Append(Token.SPACE); if (!string.IsNullOrEmpty(namespaceNode.name)) { if (typeNodes.HasElement()) { namespaceNode.SetTypes(typeNodes.ToArray()); } s.Append(namespaceNode.ToString()).Append(Token.SPACE); } else { if (typeNodes.HasElement()) { for (int i = 0; i < typeNodes.Count; ++i) { s.Append(typeNodes[i].ToString()).Append(Token.SPACE); } } } if (!string.IsNullOrEmpty(compilationDirective)) { s.Append("#endif"); } return(s.ToString()); }