/// <summary> /// 注册Csv服务 /// </summary> public override void Register() { App.Singleton <CsvParser>((app, param) => { var rfcOptions = new Rfc4180Options(); var options = new CsvParserOptions(new RFC4180Parser(rfcOptions)); return(new CsvParser(options)); }).Alias <ICsvParser>().Alias("csv.parser"); }
/// <summary> /// 构建一个解析器 /// </summary> /// <param name="options">解析配置</param> public RFC4180Parser(Rfc4180Options options) { render = new Rfc4180Reader(options); }
/// <summary> /// 构建一个RFC4180规则的渲染器 /// </summary> /// <param name="options">渲染器配置</param> public Rfc4180Reader(Rfc4180Options options) { this.options = options; }