Example #1
0
        public override string ToString()
        {
            var result = new StringBuilder();

            result.Append("class ").Append(Name);
            if (_baseClass != null)
            {
                result.Append(" extends ").Append(_baseClass);
            }
            result.Append(" {").Append(Environment.NewLine);

            var temp = _constructor.ToString().Replace(Environment.NewLine, Environment.NewLine + "  ");

            result.Append("constructor");
            result.Append(temp.Substring("constructor".Length));

            foreach (var member in _members)
            {
                temp = member.ToString().Replace(Environment.NewLine, Environment.NewLine + "  ");
                result.Append(temp);
            }

            result.Append(Environment.NewLine).Append("}");
            return(result.ToString());
        }