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 --- .../src/CsvHelper/Delegates/GetDelimiter.cs | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ThirdParty/CsvHelper-master/src/CsvHelper/Delegates/GetDelimiter.cs (limited to 'ThirdParty/CsvHelper-master/src/CsvHelper/Delegates/GetDelimiter.cs') diff --git a/ThirdParty/CsvHelper-master/src/CsvHelper/Delegates/GetDelimiter.cs b/ThirdParty/CsvHelper-master/src/CsvHelper/Delegates/GetDelimiter.cs new file mode 100644 index 0000000..2593200 --- /dev/null +++ b/ThirdParty/CsvHelper-master/src/CsvHelper/Delegates/GetDelimiter.cs @@ -0,0 +1,44 @@ +using CsvHelper.Configuration; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CsvHelper.Delegates +{ + /// + /// Function that resolves the delimiter from the given text. + /// Returns null if no delimiter is found. + /// + /// + /// + public delegate string? GetDelimiter(GetDelimiterArgs args); + + /// + /// GetDelimiter args. + /// + public readonly struct GetDelimiterArgs + { + /// + /// The text to resolve the delimiter from. + /// + public readonly string Text; + + /// + /// The configuration. + /// + public readonly IParserConfiguration Configuration; + + /// + /// Creates an instance of GetDelimiterArgs. + /// + /// The text to resolve the delimiter from. + /// The configuration. + public GetDelimiterArgs(string text, IParserConfiguration configuration) + { + Text = text; + Configuration = configuration; + } + } +} -- cgit v1.1-26-g67d0