Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
.
  • Loading branch information
StefH committed Jun 15, 2025
commit e2896189065f18fb76b469ca2f8cf4f331c2dc8b
11 changes: 3 additions & 8 deletions src/System.Linq.Dynamic.Core/Parser/PredefinedMethodsHelper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq.Dynamic.Core.Validation;
using System.Reflection;

namespace System.Linq.Dynamic.Core.Parser;
Expand All @@ -23,7 +22,6 @@ internal class PredefinedMethodsHelper
{ typeof(DateTimeOffset), [] },
{ typeof(decimal), [] },
{ typeof(double), [] },
// { typeof(Enum), [] },
{ typeof(float), [] },
{ typeof(Guid), [] },
{ typeof(int), [] },
Expand All @@ -38,11 +36,11 @@ internal class PredefinedMethodsHelper
{ typeof(ushort), [] },
#if NET6_0_OR_GREATER
{ typeof(DateOnly), [] },
{ typeof(TimeOnly), [] },
{ typeof(TimeOnly), [] }
#endif
};

public PredefinedMethodsHelper(ParsingConfig config)
internal PredefinedMethodsHelper(ParsingConfig config)
{
foreach (var kvp in _supported)
{
Expand All @@ -61,11 +59,8 @@ public PredefinedMethodsHelper(ParsingConfig config)
}
}

public bool IsPredefinedMethod(Type type, Type declaringType, MemberInfo member)
internal bool IsPredefinedMethod(Type type, Type declaringType, MemberInfo member)
{
Check.NotNull(type);
Check.NotNull(member);

if (_supported.TryGetValue(type, out var supportedMethodsForType) && supportedMethodsForType.Count > 0)
{
return supportedMethodsForType.Contains(member);
Expand Down
Loading