dotnet / dotnet/dotnet-api-docs
System.ServiceProcess.ServiceBase.Run
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
[System.ServiceProcess.ServiceBase.Run](https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.ServiceProcess/ServiceBase.xml#L1204) states that:
> After you call [Run(ServiceBase)](https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicebase.run#system-serviceprocess-servicebase-run(system-serviceprocess-servicebase)), the Service Control Manager issues a Start command, which results in a call to the [OnStart](https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicebase.onstart) method in the service. The service is not started until the Start command is executed.
It would be important to make clear that the SCM will not consider the service started until [OnStart](https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicebase.onstart) is invoked by the [ServiceBase](https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicebase) derived class.
Contributor guide
Assessment
This issue has not been assessed yet.