Skip to content

Commit 452d85e

Browse files
Changes to the FluentMapping folder structure
- Renamed namespace Mapping to FluentMapping - Moved mapping importer, exporter and templater to new Api folder - Moved methods GetMappingImporter, GetMappingExporter and GetMappingTemplater from MiniExcelProviders to a ProviderExtensions class as extension methods
1 parent ca5a620 commit 452d85e

32 files changed

+57
-41
lines changed

benchmarks/MiniExcel.Benchmarks/BenchmarkSections/CreateExcelBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using DocumentFormat.OpenXml.Spreadsheet;
77
using MiniExcelLib.Benchmarks.Utils;
88
using MiniExcelLib.Core;
9-
using MiniExcelLib.Core.Mapping;
9+
using MiniExcelLib.Core.FluentMapping;
1010
using NPOI.XSSF.UserModel;
1111
using OfficeOpenXml;
1212

benchmarks/MiniExcel.Benchmarks/BenchmarkSections/QueryExcelBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using DocumentFormat.OpenXml.Spreadsheet;
66
using ExcelDataReader;
77
using MiniExcelLib.Core;
8-
using MiniExcelLib.Core.Mapping;
8+
using MiniExcelLib.Core.FluentMapping;
99
using NPOI.XSSF.UserModel;
1010
using OfficeOpenXml;
1111

benchmarks/MiniExcel.Benchmarks/BenchmarkSections/TemplateExcelBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using ClosedXML.Report;
33
using MiniExcelLib.Benchmarks.Utils;
44
using MiniExcelLib.Core;
5-
using MiniExcelLib.Core.Mapping;
5+
using MiniExcelLib.Core.FluentMapping;
66

77
namespace MiniExcelLib.Benchmarks.BenchmarkSections;
88

src/MiniExcel.Core/Mapping/MappingExporter.cs renamed to src/MiniExcel.Core/FluentMapping/Api/MappingExporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace MiniExcelLib.Core.Mapping;
1+
namespace MiniExcelLib.Core.FluentMapping;
22

33
public sealed partial class MappingExporter
44
{

src/MiniExcel.Core/Mapping/MappingImporter.cs renamed to src/MiniExcel.Core/FluentMapping/Api/MappingImporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace MiniExcelLib.Core.Mapping;
1+
namespace MiniExcelLib.Core.FluentMapping;
22

33
public sealed partial class MappingImporter()
44
{

src/MiniExcel.Core/Mapping/MappingTemplater.cs renamed to src/MiniExcel.Core/FluentMapping/Api/MappingTemplater.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace MiniExcelLib.Core.Mapping;
1+
namespace MiniExcelLib.Core.FluentMapping;
22

33
public sealed partial class MappingTemplater()
44
{
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace MiniExcelLib.Core.FluentMapping;
2+
3+
public static class ProviderExtensions
4+
{
5+
public static MappingExporter GetMappingExporter(this MiniExcelExporterProvider exporterProvider) => new();
6+
public static MappingExporter GetMappingExporter(this MiniExcelExporterProvider exporterProvider, MappingRegistry registry) => new(registry);
7+
8+
public static MappingImporter GetMappingImporter(this MiniExcelImporterProvider importerProvider) => new();
9+
public static MappingImporter GetMappingImporter(this MiniExcelImporterProvider importerProvider, MappingRegistry registry) => new(registry);
10+
11+
public static MappingTemplater GetMappingTemplater(this MiniExcelTemplaterProvider templaterProvider) => new();
12+
public static MappingTemplater GetMappingTemplater(this MiniExcelTemplaterProvider templaterProvider, MappingRegistry registry) => new(registry);
13+
}

src/MiniExcel.Core/Mapping/CompiledMapping.cs renamed to src/MiniExcel.Core/FluentMapping/CompiledMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace MiniExcelLib.Core.Mapping;
1+
namespace MiniExcelLib.Core.FluentMapping;
22

33
internal class CompiledMapping<T>
44
{

src/MiniExcel.Core/Mapping/Configuration/CollectionMappingBuilder.cs renamed to src/MiniExcel.Core/FluentMapping/Configuration/CollectionMappingBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace MiniExcelLib.Core.Mapping.Configuration;
1+
namespace MiniExcelLib.Core.FluentMapping.Configuration;
22

33
internal partial class CollectionMappingBuilder<T, TCollection> : ICollectionMappingBuilder<T, TCollection> where TCollection : IEnumerable
44
{

src/MiniExcel.Core/Mapping/Configuration/ICollectionMappingBuilder.cs renamed to src/MiniExcel.Core/FluentMapping/Configuration/ICollectionMappingBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace MiniExcelLib.Core.Mapping.Configuration;
1+
namespace MiniExcelLib.Core.FluentMapping.Configuration;
22

33
public interface ICollectionMappingBuilder<T, TCollection> where TCollection : IEnumerable
44
{

0 commit comments

Comments
 (0)