blob: 259320085d63f255e85afbdc931454946079b994 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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;
}
}
}
|