示例#1
0
        /// <summary>
        ///		Write remote stack framew string to specified buffer.
        /// </summary>
        /// <param name="frame">Stack frame to write.</param>
        /// <param name="stringBuilder">Buffer.</param>
        private static void WriteStackFrame(RemoteStackFrame frame, StringBuilder stringBuilder)
        {
            const string stackFrameTemplateWithFileInfo    = "   at {0} in {1}:line {2}";
            const string stackFrameTemplateWithoutFileInfo = "   at {0}";

            if (frame.FileName != null)
            {
                stringBuilder.AppendFormat(CultureInfo.CurrentCulture, stackFrameTemplateWithFileInfo, frame.MethodSignature, frame.FileName, frame.FileLineNumber);
            }
            else
            {
                stringBuilder.AppendFormat(CultureInfo.CurrentCulture, stackFrameTemplateWithoutFileInfo, frame.MethodSignature);
            }
        }
示例#2
0
		/// <summary>
		///		Write remote stack framew string to specified buffer.
		/// </summary>
		/// <param name="frame">Stack frame to write.</param>
		/// <param name="stringBuilder">Buffer.</param>
		private static void WriteStackFrame( RemoteStackFrame frame, StringBuilder stringBuilder )
		{
			const string stackFrameTemplateWithFileInfo = "   at {0} in {1}:line {2}";
			const string stackFrameTemplateWithoutFileInfo = "   at {0}";
			if ( frame.FileName != null )
			{
				stringBuilder.AppendFormat( CultureInfo.CurrentCulture, stackFrameTemplateWithFileInfo, frame.MethodSignature, frame.FileName, frame.FileLineNumber );
			}
			else
			{
				stringBuilder.AppendFormat( CultureInfo.CurrentCulture, stackFrameTemplateWithoutFileInfo, frame.MethodSignature );
			}
		}
        /// <summary>
        ///		Write remote stack framew string to specified buffer.
        /// </summary>
        /// <param name="frame">Stack frame to write.</param>
        /// <param name="stringBuilder">Buffer.</param>
        private static void WriteStackFrame( RemoteStackFrame frame, StringBuilder stringBuilder )
        {
            const string at = "at";
            stringBuilder.AppendFormat( "   " + at + "{0}", frame.MethodSignature );
            if ( frame.FileName != null )
            {
                stringBuilder.AppendFormat( " " + at + " {0}", frame.FileName );

                if ( frame.FileLineNumber > 0 )
                {
                    stringBuilder.AppendFormat( ":line {0}", frame.FileLineNumber );
                }
            }
        }