Open GZidar opened 4 years ago
Tagging subscribers to this area: @eerhardt, @maryamariyan See info in area-owners.md if you want to be subscribed.
It might be better to give people a way to get the raw events from service base somehow
What are "worker services" in this context?
What are "worker services" in this context?
It's a console app hooked up to Microsoft.Extensions.Hosting.
Tagging subscribers to this area: @eerhardt, @maryamariyan See info in area-owners.md if you want to be subscribed.
Author: | GZidar |
---|---|
Assignees: | - |
Labels: | `area-System.ServiceProcess`, `untriaged`, `area-Extensions-Hosting` |
Milestone: | - |
@GZidar perhaps you'd like to offer an API proposal in this issue similar to this template. You can edit the top post. https://github.com/dotnet/runtime/issues/new?assignees=&labels=api-suggestion&template=02_api_proposal.yml&title=%5BAPI+Proposal%5D%3A+
Has there been any consideration given to allowing the net core worker services to receive notifications from the OS when a device is put to sleep or resumes from sleep. This is available in the .net framework System.ServiceProcess.ServiceBase classes but does not appear to have an equivalent in the worker service implementations.
Is there any way to do this already?
Describe the solution you'd like
The way this is done in the System.ServiceProcess.ServiceBase seems like a reasonable approach. Service hooks into OS level events that allow the developer to customize how their service reacts to the various messages.
Additional context
Ideally this would be available on all platforms but if that is not possible then perhaps it should be accessed via the WindowsServiceLifetime hooks (or something)