示例#1
0
        /// <summary>
        /// All other factory methods will result in a call to this one.
        /// </summary>
        ///
        /// <param name="message">The message to display</param>
        /// <param name="stackTrace">The associated stack trace</param>
        /// <param name="policy">The situations in which the stack trace should be appended to the message</param>
        private static void CreateNew(string message, string stackTrace, StackTracePolicy policy)
        {
            string errorDetails = string.Empty;

            if (policy == StackTracePolicy.Always ||
                policy == StackTracePolicy.OnlyWhenDebuggingOrRunningLocally && IsRunningUnderDebugOrLocalhost)
            {
                errorDetails = stackTrace ?? string.Empty;
            }

            ErrorWindow window = new ErrorWindow(message, errorDetails);

            window.Show();
        }
        /// <summary>
        /// All other factory methods will result in a call to this one.
        /// </summary>
        /// 
        /// <param name="message">The message to display</param>
        /// <param name="stackTrace">The associated stack trace</param>
        /// <param name="policy">The situations in which the stack trace should be appended to the message</param>
        private static void CreateNew(string message, string stackTrace, StackTracePolicy policy)
        {
            string errorDetails = string.Empty;

            if (policy == StackTracePolicy.Always ||
                policy == StackTracePolicy.OnlyWhenDebuggingOrRunningLocally && IsRunningUnderDebugOrLocalhost)
            {
                errorDetails = stackTrace ?? string.Empty;
            }

            ErrorWindow window = new ErrorWindow(message, errorDetails);
            window.Show();
        }