Skip to content

Commit

Permalink
Merge pull request #17 from akriger/bug/git-issue-16
Browse files Browse the repository at this point in the history
Github #16: Fix CsvWriter Initialization
  • Loading branch information
valdisiljuconoks authored Jan 13, 2025
2 parents 00f9c3b + f760cc7 commit 4a983e4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file.

## [4.0.1]
* Fixed issue with CsvWriter initialization

## [4.0.0]

* Target .NET8
Expand Down
4 changes: 1 addition & 3 deletions src/Geta.Optimizely.ProductFeed.Csv/CsvFeedExporter.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Copyright (c) Geta Digital. All rights reserved.
// Licensed under Apache-2.0. See the LICENSE file in the project root for more information

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Threading;
using CsvHelper;
using CsvHelper.Configuration;
using EPiServer.Web;
using Geta.Optimizely.ProductFeed.Models;

Expand All @@ -20,7 +18,7 @@ public class CsvFeedExporter<TEntity>(CsvFeedDescriptor<TEntity> descriptor) : A
public override void BeginExport(HostDefinition host, CancellationToken cancellationToken)
{
base.BeginExport(host, cancellationToken);
_writer = new CsvWriter(new StreamWriter(_buffer), new CsvConfiguration(CultureInfo.InvariantCulture));
_writer = new CsvWriter(new StreamWriter(_buffer), CultureInfo.InvariantCulture);
_writer.WriteHeader(descriptor.CsvEntityType);
_writer.NextRecord();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>4.0.0</Version>
<PackageVersion>4.0.0</PackageVersion>
<Version>4.0.1</Version>
<PackageVersion>4.0.1</PackageVersion>
<PackageId>Geta.Optimizely.ProductFeed.Csv</PackageId>
<Title>Geta Optimizely Csv Product Feed ProductFeed</Title>
<IsPackable>true</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>4.0.0</Version>
<PackageVersion>4.0.0</PackageVersion>
<Version>4.0.1</Version>
<PackageVersion>4.0.1</PackageVersion>
<PackageId>Geta.Optimizely.ProductFeed.Google</PackageId>
<Title>Geta Optimizely Google Product Feed ProductFeed</Title>
<IsPackable>true</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>4.0.0</Version>
<PackageVersion>4.0.0</PackageVersion>
<Version>4.0.1</Version>
<PackageVersion>4.0.1</PackageVersion>
<PackageId>Geta.Optimizely.ProductFeed</PackageId>
<Title>Geta Optimizely Product Feed ProductFeed</Title>
<IsPackable>true</IsPackable>
Expand Down

0 comments on commit 4a983e4

Please sign in to comment.