Fix parser issue when HHMMSS is too long
This commit is contained in:
@@ -92,6 +92,7 @@
|
||||
<Compile Include="Entities\LeafGasComparisonPhotosyntheticInfo.cs" />
|
||||
<Compile Include="Entities\LeafGasComparisonFittingInfo.cs" />
|
||||
<Compile Include="Entities\LeafGasComparison.cs" />
|
||||
<Compile Include="Parsers\LeafInputCleaner.cs" />
|
||||
<Compile Include="Entities\Priority.cs" />
|
||||
<Compile Include="Entities\LeafInputStatusType.cs" />
|
||||
<Compile Include="Entities\LeafOutputFile.cs" />
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using LeafWeb.Core.Entities;
|
||||
|
||||
namespace LeafWeb.Core.Parsers
|
||||
{
|
||||
public static class LeafInputCleaner
|
||||
{
|
||||
public static void Clean(LeafInputData leafInput)
|
||||
{
|
||||
foreach (var data in leafInput.Data)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(data.HHMMSS) && data.HHMMSS.Length > 8)
|
||||
{
|
||||
data.HHMMSS = data.HHMMSS.Substring(data.HHMMSS.Length - 8, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user