Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CsvHelper #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Trady.Importer.AlphaVantage/AlphaVantageImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected HttpClient Client
var culture = "en-US";
var cultureInfo = new CultureInfo(culture);
var candles = new List<IOhlcv>();
using(var csvReader = new CsvReader(textReader, new Configuration() { CultureInfo = cultureInfo, Delimiter = ",", HasHeaderRecord = true }))
using(var csvReader = new CsvReader(textReader, new CsvConfiguration(cultureInfo) { Delimiter = ",", HasHeaderRecord = true }))
{
bool isHeaderBypassed = false;
while (csvReader.Read())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CsvHelper" Version="7.1.1" />
<PackageReference Include="CsvHelper" Version="13.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Trady.Importer.Csv/CsvImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public CsvImporter(string path, CsvImportConfiguration configuration): this(path
{
using (var fs = File.OpenRead(_path))
using (var sr = new StreamReader(fs))
using (var csvReader = new CsvReader(sr, new Configuration() { CultureInfo = _culture, Delimiter = string.IsNullOrWhiteSpace(_delimiter) ? "," : _delimiter, HasHeaderRecord = _hasHeader }))
using (var csvReader = new CsvReader(sr, new CsvConfiguration(_culture) { Delimiter = string.IsNullOrWhiteSpace(_delimiter) ? "," : _delimiter, HasHeaderRecord = _hasHeader }))
{
var candles = new List<IOhlcv>();
bool isHeaderBypassed = false;
Expand Down
2 changes: 1 addition & 1 deletion Trady.Importer.Csv/Trady.Importer.Csv.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CsvHelper" Version="7.1.1" />
<PackageReference Include="CsvHelper" Version="13.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Trady.Core\Trady.Core.csproj" />
Expand Down