TestimoX

API Reference

Class

WindowsServiceRecoveryOptions

Namespace ComputerX.Services
Assembly ComputerX
Modifiers sealed

Describes recovery policy options for a Windows service.

Inheritance

  • Object
  • WindowsServiceRecoveryOptions

Constructors

public WindowsServiceRecoveryOptions() #

Methods

public static WindowsServiceRecoveryOptions CreateRestartOnly(TimeSpan resetPeriod, TimeSpan firstDelay, TimeSpan secondDelay, TimeSpan subsequentDelay) #
Returns: WindowsServiceRecoveryOptions

Creates a recovery policy that restarts the service after the first, second, and subsequent failures.

Parameters

resetPeriod System.TimeSpan requiredposition: 0
firstDelay System.TimeSpan requiredposition: 1
secondDelay System.TimeSpan requiredposition: 2
subsequentDelay System.TimeSpan requiredposition: 3

Properties

public TimeSpan ResetPeriod { get; set; } #

Gets or sets the period after which Windows resets the failure count.

public String RebootMessage { get; set; } #

Gets or sets the message broadcast before a reboot action.

public String Command { get; set; } #

Gets or sets the command executed for RunCommand.

public IReadOnlyList<WindowsServiceRecoveryAction> Actions { get; set; } #

Gets or sets the ordered recovery actions.