Пример #1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            foreach (var attr in Attributes)
            {
                sb.AppendLine(attr.ToString());
            }
            sb.AppendLine($"namespace {NamespaceName}");
            sb.AppendLine("{");
            foreach (string interfaceLine in Interfaces.BreakIntoLines())
            {
                sb.AppendLine($"\t{interfaceLine}");
            }
            foreach (string classLine in Classes.BreakIntoLines())
            {
                sb.AppendLine($"\t{classLine}");
            }
            foreach (string enumLine in Enums.BreakIntoLines())
            {
                sb.AppendLine($"\t{enumLine}");
            }
            foreach (string structLine in Structs.BreakIntoLines())
            {
                sb.AppendLine($"\t{structLine}");
            }
            sb.AppendLine("}");
            return(sb.ToString());
        }