Skip to content

Commit 6783470

Browse files
authored
Add IDynamicLinqCustomTypeProvider (#476)
* IDynamicLinqCustomTypeProvider * .
1 parent 09657b9 commit 6783470

File tree

8 files changed

+47
-42
lines changed

8 files changed

+47
-42
lines changed

src/EntityFramework.DynamicLinq/EntityFramework.DynamicLinq.csproj

+1-6
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,10 @@
4949
</ItemGroup>
5050

5151
<ItemGroup>
52-
<PackageReference Include="JetBrains.Annotations" Version="10.2.1" PrivateAssets="All" />
52+
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="All" />
5353
<PackageReference Include="EntityFramework" Version="6.1.3" />
5454
</ItemGroup>
5555

56-
<!--<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
57-
<Reference Include="System" />
58-
<Reference Include="Microsoft.CSharp" />
59-
</ItemGroup>-->
60-
6156
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1'">
6257
<PackageReference Include="EntityFramework" Version="6.3.0" />
6358
</ItemGroup>

src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore2/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore2.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</ItemGroup>
5454

5555
<ItemGroup>
56-
<PackageReference Include="JetBrains.Annotations" Version="10.2.1" PrivateAssets="All" />
56+
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="All" />
5757
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
5858
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" />
5959
</ItemGroup>

src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</ItemGroup>
5353

5454
<ItemGroup>
55-
<PackageReference Include="JetBrains.Annotations" Version="10.2.1" PrivateAssets="All" />
55+
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="All" />
5656
</ItemGroup>
5757

5858
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">

src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore5/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore5.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</ItemGroup>
5454

5555
<ItemGroup>
56-
<PackageReference Include="JetBrains.Annotations" Version="10.2.1" PrivateAssets="All" />
56+
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="All" />
5757

5858
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
5959
</ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,10 @@
1-
using JetBrains.Annotations;
2-
using System.Collections.Generic;
3-
using System.Reflection;
4-
5-
namespace System.Linq.Dynamic.Core.CustomTypeProviders
1+
namespace System.Linq.Dynamic.Core.CustomTypeProviders
62
{
73
/// <summary>
84
/// Interface for providing functionality to find custom types for or resolve any type.
5+
/// Note that this interface will be marked obsolete in the next version. Use <see cref="IDynamicLinqCustomTypeProvider"/> instead.
96
/// </summary>
10-
public interface IDynamicLinkCustomTypeProvider
7+
public interface IDynamicLinkCustomTypeProvider : IDynamicLinqCustomTypeProvider
118
{
12-
/// <summary>
13-
/// Returns a list of custom types that System.Linq.Dynamic.Core will understand.
14-
/// </summary>
15-
/// <returns>A <see cref="HashSet{Type}" /> list of custom types.</returns>
16-
HashSet<Type> GetCustomTypes();
17-
18-
/// <summary>
19-
/// Returns a list of custom extension methods that System.Linq.Dynamic.Core will understand.
20-
/// </summary>
21-
/// <returns>A list of custom extension methods that System.Linq.Dynamic.Core will understand.</returns>
22-
Dictionary<Type, List<MethodInfo>> GetExtensionMethods();
23-
24-
/// <summary>
25-
/// Resolve any type by fullname which is registered in the current application domain.
26-
/// </summary>
27-
/// <param name="typeName">The typename to resolve.</param>
28-
/// <returns>A resolved <see cref="Type"/> or null when not found.</returns>
29-
Type ResolveType([NotNull] string typeName);
30-
31-
/// <summary>
32-
/// Resolve any type by the simple name which is registered in the current application domain.
33-
/// </summary>
34-
/// <param name="simpleTypeName">The typename to resolve.</param>
35-
/// <returns>A resolved <see cref="Type"/> or null when not found.</returns>
36-
Type ResolveTypeBySimpleName([NotNull] string simpleTypeName);
379
}
3810
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using JetBrains.Annotations;
2+
using System.Collections.Generic;
3+
using System.Reflection;
4+
5+
namespace System.Linq.Dynamic.Core.CustomTypeProviders
6+
{
7+
/// <summary>
8+
/// Interface for providing functionality to find custom types for or resolve any type.
9+
/// </summary>
10+
public interface IDynamicLinqCustomTypeProvider
11+
{
12+
/// <summary>
13+
/// Returns a list of custom types that System.Linq.Dynamic.Core will understand.
14+
/// </summary>
15+
/// <returns>A <see cref="HashSet{Type}" /> list of custom types.</returns>
16+
HashSet<Type> GetCustomTypes();
17+
18+
/// <summary>
19+
/// Returns a list of custom extension methods that System.Linq.Dynamic.Core will understand.
20+
/// </summary>
21+
/// <returns>A list of custom extension methods that System.Linq.Dynamic.Core will understand.</returns>
22+
Dictionary<Type, List<MethodInfo>> GetExtensionMethods();
23+
24+
/// <summary>
25+
/// Resolve any type by fullname which is registered in the current application domain.
26+
/// </summary>
27+
/// <param name="typeName">The typename to resolve.</param>
28+
/// <returns>A resolved <see cref="Type"/> or null when not found.</returns>
29+
Type ResolveType([NotNull] string typeName);
30+
31+
/// <summary>
32+
/// Resolve any type by the simple name which is registered in the current application domain.
33+
/// </summary>
34+
/// <param name="simpleTypeName">The typename to resolve.</param>
35+
/// <returns>A resolved <see cref="Type"/> or null when not found.</returns>
36+
Type ResolveTypeBySimpleName([NotNull] string simpleTypeName);
37+
}
38+
}

src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</ItemGroup>
6666

6767
<ItemGroup>
68-
<PackageReference Include="JetBrains.Annotations" Version="10.4.0" PrivateAssets="All" />
68+
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="All" />
6969
</ItemGroup>
7070

7171
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">

src/Z.EntityFramework.Classic.DynamicLinq/Z.EntityFramework.Classic.DynamicLinq.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</ItemGroup>
5151

5252
<ItemGroup>
53-
<PackageReference Include="JetBrains.Annotations" Version="10.2.1" PrivateAssets="All" />
53+
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="All" />
5454
<PackageReference Include="Z.EntityFramework.Classic" Version="7.1.7" />
5555
</ItemGroup>
5656
</Project>

0 commit comments

Comments
 (0)