Table of Contents

Class Options

Namespace
NLightning.NLTG
Assembly
NLightning.NLTG.dll
[YamlSerializable]
public class Options
Inheritance
Options
Inherited Members

Constructors

Options()

public Options()

Properties

ConfigFile

Path to the configuration file

[YamlIgnore]
public string ConfigFile { get; set; }

Property Value

string

IsConfigFileDefault

Check if the config file is the default location

[YamlIgnore]
public bool IsConfigFileDefault { get; }

Property Value

bool

IsLogFileDefault

Check if the log file is the default location

[YamlIgnore]
public bool IsLogFileDefault { get; }

Property Value

bool

LogFile

Log file location to write to

public string LogFile { get; set; }

Property Value

string

LogLevel

Log level to write to the log file

public LogEventLevel LogLevel { get; set; }

Property Value

LogEventLevel

Network

Network to connect to

public Network Network { get; set; }

Property Value

Network
See Also

Peers

List of peers to connect to

public List<object> Peers { get; set; }

Property Value

List<object>

Methods

FromFile(string)

Load the Options from a file

public static Options FromFile(string configFile)

Parameters

configFile string

Config file location

Returns

Options

Serialized Options

MergeWith(Options)

Merge this Options object with another Options object

public Options MergeWith(Options other)

Parameters

other Options

Secondary Options to merge with

Returns

Options

Merged Options

Remarks

This takes precedence over Other

SaveToFile()

Save the Options to the current config file

public void SaveToFile()

ToString()

Convert the Options to a string following the YAML format

public override string ToString()

Returns

string

String that mimics the config file

WithNetwork(Network)

Replace the current network with the provided network

public Options WithNetwork(Network network)

Parameters

network Network

Returns

Options