Exemple #1
0
 private void Init(string path, ParseStrategies parseStrategy)
 {
     ParseStrategy = parseStrategy;
     if (!string.IsNullOrWhiteSpace(path))
     {
         Load(path, parseStrategy);
     }
 }
Exemple #2
0
        /// <inheritdoc />
        public void Load(
            string path,
            ParseStrategies parseStrategy)
        {
            ParseStrategy = parseStrategy;
            _path         = path;
            var lines = GetLinesFrom(path);

            Parse(lines);
        }
Exemple #3
0
 /// <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);
 }