整理代码
This commit is contained in:
@@ -11,23 +11,23 @@ namespace ConsoleApp2.Services;
|
||||
[Obsolete]
|
||||
public class JsvSource:IDataSource
|
||||
{
|
||||
private readonly string _inputDir;
|
||||
private readonly JsvStringSerializer _jsv;
|
||||
private readonly StreamReader _reader;
|
||||
//private readonly string _inputDir;
|
||||
//private readonly JsvStringSerializer _jsv;
|
||||
//private readonly StreamReader? _reader;
|
||||
// ReSharper disable once PrivateFieldCanBeConvertedToLocalVariable
|
||||
private readonly ILogger? _logger;
|
||||
private readonly string _tableName;
|
||||
//private readonly ILogger? _logger;
|
||||
//private readonly string _tableName;
|
||||
|
||||
public DataRecord Current { get; protected set; } = null!;
|
||||
public string[]? Headers { get; }
|
||||
public bool EndOfSource => _reader.EndOfStream;
|
||||
//public bool EndOfSource => _reader.EndOfStream;
|
||||
|
||||
public JsvSource(string inputDir,string tableName, ILogger? logger = null)
|
||||
{
|
||||
_inputDir = inputDir;
|
||||
_tableName = tableName;
|
||||
_jsv = new JsvStringSerializer();
|
||||
_logger = logger;
|
||||
//_inputDir = inputDir;
|
||||
//_tableName = tableName;
|
||||
//_jsv = new JsvStringSerializer();
|
||||
//_logger = logger;
|
||||
}
|
||||
public Task DoEnqueue(Action<DataRecord> action)
|
||||
{
|
||||
@@ -36,6 +36,6 @@ public class JsvSource:IDataSource
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_reader.Dispose();
|
||||
// _reader?.Dispose();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user