コード例 #1
0
        /// <summary>
        /// Checks whether the last filter evaluation selected this handler to run.
        /// </summary>
        /// <param name="exc">The exception being filtered.</param>
        /// <returns>true if this filter selected the exception handler to run</returns>
        public bool ShouldRunHandler(object exc)
        {
            if (exc == null)
            {
                throw new ArgumentNullException("exc");
            }

            int result;

            if (!Results.TryGetValue(exc, out result))
            {
                ThrowException($"Filter {this} has not been evaluated for {exc}");
            }

            return(result == exception_execute_handler);
        }