Skip to content

Commit

Permalink
Fix broken CustomTypeProvider due to additional constructor parameter…
Browse files Browse the repository at this point in the history
… in DefaultDynamicLinqCustomTypeProvider
  • Loading branch information
falvarez1 committed Jul 23, 2024
1 parent dc52989 commit 2c16559
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/RulesEngine/CustomTypeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
using RulesEngine.HelperFunctions;
using System;
using System.Collections.Generic;
using System.Linq.Dynamic.Core;
using System.Linq.Dynamic.Core.CustomTypeProviders;

namespace RulesEngine
{
public class CustomTypeProvider : DefaultDynamicLinqCustomTypeProvider
{
private HashSet<Type> _types;
public CustomTypeProvider(Type[] types) : base()
public CustomTypeProvider(Type[] types) : base(ParsingConfig.Default)
{
_types = new HashSet<Type>(types ?? new Type[] { });
_types.Add(typeof(ExpressionUtils));
Expand Down
4 changes: 2 additions & 2 deletions src/RulesEngine/RulesEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
<PackageReference Include="FastExpressionCompiler" Version="4.0.1" />
<PackageReference Include="FluentValidation" Version="11.9.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.7" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.3" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.CSharp" Version="4.7.0"/>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion test/RulesEngine.UnitTest/RulesEngine.UnitTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageReference Include="AutoFixture" Version="4.18.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="System.Text.Json" Version="8.0.1" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="xunit" Version="2.6.5" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 2c16559

Please sign in to comment.