dotnet / dotnet/dotnet-api-docs
CanStop details
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
In a service that inherits from ServiceBase, what is the default value of CanStop? Does it default to true? Is it based on the presence of an OnStop() override? Do we ever need to set this value, other than setting it to false for a service that can't stop?
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 986d4f38-1158-a27c-82b9-8744ffe4325c
* Version Independent ID: 49855b1c-be50-9dfb-9c75-fe6e264ca9b0
* Content: [ServiceBase.CanStop Property (System.ServiceProcess)](https://docs.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicebase.canstop?view=netframework-4.7.2#System_ServiceProcess_ServiceBase_CanStop)
* Content Source: [xml/System.ServiceProcess/ServiceBase.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.ServiceProcess/ServiceBase.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Research direction
Start with xml/System.ServiceProcess/ServiceBase.xml and the linked ServiceBase.CanStop API page. Check the existing property documentation and the ServiceBase behavior relevant to the questions about defaults and OnStop overrides. Done means the API documentation clearly answers whether CanStop defaults to true, whether an override affects it, and when it must be set.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100