summaryrefslogtreecommitdiff
path: root/ThirdParty/CsvHelper-master/src/CsvHelper/Delegates/GetDelimiter.cs
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2023-05-12 09:24:40 +0800
committerchai <215380520@qq.com>2023-05-12 09:24:40 +0800
commit2a1cd4fda8a4a8e649910d16b4dfa1ce7ae63543 (patch)
treea471fafed72e80b4ac3ac3002e06c34220dd6058 /ThirdParty/CsvHelper-master/src/CsvHelper/Delegates/GetDelimiter.cs
parentb8a694746562b37dc8dc5b8b5aec8612bb0964fc (diff)
*misc
Diffstat (limited to 'ThirdParty/CsvHelper-master/src/CsvHelper/Delegates/GetDelimiter.cs')
-rw-r--r--ThirdParty/CsvHelper-master/src/CsvHelper/Delegates/GetDelimiter.cs44
1 files changed, 44 insertions, 0 deletions
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
+{
+ /// <summary>
+ /// Function that resolves the delimiter from the given text.
+ /// Returns null if no delimiter is found.
+ /// </summary>
+ /// <param name="args"></param>
+ /// <returns></returns>
+ public delegate string? GetDelimiter(GetDelimiterArgs args);
+
+ /// <summary>
+ /// GetDelimiter args.
+ /// </summary>
+ public readonly struct GetDelimiterArgs
+ {
+ /// <summary>
+ /// The text to resolve the delimiter from.
+ /// </summary>
+ public readonly string Text;
+
+ /// <summary>
+ /// The configuration.
+ /// </summary>
+ public readonly IParserConfiguration Configuration;
+
+ /// <summary>
+ /// Creates an instance of GetDelimiterArgs.
+ /// </summary>
+ /// <param name="text">The text to resolve the delimiter from.</param>
+ /// <param name="configuration">The configuration.</param>
+ public GetDelimiterArgs(string text, IParserConfiguration configuration)
+ {
+ Text = text;
+ Configuration = configuration;
+ }
+ }
+}