Skip to content

Commit c87e75e

Browse files
committed
Comment dispose
1 parent 0f770d5 commit c87e75e

File tree

2 files changed

+6
-0
lines changed
  • src/libraries/System.ServiceProcess.ServiceController

2 files changed

+6
-0
lines changed

src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceBase.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ internal static bool ValidServiceName(string serviceName)
305305
/// <devdoc>
306306
/// <para>Disposes of the resources (other than memory ) used by
307307
/// the <see cref='System.ServiceProcess.ServiceBase'/>.</para>
308+
/// This is called from <see cref="Run(ServiceBase[])"/> when all
309+
/// services in the process have entered the SERVICE_STOPPED state.
308310
/// </devdoc>
309311
protected override void Dispose(bool disposing)
310312
{

src/libraries/System.ServiceProcess.ServiceController/tests/System.ServiceProcess.ServiceController.TestService/TestService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ public async Task WriteStreamAsync(PipeMessageByteCode code, int command = 0)
116116
}
117117
}
118118

119+
/// <summary>
120+
/// This is called from <see cref="ServiceBase.Run(ServiceBase[])"/> when all services in the process
121+
/// have entered the SERVICE_STOPPED state. It disposes the named pipe stream.
122+
/// </summary>
119123
protected override void Dispose(bool disposing)
120124
{
121125
if (!_disposed)

0 commit comments

Comments
 (0)