Table of Contents

Class RecoveryDataOption

Namespace
Archiver.App.Core
Assembly
Archiver.App.Core.dll

T-F275: the "New archive" card's option to write PAR2 recovery data next to the archive — 5, 10 or 20 % (default 5), hidden by the DisableRecoveryData policy.

public static class RecoveryDataOption
Inheritance
RecoveryDataOption
Inherited Members

Fields

DefaultIndex

The choice selected until the user picks another.

public const int DefaultIndex = 0

Field Value

int

Properties

Percents

The choices the card offers, in list order.

public static IReadOnlyList<int> Percents { get; }

Property Value

IReadOnlyList<int>

Methods

IsOffered(GroupPolicyOptions)

Whether the card shows the option at all.

public static bool IsOffered(GroupPolicyOptions policy)

Parameters

policy GroupPolicyOptions

Returns

bool

PercentFor(GroupPolicyOptions, bool, int)

What RecoveryPercent gets: 0 when unticked or not offered.

public static int PercentFor(GroupPolicyOptions policy, bool add, int index)

Parameters

policy GroupPolicyOptions
add bool
index int

Returns

int

PercentText(int, CultureInfo)

A choice as the culture writes a percent ("5%", "5 %", "%5").

public static string PercentText(int percent, CultureInfo culture)

Parameters

percent int
culture CultureInfo

Returns

string