private void Init(string path, ParseStrategies parseStrategy) { ParseStrategy = parseStrategy; if (!string.IsNullOrWhiteSpace(path)) { Load(path, parseStrategy); } }
/// <inheritdoc /> public void Load( string path, ParseStrategies parseStrategy) { ParseStrategy = parseStrategy; _path = path; var lines = GetLinesFrom(path); Parse(lines); }
/// <summary> /// Constructs an instance of INIFile, parsing the provided /// path if found, with escaped characters enabled if /// enableEscapeCharacters is true /// </summary> /// <param name="path">Path to an existing ini file. /// Will not error if not found, but will be used as the default path /// to persist to.</param> /// <param name="parseStrategy"></param> // ReSharper disable once MemberCanBePrivate.Global public INIFile( string path, ParseStrategies parseStrategy) { Init(path, parseStrategy); }