From 2a1cd4fda8a4a8e649910d16b4dfa1ce7ae63543 Mon Sep 17 00:00:00 2001
From: chai <215380520@qq.com>
Date: Fri, 12 May 2023 09:24:40 +0800
Subject: *misc
---
.../CsvHelper-master/src/CsvHelper/Factory.cs | 108 +++++++++++++++++++++
1 file changed, 108 insertions(+)
create mode 100644 ThirdParty/CsvHelper-master/src/CsvHelper/Factory.cs
(limited to 'ThirdParty/CsvHelper-master/src/CsvHelper/Factory.cs')
diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper/Factory.cs b/ThirdParty/CsvHelper-master/src/CsvHelper/Factory.cs
new file mode 100644
index 0000000..80db167
--- /dev/null
+++ b/ThirdParty/CsvHelper-master/src/CsvHelper/Factory.cs
@@ -0,0 +1,108 @@
+// Copyright 2009-2022 Josh Close
+// This file is a part of CsvHelper and is dual licensed under MS-PL and Apache 2.0.
+// See LICENSE.txt for details or visit http://www.opensource.org/licenses/ms-pl.html for MS-PL and http://opensource.org/licenses/Apache-2.0 for Apache 2.0.
+// https://github.com/JoshClose/CsvHelper
+using System.Globalization;
+using System.IO;
+using CsvHelper.Configuration;
+
+namespace CsvHelper
+{
+ ///
+ /// Creates CsvHelper classes.
+ ///
+ public class Factory : IFactory
+ {
+ ///
+ /// Creates an .
+ ///
+ /// The text reader to use for the csv parser.
+ /// The configuration to use for the csv parser.
+ /// The created parser.
+ public virtual IParser CreateParser(TextReader reader, Configuration.CsvConfiguration configuration)
+ {
+ return new CsvParser(reader, configuration);
+ }
+
+ ///
+ /// Creates an .
+ ///
+ /// The text reader to use for the csv parser.
+ /// The culture information.
+ ///
+ /// The created parser.
+ ///
+ public virtual IParser CreateParser(TextReader reader, CultureInfo cultureInfo)
+ {
+ return new CsvParser(reader, cultureInfo);
+ }
+
+ ///
+ /// Creates an .
+ ///
+ /// The text reader to use for the csv reader.
+ /// The configuration to use for the reader.
+ /// The created reader.
+ public virtual IReader CreateReader(TextReader reader, Configuration.CsvConfiguration configuration)
+ {
+ return new CsvReader(reader, configuration);
+ }
+
+ ///
+ /// Creates an .
+ ///
+ /// The text reader to use for the csv reader.
+ /// The culture information.
+ ///
+ /// The created reader.
+ ///
+ public virtual IReader CreateReader(TextReader reader, CultureInfo cultureInfo)
+ {
+ return new CsvReader(reader, cultureInfo);
+ }
+
+ ///
+ /// Creates an .
+ ///
+ /// The parser used to create the reader.
+ /// The created reader.
+ public virtual IReader CreateReader(IParser parser)
+ {
+ return new CsvReader(parser);
+ }
+
+ ///
+ /// Creates an .
+ ///
+ /// The text writer to use for the csv writer.
+ /// The configuration to use for the writer.
+ /// The created writer.
+ public virtual IWriter CreateWriter(TextWriter writer, Configuration.CsvConfiguration configuration)
+ {
+ return new CsvWriter(writer, configuration);
+ }
+
+ ///
+ /// Creates an .
+ ///
+ /// The text writer to use for the csv writer.
+ /// The culture information.
+ ///
+ /// The created writer.
+ ///
+ public virtual IWriter CreateWriter(TextWriter writer, CultureInfo cultureInfo)
+ {
+ return new CsvWriter(writer, cultureInfo);
+ }
+
+ ///
+ /// Access point for fluent interface to dynamically build a
+ ///
+ /// Type you will be making a class map for
+ /// Options to further configure the
+ public IHasMap CreateClassMapBuilder()
+ {
+ return new ClassMapBuilder();
+ }
+ }
+}
--
cgit v1.1-26-g67d0