SwaponCommand.Builder

Fluent builder.

public class SwaponCommand.Builder :
    LinuxCommandBase.BuilderBase<SwaponCommand, SwaponCommand.Builder>

1. Constructors

1.1. Builder()

Creates a new builder pointed at /sbin/swapon.

public Builder()

2. Methods

2.1. BuildInternal(CliWrap.Command)

protected override SwaponCommand BuildInternal(CliWrap.Command cliCommand)
Table 1. Parameters
Name Type Description

cliCommand

CliWrap.Command

Returns: SwaponCommand

2.2. EnableDiscard()

Discard freed pages back to the device (--discard).

public SwaponCommand.Builder EnableDiscard()

Returns: SwaponCommand.Builder

2.3. ForAll()

Activate all swap areas listed in /etc/fstab (-a).

public SwaponCommand.Builder ForAll()

Returns: SwaponCommand.Builder

2.4. WithDevice(string)

Block device or file to enable as swap (positional).

public SwaponCommand.Builder WithDevice(string device)
Table 2. Parameters
Name Type Description

device

string

Returns: SwaponCommand.Builder

2.5. WithPriority(int)

Set swap priority 0..32767 (-p <prio>).

public SwaponCommand.Builder WithPriority(int priority)
Table 3. Parameters
Name Type Description

priority

int

Returns: SwaponCommand.Builder