Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/PublishToNuGet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
Get-ChildItem ./src -Recurse -Filter *.csproj |
ForEach-Object {
dotnet build $_.FullName -c Release
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}

- name: Pack projects
Expand All @@ -33,6 +34,7 @@ jobs:
Get-ChildItem ./src -Recurse -Filter *.csproj |
ForEach-Object {
dotnet pack $_.FullName -c Release --no-build -o ./packages
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}

- name: NuGet login (OIDC → temp API key)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Run Tests EFCore net10.0
run: |
dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj -c Release
dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj -c Release -p:CollectCoverage=false

- name: Build and pack projects
shell: pwsh
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ ClientBin/
node_modules/
orleans.codegen.cs

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
Expand Down Expand Up @@ -237,6 +234,6 @@ _Pvt_Extensions

/coverage.xml
/dynamic-coverage-*.xml
/test/**/coverage.net8.0.opencover.xml
/test/**/coverage.*.opencover.xml
/test/**/coverage.opencover.xml
.nuget/
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ Or provide a list of additional types in the [DefaultDynamicLinqCustomTypeProvid
The following frameworks are supported:
- net35, net40, net45, net46 and up
- netstandard1.3, netstandard2.0 and netstandard2.1
- netcoreapp3.1, net5.0, net6.0, net7.0, net8.0 and net9.0
- uap10.0
- netcoreapp3.1, net5.0, net6.0, net7.0, net8.0, net9.0 and net10.0

### Fork details
This fork takes the basic library to a new level. Also adds unit tests to help ensure that it works properly.
Expand Down
30 changes: 0 additions & 30 deletions System.Linq.Dynamic.Core.sln
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp_net5.0_EF5", "sr
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExpressionSample", "test-xamarin\ExpressionSample\ExpressionSample\ExpressionSample.csproj", "{060F5395-623F-464F-9C84-120E9496CBBA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExpressionSample.UWP", "test-xamarin\ExpressionSample\ExpressionSample.UWP\ExpressionSample.UWP.csproj", "{C7020A29-724F-40D3-9493-E6E9C018DE57}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestSLDC", "test-xamarin\TestSLDC\TestSLDC.csproj", "{C530A693-66FD-48A9-B42A-D613BB4CB754}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp_net5.0_EF5_InMemory", "src-console\ConsoleAppEF5_InMemory\ConsoleApp_net5.0_EF5_InMemory.csproj", "{1D30F4EB-3CD9-446C-BDFB-107F79F05BBC}"
Expand All @@ -106,12 +104,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp_net6.0_EF6_InMem
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp_net6.0", "src-console\ConsoleApp_net6.0\ConsoleApp_net6.0.csproj", "{C206917D-6E90-4A31-8533-AF2DD68FF738}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Actions", "Actions", "{A42F1470-7801-4A19-BCA3-08AF24F3BFC5}"
ProjectSection(SolutionItems) = preProject
.github\workflows\ci.yml = .github\workflows\ci.yml
.github\workflows\CreateRelease.yml = .github\workflows\CreateRelease.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Linq.Dynamic.Core.Tests.Net5", "test\System.Linq.Dynamic.Core.Tests.Net5\System.Linq.Dynamic.Core.Tests.Net5.csproj", "{2AC8773A-FCDD-4613-8758-E45E5F10CA3A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Linq.Dynamic.Core.Tests.Net6", "test\System.Linq.Dynamic.Core.Tests.Net6\System.Linq.Dynamic.Core.Tests.Net6.csproj", "{EDAB46DA-7079-42D7-819D-1932C542872F}"
Expand Down Expand Up @@ -514,26 +506,6 @@ Global
{060F5395-623F-464F-9C84-120E9496CBBA}.Release|x64.Build.0 = Release|Any CPU
{060F5395-623F-464F-9C84-120E9496CBBA}.Release|x86.ActiveCfg = Release|Any CPU
{060F5395-623F-464F-9C84-120E9496CBBA}.Release|x86.Build.0 = Release|Any CPU
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|Any CPU.ActiveCfg = Debug|x86
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|ARM.ActiveCfg = Debug|ARM
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|ARM.Build.0 = Debug|ARM
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|ARM.Deploy.0 = Debug|ARM
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x64.ActiveCfg = Debug|x64
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x64.Build.0 = Debug|x64
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x64.Deploy.0 = Debug|x64
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x86.ActiveCfg = Debug|x86
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x86.Build.0 = Debug|x86
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x86.Deploy.0 = Debug|x86
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|Any CPU.ActiveCfg = Release|x86
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|ARM.ActiveCfg = Release|ARM
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|ARM.Build.0 = Release|ARM
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|ARM.Deploy.0 = Release|ARM
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x64.ActiveCfg = Release|x64
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x64.Build.0 = Release|x64
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x64.Deploy.0 = Release|x64
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x86.ActiveCfg = Release|x86
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x86.Build.0 = Release|x86
{C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x86.Deploy.0 = Release|x86
{C530A693-66FD-48A9-B42A-D613BB4CB754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C530A693-66FD-48A9-B42A-D613BB4CB754}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C530A693-66FD-48A9-B42A-D613BB4CB754}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -1136,7 +1108,6 @@ Global
{D3804228-91F4-4502-9595-39584E519901} = {DBD7D9B6-FCC7-4650-91AF-E6457573A68F}
{B3D1A89E-CE12-4A0D-B23E-8970D681C719} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62}
{060F5395-623F-464F-9C84-120E9496CBBA} = {ECA5702B-5D32-4888-A34E-9461FC533F23}
{C7020A29-724F-40D3-9493-E6E9C018DE57} = {ECA5702B-5D32-4888-A34E-9461FC533F23}
{C530A693-66FD-48A9-B42A-D613BB4CB754} = {ECA5702B-5D32-4888-A34E-9461FC533F23}
{1D30F4EB-3CD9-446C-BDFB-107F79F05BBC} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62}
{38FDDF50-5F86-4B6D-9062-F687C6FD41A8} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62}
Expand All @@ -1146,7 +1117,6 @@ Global
{D28F6393-B56B-40A2-AF67-E8D669F42546} = {DBD7D9B6-FCC7-4650-91AF-E6457573A68F}
{4CC563F6-5352-4A77-A8C0-DC0D77A71DBB} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62}
{C206917D-6E90-4A31-8533-AF2DD68FF738} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62}
{A42F1470-7801-4A19-BCA3-08AF24F3BFC5} = {25E69107-C89E-4807-AA31-C49423F0F1E3}
{2AC8773A-FCDD-4613-8758-E45E5F10CA3A} = {8463ED7E-69FB-49AE-85CF-0791AFD98E38}
{EDAB46DA-7079-42D7-819D-1932C542872F} = {8463ED7E-69FB-49AE-85CF-0791AFD98E38}
{B133DA55-339D-4600-AED3-46214AD9F08A} = {122BC4FA-7563-4E35-9D17-077F16F1629F}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="log4net" Version="2.0.14" />
<PackageReference Include="log4net" Version="3.6.0" />
<PackageReference Include="NHibernate" Version="5.4.9" />
<PackageReference Include="System.Data.Sqlite.Core" Version="1.0.113.7" />
<!--<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.7" />-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@
#region Private Helpers
private static readonly MethodInfo _executeAsyncMethod =
typeof(EntityFrameworkDynamicQueryableExtensions)
#if NETSTANDARD || UAP10_0
#if NETSTANDARD
.GetMethods(BindingFlags.Static | BindingFlags.NonPublic)
.Single(m => m.Name == nameof(ExecuteAsync) && m.GetParameters().Select(p => p.ParameterType).SequenceEqual(new[] { typeof(MethodInfo), typeof(IQueryable), typeof(CancellationToken) }));
#else
Expand All @@ -967,10 +967,10 @@
{
var executeAsyncMethod = _executeAsyncMethod.MakeGenericMethod(operatorMethodInfo.ReturnType);

var task = (Task)executeAsyncMethod.Invoke(null, new object[] { operatorMethodInfo, source, cancellationToken });

Check warning on line 970 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Converting null literal or possible null value to non-nullable type.

Check warning on line 970 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Converting null literal or possible null value to non-nullable type.
var castedTask = task.ContinueWith(t => (dynamic)t.GetType().GetProperty(nameof(Task<object>.Result)).GetValue(t));

Check warning on line 971 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Converting null literal or possible null value to non-nullable type.

Check warning on line 971 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Dereference of a possibly null reference.

Check warning on line 971 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Dereference of a possibly null reference.

Check warning on line 971 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Converting null literal or possible null value to non-nullable type.

Check warning on line 971 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Dereference of a possibly null reference.

Check warning on line 971 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Dereference of a possibly null reference.

return castedTask;

Check warning on line 973 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Nullability of reference types in value of type 'Task<dynamic?>' doesn't match target type 'Task<dynamic>'.

Check warning on line 973 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Nullability of reference types in value of type 'Task<dynamic?>' doesn't match target type 'Task<dynamic>'.
}

private static Task<TResult> ExecuteAsync<TResult>(MethodInfo operatorMethodInfo, IQueryable source, CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -1007,7 +1007,7 @@

private static readonly MethodInfo _executeAsyncMethodWithExpression =
typeof(EntityFrameworkDynamicQueryableExtensions)
#if NETSTANDARD || UAP10_0
#if NETSTANDARD
.GetMethods(BindingFlags.Static | BindingFlags.NonPublic)
.Single(m => m.Name == nameof(ExecuteAsync) && m.GetParameters().Select(p => p.ParameterType).SequenceEqual(new[] { typeof(MethodInfo), typeof(IQueryable), typeof(Expression), typeof(CancellationToken) }));
#else
Expand Down Expand Up @@ -1052,16 +1052,16 @@
throw new InvalidOperationException(Res.IQueryableProviderNotAsync);
}

private static MethodInfo GetMethod<TResult>(string name, int parameterCount = 0, Func<MethodInfo, bool> predicate = null) =>

Check warning on line 1055 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1055 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1055 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1055 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1055 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1055 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1055 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Build, Pack, and Publish

Cannot convert null literal to non-nullable reference type.
GetMethod(name, typeof(TResult), parameterCount, predicate);

private static MethodInfo GetMethod(string name, Type returnType, int parameterCount = 0, Func<MethodInfo, bool> predicate = null) =>

Check warning on line 1058 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1058 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1058 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1058 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1058 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1058 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1058 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Build, Pack, and Publish

Cannot convert null literal to non-nullable reference type.
GetMethod(name, parameterCount, mi => (mi.ReturnType == returnType) && ((predicate == null) || predicate(mi)));

private static MethodInfo GetMethod(
string name,
int parameterCount = 0,
Func<MethodInfo, bool> predicate = null) =>

Check warning on line 1064 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1064 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1064 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1064 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1064 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1064 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Cannot convert null literal to non-nullable reference type.

Check warning on line 1064 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs

View workflow job for this annotation

GitHub Actions / Build, Pack, and Publish

Cannot convert null literal to non-nullable reference type.
typeof(Queryable)
.GetTypeInfo()
.GetDeclaredMethods(name)
Expand Down Expand Up @@ -1102,13 +1102,11 @@
{
var optimized = ExtensibilityPoint.QueryOptimizer(expression);

#if !(SILVERLIGHT)
if (optimized != expression)
{
TraceSource.TraceEvent(TraceEventType.Verbose, 0, "Expression before : {0}", expression);
TraceSource.TraceEvent(TraceEventType.Verbose, 0, "Expression after : {0}", optimized);
}
#endif
return optimized;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace EntityFramework.DynamicLinq
#endif
{
#if EFCORE || (NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER || UAP10_0)
#if EFCORE || NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER
public static class EFDynamicQueryableWithFormattableStringExtensions
{

Expand All @@ -31,7 +31,7 @@
{
string predicateStr = predicate.Format;
predicateStr = Regex.Replace(predicateStr, @"{(\d+)}", "@$1");//replace {0} with @0
args = predicate.GetArguments();

Check warning on line 34 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableWithFormattableStringExtensions.cs

View workflow job for this annotation

GitHub Actions / Windows: Build and Tests

Nullability of reference types in value of type 'object?[]' doesn't match target type 'object[]'.

Check warning on line 34 in src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableWithFormattableStringExtensions.cs

View workflow job for this annotation

GitHub Actions / Linux: Build and Tests

Nullability of reference types in value of type 'object?[]' doesn't match target type 'object[]'.
return predicateStr;
}

Expand Down
6 changes: 2 additions & 4 deletions src/System.Linq.Dynamic.Core/AssemblyBuilderFactory.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if !UAP10_0
using System.Reflection;
using System.Reflection;
using System.Reflection.Emit;

namespace System.Linq.Dynamic.Core
Expand All @@ -14,12 +13,11 @@ internal static class AssemblyBuilderFactory
/// <returns>An object that represents the new assembly.</returns>
public static AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access)
{
#if (NET35 || NET40 || SILVERLIGHT)
#if NET35 || NET40
return AppDomain.CurrentDomain.DefineDynamicAssembly(name, access);
#else
return AssemblyBuilder.DefineDynamicAssembly(name, access);
#endif
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// SOFTWARE.
#endregion

#if NETSTANDARD1_3 || NETSTANDARD2_0 || NET35 || NET40 || NET45 || NET452 || NET46 || NETCOREAPP2_1 || UAP10_0
#if NETSTANDARD1_3 || NETSTANDARD2_0 || NET35 || NET40 || NET45 || NET452 || NET46 || NETCOREAPP2_1

// ReSharper disable once CheckNamespace
namespace System.Diagnostics.CodeAnalysis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ namespace System.Reflection
/// https://github.com/castleproject/Core/blob/netcore/src/Castle.Core/Compatibility/IntrospectionExtensions.cs
/// </summary>
internal static class CustomIntrospectionExtensions
{
#if NET35 || NET40 || PORTABLE || SILVERLIGHT || WPSL
// This allows us to use the new reflection API which separates Type and TypeInfo
// while still supporting .NET 3.5 and 4.0. This class matches the API of the same
// class in .NET 4.5+, and so is only needed on .NET Framework versions before that.
{
#if NET35 || NET40 || PORTABLE
// This allows us to use the new reflection API which separates Type and TypeInfo
// while still supporting .NET 3.5 and 4.0. This class matches the API of the same
// class in .NET 4.5+, and so is only needed on .NET Framework versions before that.
//
// Return the System.Type for now, we will probably need to create a TypeInfo class
// which inherits from Type like .NET 4.5+ and implement the additional methods and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ namespace System.Reflection
{
internal static class CustomTypeBuilderExtensions
{
#if !(NET35 || NET40 || SILVERLIGHT || WPSL || UAP10_0)
#if !(NET35 || NET40)
public static Type CreateType(this TypeBuilder tb)
{
return tb.CreateTypeInfo().AsType();
}
#endif

#if NET35 || NET40 || SILVERLIGHT || WPSL || NETCOREAPP || NETSTANDARD2_1
#if NET35 || NET40 || NETCOREAPP || NETSTANDARD2_1
public static PropertyBuilder DefineProperty(this TypeBuilder tb, string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
{
return tb.DefineProperty(name, attributes, returnType, parameterTypes);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETSTANDARD1_3 || UAP10_0
#if NETSTANDARD1_3
using System.Linq;

namespace System.Reflection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected Type[] FindTypesMarkedWithDynamicLinqTypeAttribute(IEnumerable<Assembl
return firstMatchingFullname == null ? null : types.FirstOrDefault(t => t.FullName == firstMatchingFullname);
}

#if (UAP10_0 || NETSTANDARD)
#if NETSTANDARD
/// <summary>
/// Gets the assembly types annotated with <see cref="DynamicLinqTypeAttribute"/> in an Exception friendly way.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/System.Linq.Dynamic.Core/DefaultAssemblyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal class DefaultAssemblyHelper(ParsingConfig parsingConfig) : IAssemblyHel

public Assembly[] GetAssemblies()
{
#if UAP10_0 || NETSTANDARD || WPSL
#if NETSTANDARD
throw new NotSupportedException();
#elif NET35
return AppDomain.CurrentDomain.GetAssemblies();
Expand Down
2 changes: 1 addition & 1 deletion src/System.Linq.Dynamic.Core/DynamicClass.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !UAP10_0 && !NET35
#if !NET35
using System.Collections.Generic;
using System.Dynamic;
using System.Reflection;
Expand Down
Loading
Loading