示例#1
0
        public string ToString(StackFormat stackFormat)
        {
            if (this.Frames == null)
            {
                return("[No frames]");
            }

            StringBuilder sb = new StringBuilder(255);

            for (int i = 0; i < this.Frames.Count; i++)
            {
                StackFrame sf = this.Frames[i];

                if (i > 0)
                {
                    sb.AppendLine();
                }

                sb.Append(sf.ToString());
            }

            if (stackFormat == StackFormat.TrailingNewLine)
            {
                sb.AppendLine();
            }

            return(sb.ToString());
        }
示例#2
0
        public string ToString(StackFormat stackFormat)
        {
            if (this.Frames == null) { return "[No frames]"; }

            StringBuilder sb = new StringBuilder(255);

            for (int i = 0; i < this.Frames.Count; i++)
            {
                StackFrame sf = this.Frames[i];

                if (i > 0) { sb.AppendLine(); }

                sb.Append(sf.ToString());
            }

            if (stackFormat == StackFormat.TrailingNewLine)
            {
                sb.AppendLine();
            }

            return sb.ToString();
        }