Parcourir la source

Added constructor for ExcelReader

Piotr Czajkowski il y a 3 mois
Parent
commit
c888c95a44
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      ExcelORM/ExcelORM/ExcelReader.cs

+ 5 - 0
ExcelORM/ExcelORM/ExcelReader.cs

@@ -11,6 +11,11 @@ public class ExcelReader
     public bool SkipHidden { get; set; }
     public bool ObeyFilter { get; set; }
 
+    public ExcelReader(IXLWorkbook workbook)
+    {
+        xlWorkbook = workbook ?? throw new ArgumentNullException(nameof(workbook));
+    }
+
     public ExcelReader(string? path)
     {
         xlWorkbook = new XLWorkbook(path);