Пример #1
0
 protected override void OnHangDetected(JoinableTaskContext.HangDetails details)
 {
     this.AllHangDetails.Add(details);
     this.HangDetected.Set();
     this.HangReportCount++;
     base.OnHangDetected(details);
 }
Пример #2
0
        /// <summary>
        /// Invoked when a hang is suspected to have occurred involving the main thread.
        /// </summary>
        /// <param name="details">Describes the hang in detail.</param>
        /// <remarks>
        /// A single hang occurrence may invoke this method multiple times, with increasing
        /// values in the <see cref="JoinableTaskContext.HangDetails.NotificationCount"/> values
        /// in the <paramref name="details"/> parameter.
        /// </remarks>
        protected internal virtual void OnHangDetected(JoinableTaskContext.HangDetails details)
        {
            Requires.NotNull(details, nameof(details));

            // Preserve backward compatibility by forwarding the call to the older overload.
            this.OnHangDetected(details.HangDuration, details.NotificationCount, details.HangId);
        }