Skip to content

Commit 2d2f2ba

Browse files
Renamed the MiniExcel class to MiniExcelV2
Applied for rebasing on top of #1010
1 parent da1f453 commit 2d2f2ba

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎src/MiniExcel.Core/MiniExcelV2.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public static class MiniExcelV2
88
public static readonly MiniExcelExporterProvider Exporters = new();
99
public static readonly MiniExcelImporterProvider Importers = new();
1010
public static readonly MiniExcelTemplaterProvider Templaters = new();
11+
public static readonly MiniExcelEditorProvider Editors = new();
1112
}
1213

1314
[Obsolete("This class will be removed in the full release, use MiniExcelV2 instead.", true)]
@@ -16,4 +17,5 @@ public static class MiniExcel
1617
public static readonly MiniExcelExporterProvider Exporters = new();
1718
public static readonly MiniExcelImporterProvider Importers = new();
1819
public static readonly MiniExcelTemplaterProvider Templaters = new();
20+
public static readonly MiniExcelEditorProvider Editors = new();
1921
}

‎tests/MiniExcel.OpenXml.Tests/Styles/OpenXmlEditorTests.cs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void SaveAppliesUpdatesInCellOrderAndPreservesExistingStyle()
2323
workbook.SaveAs(path.ToString());
2424
}
2525

26-
MiniExcel.Editors.GetOpenXmlEditor(path.ToString())
26+
MiniExcelV2.Editors.GetOpenXmlEditor(path.ToString())
2727
.UpdateCellStyle("X100", style => style.FontColor = Color.Blue, "Data")
2828
.UpdateCellStyle("A1", style => style.FontColor = Color.Red, "Data")
2929
.Save();
@@ -46,7 +46,7 @@ public void LastUpdateWinsForTheSameCell()
4646
using var path = AutoDeletingPath.Create();
4747
CreateWorkbook(path.ToString());
4848

49-
MiniExcel.Editors.GetOpenXmlEditor(path.ToString())
49+
MiniExcelV2.Editors.GetOpenXmlEditor(path.ToString())
5050
.UpdateCellStyle("A1", style => style.FontColor = Color.Red)
5151
.UpdateCellStyle("A1", style => style.FontColor = Color.Blue)
5252
.Save();
@@ -66,7 +66,7 @@ public async Task SaveAsyncUpdatesASelectedWorksheetInAStream()
6666
workbook.SaveAs(stream);
6767
}
6868

69-
await MiniExcel.Editors.GetOpenXmlEditor(stream)
69+
await MiniExcelV2.Editors.GetOpenXmlEditor(stream)
7070
.UpdateCellStyle("A1", style => style.FontColor = Color.Blue, "Second")
7171
.SaveAsync();
7272

@@ -80,7 +80,7 @@ await MiniExcel.Editors.GetOpenXmlEditor(stream)
8080
public void UpdateCellStyleRejectsInvalidReferences()
8181
{
8282
using var stream = new MemoryStream();
83-
var editor = MiniExcel.Editors.GetOpenXmlEditor(stream);
83+
var editor = MiniExcelV2.Editors.GetOpenXmlEditor(stream);
8484

8585
Assert.Throws<ArgumentException>(() =>
8686
editor.UpdateCellStyle("1A", style => style.FontColor = Color.Red));
@@ -96,7 +96,7 @@ public void FailedSaveLeavesTheOriginalWorkbookUnchanged()
9696
using var path = AutoDeletingPath.Create();
9797
CreateWorkbook(path.ToString());
9898

99-
var editor = MiniExcel.Editors.GetOpenXmlEditor(path.ToString())
99+
var editor = MiniExcelV2.Editors.GetOpenXmlEditor(path.ToString())
100100
.UpdateCellStyle("A1", style => style.FontColor = Color.Red)
101101
.UpdateCellStyle("A2", style => style.FontColor = Color.Blue);
102102

0 commit comments

Comments
 (0)