diff --git a/src/System.Management.Automation/engine/hostifaces/PSDataCollection.cs b/src/System.Management.Automation/engine/hostifaces/PSDataCollection.cs index eb1a796d0e7..fd8a228590a 100644 --- a/src/System.Management.Automation/engine/hostifaces/PSDataCollection.cs +++ b/src/System.Management.Automation/engine/hostifaces/PSDataCollection.cs @@ -1756,7 +1756,7 @@ public void Dispose() /// Release all the resources. /// /// If true, release all managed resources. - protected void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (disposing) { diff --git a/src/System.Management.Automation/engine/remoting/commands/ConnectPSSession.cs b/src/System.Management.Automation/engine/remoting/commands/ConnectPSSession.cs index b7474fe34c2..fa26fcdcd70 100644 --- a/src/System.Management.Automation/engine/remoting/commands/ConnectPSSession.cs +++ b/src/System.Management.Automation/engine/remoting/commands/ConnectPSSession.cs @@ -1069,7 +1069,7 @@ public void Dispose() /// /// Whether method is called /// from Dispose or destructor - private void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (disposing) { diff --git a/src/System.Management.Automation/engine/remoting/commands/DisconnectPSSession.cs b/src/System.Management.Automation/engine/remoting/commands/DisconnectPSSession.cs index 74bcbac2c33..16babdaf462 100644 --- a/src/System.Management.Automation/engine/remoting/commands/DisconnectPSSession.cs +++ b/src/System.Management.Automation/engine/remoting/commands/DisconnectPSSession.cs @@ -531,7 +531,7 @@ public void Dispose() /// /// Whether method is called /// from Dispose or destructor - private void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (disposing) { diff --git a/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs b/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs index 534362b0f17..f3c302d7166 100644 --- a/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs +++ b/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs @@ -2069,7 +2069,7 @@ public void Dispose() /// Internal dispose method which does the actual disposing. /// /// Whether called from dispose or finalize. - private void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (disposing) { diff --git a/src/System.Management.Automation/engine/remoting/commands/ReceiveJob.cs b/src/System.Management.Automation/engine/remoting/commands/ReceiveJob.cs index b1759d6a88e..e989bb534e9 100644 --- a/src/System.Management.Automation/engine/remoting/commands/ReceiveJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/ReceiveJob.cs @@ -639,7 +639,7 @@ public void Dispose() /// /// /// - protected void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (disposing) { diff --git a/src/System.Management.Automation/engine/remoting/commands/RemoveJob.cs b/src/System.Management.Automation/engine/remoting/commands/RemoveJob.cs index af98749c4e5..4000099427f 100644 --- a/src/System.Management.Automation/engine/remoting/commands/RemoveJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/RemoveJob.cs @@ -1066,7 +1066,7 @@ public void Dispose() /// /// /// - protected void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (!disposing) { diff --git a/src/System.Management.Automation/engine/remoting/commands/StartJob.cs b/src/System.Management.Automation/engine/remoting/commands/StartJob.cs index 05611d8c0ae..202c95bd403 100644 --- a/src/System.Management.Automation/engine/remoting/commands/StartJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/StartJob.cs @@ -810,7 +810,7 @@ public void Dispose() /// Internal dispose method which does the actual disposing. /// /// Whether called from dispose or finalize. - private void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (disposing) { diff --git a/src/System.Management.Automation/engine/remoting/commands/StopJob.cs b/src/System.Management.Automation/engine/remoting/commands/StopJob.cs index c298b495bb9..5e0888a18ab 100644 --- a/src/System.Management.Automation/engine/remoting/commands/StopJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/StopJob.cs @@ -282,7 +282,7 @@ public void Dispose() /// /// /// - protected void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (!disposing) { diff --git a/src/System.Management.Automation/engine/remoting/commands/WaitJob.cs b/src/System.Management.Automation/engine/remoting/commands/WaitJob.cs index 626dd5133d1..d0ece473723 100644 --- a/src/System.Management.Automation/engine/remoting/commands/WaitJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/WaitJob.cs @@ -410,7 +410,7 @@ public void Dispose() /// /// if true, release all the managed objects. /// - private void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (disposing) { diff --git a/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs b/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs index 7d4a88e98bd..24db1af1174 100644 --- a/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs +++ b/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs @@ -650,7 +650,7 @@ public void Dispose() /// /// If method is called from /// disposing of destructor - private void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (disposing) { diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs index 289f88c576f..659f6c63220 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs @@ -717,7 +717,7 @@ public void Dispose() GC.SuppressFinalize(this); } - private void Dispose(bool isDisposing) + protected virtual void Dispose(bool isDisposing) { // Managed objects should not be deleted when this is called via the finalizer // because they may have been collected already. To prevent leaking the marshalledBuffer diff --git a/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs b/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs index ddc70fabd50..5b5460fa962 100644 --- a/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs +++ b/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs @@ -1323,7 +1323,7 @@ public void Dispose() GC.SuppressFinalize(this); } - private void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (_disposed) return; diff --git a/src/System.Management.Automation/utils/PlatformInvokes.cs b/src/System.Management.Automation/utils/PlatformInvokes.cs index 4405f2f6910..b937c00970e 100644 --- a/src/System.Management.Automation/utils/PlatformInvokes.cs +++ b/src/System.Management.Automation/utils/PlatformInvokes.cs @@ -561,7 +561,7 @@ public void Dispose() /// Dispose. /// /// - private void Dispose(bool disposing) + protected virtual void Dispose(bool disposing) { if (disposing) {