Skip to content

Commit

Permalink
Update CsvHelper to resolve CsvHelper constructor breaking change int…
Browse files Browse the repository at this point in the history
…roduced into version 13.0.0; Resolves karlwancl#116
  • Loading branch information
onionhammer committed Feb 7, 2021
1 parent 08de02a commit da13105
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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

0 comments on commit da13105

Please sign in to comment.