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

            sb.Append("fn(");
            if (this.EnclosingType != null)
            {
                sb.AppendFormat("{0},", EnclosingType);
            }
            if (!string.IsNullOrEmpty(Convention))
            {
                sb.AppendFormat("{0},", Convention);
            }
            if (ReturnValue != null)
            {
                sb.Append(ReturnValue.ToString());
            }
            else
            {
                sb.Append("void");
            }
            sb.Append(",(");
            if (Arguments != null)
            {
                sb.Append(string.Join(",", Arguments.Select(a => a.ToString())));
            }
            sb.Append(")");
            return(sb.ToString());
        }
Пример #2
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.Append("fn(");
            if (!string.IsNullOrEmpty(Convention))
            {
                sb.AppendFormat("{0},", Convention);
            }
            if (ReturnValue != null)
            {
                sb.Append(ReturnValue.ToString());
            }
            else
            {
                sb.Append("void");
            }
            sb.Append(",(");
            if (Arguments != null)
            {
                foreach (var arg in Arguments)
                {
                    sb.Append(arg.ToString());
                }
            }
            sb.Append(")");
            return(sb.ToString());
        }