-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CsvReader, CsvWriter, ExcelReader, ExcelWriter
- Loading branch information
1 parent
b6b8656
commit d82e5c3
Showing
21 changed files
with
193 additions
and
110 deletions.
There are no files selected for viewing
11 changes: 8 additions & 3 deletions
11
src/ModularMonolith/ClassifiedAds.CrossCuttingConcerns/Csv/ICsvReader.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
namespace ClassifiedAds.CrossCuttingConcerns.Csv; | ||
|
||
public interface ICsvReader<T> | ||
where T : ICsvResponse | ||
{ | ||
IEnumerable<T> Read(Stream stream); | ||
Task<T> ReadAsync(Stream stream); | ||
} | ||
|
||
public interface ICsvResponse | ||
{ | ||
} |
11 changes: 8 additions & 3 deletions
11
src/ModularMonolith/ClassifiedAds.CrossCuttingConcerns/Csv/ICsvWriter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
namespace ClassifiedAds.CrossCuttingConcerns.Csv; | ||
|
||
public interface ICsvWriter<T> | ||
where T : ICsvRequest | ||
{ | ||
void Write(IEnumerable<T> collection, Stream stream); | ||
Task WriteAsync(T data, Stream stream); | ||
} | ||
|
||
public interface ICsvRequest | ||
{ | ||
} |
8 changes: 7 additions & 1 deletion
8
src/ModularMonolith/ClassifiedAds.CrossCuttingConcerns/Excel/IExcelReader.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
namespace ClassifiedAds.CrossCuttingConcerns.Excel; | ||
|
||
public interface IExcelReader<T> | ||
where T : IExcelResponse | ||
{ | ||
Task<T> ReadAsync(Stream stream); | ||
} | ||
|
||
public interface IExcelResponse | ||
{ | ||
T Read(Stream stream); | ||
} |
8 changes: 7 additions & 1 deletion
8
src/ModularMonolith/ClassifiedAds.CrossCuttingConcerns/Excel/IExcelWriter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
namespace ClassifiedAds.CrossCuttingConcerns.Excel; | ||
|
||
public interface IExcelWriter<T> | ||
where T : IExcelRequest | ||
{ | ||
void Write(T data, Stream stream); | ||
Task WriteAsync(T data, Stream stream); | ||
} | ||
|
||
public interface IExcelRequest | ||
{ | ||
} |
17 changes: 0 additions & 17 deletions
17
src/ModularMonolith/ClassifiedAds.Infrastructure/Csv/CsvReader.cs
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/ModularMonolith/ClassifiedAds.Infrastructure/Csv/CsvWriter.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...arMonolith/ClassifiedAds.Modules.Configuration/Excel/ExportConfigurationEntriesToExcel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using ClassifiedAds.CrossCuttingConcerns.Excel; | ||
using ClassifiedAds.Modules.Configuration.Entities; | ||
using System.Collections.Generic; | ||
|
||
namespace ClassifiedAds.Modules.Configuration.Excel; | ||
|
||
public class ExportConfigurationEntriesToExcel : IExcelRequest | ||
{ | ||
public List<ConfigurationEntry> ConfigurationEntries { get; set; } | ||
} |
Oops, something went wrong.