diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs index 89fab991d73488..458c914773cbcd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @@ -796,7 +796,7 @@ internal bool IsWaitNotificationEnabledOrNotRanToCompletion /// harmful). Derived implementations may choose to only conditionally call down to this base /// implementation. /// - internal virtual bool ShouldNotifyDebuggerOfWaitCompletion // ideally would be familyAndAssembly, but that can't be done in C# + private protected virtual bool ShouldNotifyDebuggerOfWaitCompletion { get { @@ -5889,7 +5889,7 @@ public void Invoke(Task completedTask) /// Returns whether we should notify the debugger of a wait completion. This returns /// true iff at least one constituent task has its bit set. /// - internal override bool ShouldNotifyDebuggerOfWaitCompletion => + private protected override bool ShouldNotifyDebuggerOfWaitCompletion => base.ShouldNotifyDebuggerOfWaitCompletion && AnyTaskRequiresNotifyDebuggerOfWaitCompletion(m_tasks); } @@ -6128,7 +6128,7 @@ public void Invoke(Task ignored) /// Returns whether we should notify the debugger of a wait completion. This returns true /// iff at least one constituent task has its bit set. /// - internal override bool ShouldNotifyDebuggerOfWaitCompletion => + private protected override bool ShouldNotifyDebuggerOfWaitCompletion => base.ShouldNotifyDebuggerOfWaitCompletion && AnyTaskRequiresNotifyDebuggerOfWaitCompletion(m_tasks); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs index a9b1bf0afdf411..9156d4fcdb9a82 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs @@ -1587,7 +1587,7 @@ public void Invoke(Task completingTask) /// Returns whether we should notify the debugger of a wait completion. This returns /// true iff at least one constituent task has its bit set. /// - internal override bool ShouldNotifyDebuggerOfWaitCompletion => + private protected override bool ShouldNotifyDebuggerOfWaitCompletion => base.ShouldNotifyDebuggerOfWaitCompletion && AnyTaskRequiresNotifyDebuggerOfWaitCompletion(_tasks); } @@ -1657,7 +1657,7 @@ public void Invoke(Task completingTask) /// Returns whether we should notify the debugger of a wait completion. This returns /// true iff at least one constituent task has its bit set. /// - internal override bool ShouldNotifyDebuggerOfWaitCompletion => + private protected override bool ShouldNotifyDebuggerOfWaitCompletion => base.ShouldNotifyDebuggerOfWaitCompletion && AnyTaskRequiresNotifyDebuggerOfWaitCompletion(_tasks); }