Table of Contents

Class WindowsServiceRecoverySettings

Namespace
CENTREL.XIA.Configuration.Types
Assembly
CENTREL.XIA.Configuration.Types.dll

Represents the recovery settings for a service running on a Windows machine. These settings apply to Windows 2000 and above only.

public class WindowsServiceRecoverySettings : BypassSection
Inheritance
WindowsServiceRecoverySettings
Inherited Members

Constructors

WindowsServiceRecoverySettings()

Initializes a new instance of the CENTREL.XIA.Configuration.Types.WindowsServiceRecoverySettings class.

public WindowsServiceRecoverySettings()

Properties

ComputerRestartDelay

Gets or sets the number of milliseconds after a service fails before the computer is restarted. This setting only applies if one of the failure actions is set to "RestartComputer".

public int ComputerRestartDelay { get; set; }

Property Value

int

ComputerRestartDelayString

Gets the delay after a service fails before the computer is restarted. This setting only applies if one of the failure actions is set to "Restart the Computer".

public string ComputerRestartDelayString { get; }

Property Value

string

EnableActionsForStopsWithErrors

Gets or sets whether to enable actions for stops with errors. This setting applies to Windows 2008 and above only.

public BooleanOption EnableActionsForStopsWithErrors { get; set; }

Property Value

BooleanOption

FailureCommand

Gets or sets the command to run if the service fails including any command line parameters. This setting only applies if one of the failure actions is set to "Run a Program".

public string FailureCommand { get; set; }

Property Value

string

FirstFailureAction

Gets or sets the recovery action that should be taken on the first failure.

public WindowsServiceRecoveryAction FirstFailureAction { get; set; }

Property Value

WindowsServiceRecoveryAction

FirstFailureActionString

Gets the recovery action that should be taken on the first failure as a human readable string.

public string FirstFailureActionString { get; set; }

Property Value

string

IncludesComputerRestart

Gets or sets whether the recovery options include a computer restart action.

[Browsable(false)]
public bool IncludesComputerRestart { get; }

Property Value

bool

IncludesRunProgram

Gets or sets whether the recovery options include a run program action.

[Browsable(false)]
public bool IncludesRunProgram { get; }

Property Value

bool

IncludesServiceRestart

Gets or sets whether the recovery options include a service restart action.

[Browsable(false)]
public bool IncludesServiceRestart { get; }

Property Value

bool

ResetFailureCount

Gets or sets the number of seconds after which the failure count should be reset.

public int ResetFailureCount { get; set; }

Property Value

int

ResetFailureCountString

Gets the number of days after which the failure count should be reset.

public string ResetFailureCountString { get; }

Property Value

string

SecondFailureAction

Gets or sets the recovery action that should be taken on the second failure.

public WindowsServiceRecoveryAction SecondFailureAction { get; set; }

Property Value

WindowsServiceRecoveryAction

SecondFailureActionString

Gets the recovery action that should be taken on the second failure as a human readable string.

public string SecondFailureActionString { get; set; }

Property Value

string

ServiceRestartDelay

Gets or sets the number of milliseconds before a failed service is restarted. This setting only applies if one of the failure actions is set to "RestartService".

public int ServiceRestartDelay { get; set; }

Property Value

int

ServiceRestartDelayString

Gets the delay before a failed service is restarted. This setting only applies if one of the failure actions is set to "Restart the Service".

public string ServiceRestartDelayString { get; }

Property Value

string

SubsequentFailureAction

Gets or sets the recovery action that should be taken on the subsequent failures.

public WindowsServiceRecoveryAction SubsequentFailureAction { get; set; }

Property Value

WindowsServiceRecoveryAction

SubsequentFailureActionString

Gets the recovery action that should be taken on the subsequent failures as a human readable string.

public string SubsequentFailureActionString { get; set; }

Property Value

string

Methods

ToString()

Returns the recovery settings as a human readable string.

public override string ToString()

Returns

string

The recovery settings as a human readable string.