/// <summary>
 /// Create new .json reader.
 /// </summary>
 /// <param name="ext"></param>
 /// <param name="lineFactory"></param>
 public JsonLinesReader(string ext, ILineFactory lineFactory)
 {
     this.Extension   = ext ?? throw new ArgumentNullException(nameof(ext));
     this.lineFormat  = new LineFormat(" :\\", false, " :\\", false, lineFactory, null) ?? throw new ArgumentNullException(nameof(lineFactory));
     this.LineFactory = lineFactory;
     lineFactory.TryGetResolver(out resolver);
 }
Пример #2
0
 /// <summary>
 /// Create new ini file reader.
 /// </summary>
 /// <param name="ext"></param>
 /// <param name="lineFactory"></param>
 public IniLinesReader(string ext, ILineFactory lineFactory)
 {
     this.Extension       = ext ?? throw new ArgumentNullException(nameof(ext));
     this.LineFactory     = lineFactory ?? throw new ArgumentNullException(nameof(LineFactory));
     this.escaper_section = new LineFormat("\\:[]", true, "\\:[]", true, lineFactory, null);
     this.escaper_key     = new LineFormat("\\:= ", true, "\\:= ", true, lineFactory, null);
     this.LineFactory     = lineFactory;
     lineFactory.TryGetResolver(out resolver);
 }