Class WindowsServiceCollection
- Namespace
- CENTREL.XIA.Configuration.Types
- Assembly
- CENTREL.XIA.Configuration.Types.dll
Represents a collection of Windows services.
public class WindowsServiceCollection : Collection<WindowsService>, IList<WindowsService>, ICollection<WindowsService>, IList, ICollection, IReadOnlyList<WindowsService>, IReadOnlyCollection<WindowsService>, IEnumerable<WindowsService>, IEnumerable
- Inheritance
-
WindowsServiceCollection
- Implements
- Inherited Members
Constructors
WindowsServiceCollection()
Initializes a new instance of the CENTREL.XIA.Configuration.Types.WindowsServiceCollection class.
public WindowsServiceCollection()
Methods
Exists(string)
Determines whether the service with the specified name exists within the collection.
public bool Exists(string name)
Parameters
name
stringThe internal service name for example "WINS".
Returns
- bool
A System.Boolean value that indicated whether the service with the specified name is installed.
FindByName(string)
Finds the Windows service with the specified name, if no service with that name is found null is returned.
public WindowsService FindByName(string name)
Parameters
name
stringThe internal service name, case insensitive - for example "DHCPServer".
Returns
- WindowsService
The Windows service with the specified name, if no service with that name is found null is returned.
IsServiceInstalled(string)
Determines whether the service with the specified name is installed.
public bool IsServiceInstalled(string name)
Parameters
name
stringThe internal service name for example "WINS".
Returns
- bool
A System.Boolean value that indicated whether the service with the specified name is installed.
IsServiceStarted(string)
Determines whether the service with the specified name is installed and running at the time of the scan.
public bool IsServiceStarted(string name)
Parameters
name
stringThe internal service name - for example "WINS".
Returns
- bool
A System.Boolean value that indicated whether the service with the specified name is installed and running at the time of the scan.
Sort()
Sorts the Windows services by the service display name.
public void Sort()