C# Class CCNet.Common.Helpers.ServiceHelper

Common methods for working with properties collections.
Show file Open project: shuruev/CCNet.Extensions

Public Methods

Method Description
DeletePreviouslyInstalledServices ( ) : void

Deletes previously installed services.

GetServiceItemList ( TargetFramework targetFramework, string binaryPathName ) : List

Gets services properties.

Private Methods

Method Description
CreateCustomProcess ( string command, string arguments, bool runAsAdministrator = false ) : Process

Creates process with custom settings.

GetInstalledServiceBinaryPathName ( string serviceName ) : string

Gets binary path name for service with specified service name.

GetInstalledServices ( ) : HashSet

Gets properties of installed services.

InstallService ( TargetFramework targetFramework, string binaryPathName ) : void

Installs services.

ParseServiceBinaryPathName ( string output ) : string

Parses output of "sc qc SERVICE_NAME" command to extract binary path name.

ParseServicesOutput ( string output ) : HashSet

Parses output of "sc query" command to extract currently installed services.

UninstallService ( TargetFramework targetFramework, string binaryPathName ) : void

Uninstalls services.

Method Details

DeletePreviouslyInstalledServices() public static method

Deletes previously installed services.
public static DeletePreviouslyInstalledServices ( ) : void
return void

GetServiceItemList() public static method

Gets services properties.
public static GetServiceItemList ( TargetFramework targetFramework, string binaryPathName ) : List
targetFramework TargetFramework
binaryPathName string
return List