Skip to content

API Proposal: ServiceBase.IsRunningInWindowsService #29252

Open
@davidfowl

Description

@davidfowl

We recently added an API to detect if a .NET process was being lauched as a windows service (dotnet/extensions#1369). I believe this belongs in SeviceBase as it would be useful to have this feature outside of our hosting wrapper.

public class ServiceBase
{
    public static bool IsRunningInWindowsService { get; }
}

I'm open to other names.

  • IsRunningUnderWindowsService

cc @danmosemsft

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions