Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump YamlDotNet from 13.4.0 to 13.5.2 #1644

Merged
merged 5 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions Documentation/CodeTutorials/Packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,8 @@
| YamlDotNet | [GitHub](https://github.com/aaubry/YamlDotNet) | [MIT](https://opensource.org/licenses/MIT) |Loading configuration files|
| SixLabors.ImageSharp | [GitHub](https://github.com/SixLabors/ImageSharp) | [Apache 2.0](https://github.com/SixLabors/ImageSharp/blob/main/LICENSE) | Platform-independent replacement for legacy Windows-only System.Drawing.Common | |
| SixLabors.ImageSharp.Drawing | [GitHub](https://github.com/SixLabors/ImageSharp.Drawing) | [Apache 2.0](https://github.com/SixLabors/ImageSharp/blob/main/LICENSE) | Font handling for ImageSharp | |
| System.Runtime.Loader | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Allows loading assemblies in dot net core| |
| System.Diagnostics.Debug | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Interact with Processes / Debug / Console | |
| System.IO.FileSystem.Primitives | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Provides common enumerations and exceptions for path-based I/O libraries | |
| System.IO.FileSystem | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Provides types that allow reading and writing to files | |
| System.Runtime.Extensions | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Provides commonly-used classes for performing mathematical functions, conversions, string comparisons etc | |
| System.Threading | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Provides the fundamental synchronization primitives | |
| System.Threading.AccessControl | [GitHub](https://github.com/dotnet/runtime) |[MIT](https://opensource.org/licenses/MIT) | Required by Scintilla for sync primitives | |
| System.Threading.ThreadPool | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Required to compile native linux binaries | |
| System.Globalization | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Provides classes that define culture-related information | |
| System.Net.NameResolution | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Provides the System.Net.Dns class, which enables developers to perform simple domain name resolution | |
| System.Net.Primitives | [GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Provides common types for network-based libraries | |
| System.Security.Permissions |[GitHub](https://github.com/dotnet/corefx) |[MIT](https://opensource.org/licenses/MIT) | Provides common types for Xml doc reading in UI code | |
| [AutoComplete Console](https://www.codeproject.com/Articles/1182358/Using-Autocomplete-in-Windows-Console-Applications) by Jasper Lammers | Embedded | [CPOL](https://www.codeproject.com/info/cpol10.aspx) | Provides interactive autocomplete in console input | |
| System.Resources.Extensions | [GitHub](https://github.com/dotnet/corefx) | [MIT](https://opensource.org/licenses/MIT) | Allows [publishing with dotnet publish on machines with netcoreapp3.0 SDK installed](https://github.com/microsoft/msbuild/issues/4704#issuecomment-530034240) | |
Expand Down
21 changes: 10 additions & 11 deletions Rdmp.Core/DataLoad/Modules/DataFlowSources/ExcelDataFlowSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Rdmp.Core.DataFlowPipeline;
using Rdmp.Core.DataFlowPipeline.Requirements;
using Rdmp.Core.DataLoad.Modules.Exceptions;
using Rdmp.Core.ReusableLibraryCode.Annotations;
using Rdmp.Core.ReusableLibraryCode.Checks;
using Rdmp.Core.ReusableLibraryCode.Progress;

Expand Down Expand Up @@ -198,7 +199,7 @@ public DataTable GetAllData(ISheet worksheet, IDataLoadEventListener listener)
/// <param name="cell">The cell whose value you want to retrieve</param>
/// <param name="treatAs">Leave blank, used in recursion for dealing with Formula cells</param>
/// <returns></returns>
private object GetCellValue(ICell cell, CellType treatAs = CellType.Unknown)
private object GetCellValue([CanBeNull] ICell cell, CellType treatAs = CellType.Unknown)
{
if (cell == null)
return null;
Expand All @@ -218,8 +219,8 @@ private object GetCellValue(ICell cell, CellType treatAs = CellType.Unknown)

//some numerics are actually dates/times
if (cell.CellStyle.DataFormat == 0) return cell.NumericCellValue;

var format = cell.CellStyle.GetDataFormatString();
var f = new NumberFormat(format);

if (IsDateWithoutTime(format))
return cell.DateCellValue.ToString("yyyy-MM-dd");
Expand All @@ -230,19 +231,17 @@ private object GetCellValue(ICell cell, CellType treatAs = CellType.Unknown)
if (IsTimeWithoutDate(format))
return cell.DateCellValue.ToString("HH:mm:ss");

return IsDateFormat(format)
? f.Format(cell.DateCellValue, CultureInfo.InvariantCulture)
: f.Format(cell.NumericCellValue, CultureInfo.InvariantCulture);
return new NumberFormat(format).Format(
IsDateFormat(format) ? cell.DateCellValue : cell.NumericCellValue, CultureInfo.InvariantCulture);

case CellType.String:

var v = cell.StringCellValue;

//if it is blank or 'null' then leave it null
if (string.IsNullOrWhiteSpace(v) || v.Trim().Equals("NULL", StringComparison.CurrentCultureIgnoreCase))
return null;
return string.IsNullOrWhiteSpace(cell.StringCellValue) ||
cell.StringCellValue.Trim().Equals("NULL", StringComparison.CurrentCultureIgnoreCase)
? null
: cell.StringCellValue;

return cell.StringCellValue;
case CellType.Formula:
return GetCellValue(cell, cell.CachedFormulaResultType);
case CellType.Blank:
Expand All @@ -252,7 +251,7 @@ private object GetCellValue(ICell cell, CellType treatAs = CellType.Unknown)
case CellType.Error:
return null;
default:
throw new ArgumentOutOfRangeException();
throw new ArgumentOutOfRangeException(nameof(treatAs));
}
}

Expand Down
Loading
Loading