IServiceManager Interface

Summary

Responsible for controlling windows services
Assembly
Cake.Services.dll
Namespace
Cake.Services
Implementing Types
graph BT Type["IServiceManager"] class Type type-node Implementing0["ServiceManager"]-.->Type click Implementing0 "/api/Cake.Services/ServiceManager"

Syntax

public interface IServiceManager

Methods

Name Value Summary
CanPauseAndContinue(string, string) bool
Checks if the named service can be paused and continued
CanShutdown(string, string) bool
Checks if the named service can be shutdown
CanStop(string, string) bool
Checks if the named service can be stopped
Continue(string, string, int) bool
Continues a named service
ExecuteCommand(string, string, int) bool
Executes a command on a named service
GetService(string, string) ServiceController
Gets the System.ServiceProcess.ServiceController that is associated with an existing service on the specified computer.
GetServices(string) List<ServiceController>
Gets a list of System.ServiceProcess.ServiceController on the specified computer.
GetStatus(string, string) ServiceControllerStatus
Gets the System.ServiceProcess.ServiceControllerStatus status of a service on the specified computer.
Install(string, InstallSettings) void
Installs a service on a computer
IsContinuing(string, string) bool
Checks if the named service is continuing
IsInstalled(string, string) bool
Checks if the named service is installed
IsPaused(string, string) bool
Checks if the named service is paused
IsPausing(string, string) bool
Checks if the named service is pausing
IsRunning(string, string) bool
Checks if the named service is running
IsStarting(string, string) bool
Checks if the named service is starting
IsStopped(string, string) bool
Checks if the named service is stopped
IsStopping(string, string) bool
Checks if the named service is stopping
Pause(string, string, int) bool
Pauses a named service
Restart(string, string, int) bool
Restarts a named service
ServiceExists(string, string) bool
Checks if the named service exists
Start(string, string, int, string[]) bool
Starts a named service
Stop(string, string, int) bool
Stops a named service
Uninstall(string, string) bool
Uninstalls a service from a computer

Extension Methods

Name Value Summary
Dump<IServiceManager>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<IServiceManager>(IServiceManager[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<IServiceManager>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<IServiceManager>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<IServiceManager>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<IServiceManager>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin