Skip to content

Commit fe207e2

Browse files
committed
resolve issue
1 parent a783d0a commit fe207e2

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

ECommons/ECommons.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<Authors>NightmareXIV</Authors>
5-
<BaseVersion>3.1.0.17</BaseVersion>
5+
<BaseVersion>3.1.0.18</BaseVersion>
66
<PackageKind></PackageKind>
77
<VersionSuffix Condition="'$(PackageKind)' != ''">-$(PackageKind)</VersionSuffix>
88
<Version>$(BaseVersion)$(VersionSuffix)</Version>

ECommons/GenericHelpers/ExcelHelpers.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Collections.Generic;
1010
using System.Diagnostics.CodeAnalysis;
1111
using System.Linq;
12+
using System.Runtime.CompilerServices;
1213

1314
namespace ECommons;
1415
public static unsafe partial class GenericHelpers
@@ -98,7 +99,9 @@ public static int GetRowCount<T>() where T : struct, IExcelRow<T>
9899
/// <param name="predicate"></param>
99100
/// <returns></returns>
100101
public static T? FindRow<T>(Func<T, bool> predicate, ClientLanguage? language = null) where T : struct, IExcelRow<T>
101-
=> GetSheet<T>(language).FirstOrNull(predicate);
102+
{
103+
return GetSheet<T>(language).FirstOrNull(predicate);
104+
}
102105

103106
/// <summary>
104107
/// TODO: document
@@ -227,8 +230,10 @@ public static bool TryGetRow<T>(uint rowId, ushort subRowId, ClientLanguage? lan
227230
/// <param name="predicate"></param>
228231
/// <param name="language"></param>
229232
/// <returns></returns>
230-
public static T? FindRow<T>(Func<T, bool> predicate, ClientLanguage? language = null) where T : struct, IExcelSubrow<T>
231-
=> GetSubrowSheet<T>(language).SelectMany(m => m).Cast<T?>().FirstOrDefault(t => predicate(t.Value), null);
233+
public static T? FindRowSub<T>(Func<T, bool> predicate, ClientLanguage? language = null) where T : struct, IExcelSubrow<T>
234+
{
235+
return GetSubrowSheet<T>(language).SelectMany(m => m).Cast<T?>().FirstOrDefault(t => predicate(t.Value), null);
236+
}
232237
#endregion
233238

234239
#region Rawrows

0 commit comments

Comments
 (0)