dotnet / dotnet/dotnet-api-docs

CanStop details

Open
#858 0 comments 0 reactions 0 assignees View on GitHub
area-System.ServiceProcess dotnet-api/prod Pri2 untriaged
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.