PeanutButter
Loading...
Searching...
No Matches
PeanutButter.WindowsServiceManagement.ServiceControlInterface Class Reference

More...

Inheritance diagram for PeanutButter.WindowsServiceManagement.ServiceControlInterface:
PeanutButter.WindowsServiceManagement.IServiceControlInterface

Public Member Functions

string FindServiceByPid (int pid)
 Attempt to identify the service associated with the provided process id. If the process id is not for a service, the return value will be null.
Parameters
pid
Returns

IEnumerable< string > ListAllServices ()
 List all known services on the local machine.
Returns

IDictionary< string, string > QueryAll (string serviceName)
 Query all information (queryex and config) about a service by name.
Parameters
serviceName
Returns

IDictionary< string, string > QueryEx (string serviceName)
 Perform a queryex for a service by name.
Parameters
serviceName
Returns

IDictionary< string, string > QueryConfiguration (string serviceName)
 Query service configuration by service name.
Parameters
serviceName
Returns

IDictionary< string, string > RunServiceControl (params string[] args)
 Run a raw sc.exe command with the provided arguments and get back the raw-ish key-value pairs of information.
Parameters
args
Returns

Detailed Description

Member Function Documentation

◆ FindServiceByPid()

string PeanutButter.WindowsServiceManagement.ServiceControlInterface.FindServiceByPid ( int pid)

Attempt to identify the service associated with the provided process id. If the process id is not for a service, the return value will be null.

Parameters
pid
Returns

Implements PeanutButter.WindowsServiceManagement.IServiceControlInterface.

◆ ListAllServices()

IEnumerable< string > PeanutButter.WindowsServiceManagement.ServiceControlInterface.ListAllServices ( )

List all known services on the local machine.

Returns

Implements PeanutButter.WindowsServiceManagement.IServiceControlInterface.

◆ QueryAll()

IDictionary< string, string > PeanutButter.WindowsServiceManagement.ServiceControlInterface.QueryAll ( string serviceName)

Query all information (queryex and config) about a service by name.

Parameters
serviceName
Returns

Implements PeanutButter.WindowsServiceManagement.IServiceControlInterface.

◆ QueryConfiguration()

IDictionary< string, string > PeanutButter.WindowsServiceManagement.ServiceControlInterface.QueryConfiguration ( string serviceName)

Query service configuration by service name.

Parameters
serviceName
Returns

Implements PeanutButter.WindowsServiceManagement.IServiceControlInterface.

◆ QueryEx()

IDictionary< string, string > PeanutButter.WindowsServiceManagement.ServiceControlInterface.QueryEx ( string serviceName)

Perform a queryex for a service by name.

Parameters
serviceName
Returns

Implements PeanutButter.WindowsServiceManagement.IServiceControlInterface.

◆ RunServiceControl()

IDictionary< string, string > PeanutButter.WindowsServiceManagement.ServiceControlInterface.RunServiceControl ( params string[] args)

Run a raw sc.exe command with the provided arguments and get back the raw-ish key-value pairs of information.

Parameters
args
Returns

Implements PeanutButter.WindowsServiceManagement.IServiceControlInterface.


The documentation for this class was generated from the following file:
  • source/Win32Service/PeanutButter.WindowsServiceManagement/ServiceControlInterface.cs