Skip to content

Commit fca802e

Browse files
authored
Change internal usage from obsolete IDynamicLinkCustomTypeProvider to IDynamicLinqCustomTypeProvider (#879)
1 parent 78cda51 commit fca802e

File tree

16 files changed

+37
-26
lines changed

16 files changed

+37
-26
lines changed

src-console/ConsoleAppEF2.0.2_InMemory/Program.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ public string GetDisplayName(bool a, bool b, bool c)
2424
}
2525
}
2626

27-
class C : AbstractDynamicLinqCustomTypeProvider, IDynamicLinkCustomTypeProvider
27+
class C : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider
2828
{
29+
public C() : base(new List<Type>())
30+
{
31+
}
32+
2933
public HashSet<Type> GetCustomTypes()
3034
{
3135
// https://stackoverflow.com/a/2384679/255966

src-console/ConsoleAppEF2.0/Program.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ namespace ConsoleAppEF2
1414
{
1515
class Program
1616
{
17-
class C : AbstractDynamicLinqCustomTypeProvider, IDynamicLinkCustomTypeProvider
17+
class C : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider
1818
{
19+
public C() : base(new List<Type>())
20+
{
21+
}
22+
1923
public HashSet<Type> GetCustomTypes()
2024
{
2125
// https://stackoverflow.com/a/2384679/255966

src-console/ConsoleAppEF2.1.1/Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ namespace ConsoleAppEF211
1515
{
1616
class Program
1717
{
18-
class C : AbstractDynamicLinqCustomTypeProvider, IDynamicLinkCustomTypeProvider
18+
class C : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider
1919
{
20+
public C() : base(new List<Type>())
21+
{
22+
}
2023
public HashSet<Type> GetCustomTypes()
2124
{
2225
// https://stackoverflow.com/a/2384679/255966

src-console/ConsoleAppEF2.1/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace ConsoleAppEF21
1010
{
1111
class Program
1212
{
13-
//class C : AbstractDynamicLinqCustomTypeProvider, IDynamicLinkCustomTypeProvider
13+
//class C : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider
1414
//{
1515
// public HashSet<Type> GetCustomTypes()
1616
// {

src/System.Linq.Dynamic.Core/CustomTypeProviders/DefaultDynamicLinqCustomTypeProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace System.Linq.Dynamic.Core.CustomTypeProviders;
1212
///
1313
/// This class is used as default for full .NET Framework and .NET Core App 2.x and higher.
1414
/// </summary>
15-
public class DefaultDynamicLinqCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinkCustomTypeProvider
15+
public class DefaultDynamicLinqCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider
1616
{
1717
private readonly IAssemblyHelper _assemblyHelper;
1818
private readonly bool _cacheCustomTypes;

src/System.Linq.Dynamic.Core/ParsingConfig.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace System.Linq.Dynamic.Core;
1313
/// </summary>
1414
public class ParsingConfig
1515
{
16-
private IDynamicLinkCustomTypeProvider? _customTypeProvider;
16+
private IDynamicLinqCustomTypeProvider? _customTypeProvider;
1717
private IExpressionPromoter? _expressionPromoter;
1818
private IQueryableAnalyzer? _queryableAnalyzer;
1919

@@ -52,9 +52,9 @@ public class ParsingConfig
5252
public bool IsCaseSensitive { get; set; }
5353

5454
/// <summary>
55-
/// Gets or sets the <see cref="IDynamicLinkCustomTypeProvider"/>.
55+
/// Gets or sets the <see cref="IDynamicLinqCustomTypeProvider"/>.
5656
/// </summary>
57-
public IDynamicLinkCustomTypeProvider? CustomTypeProvider
57+
public IDynamicLinqCustomTypeProvider? CustomTypeProvider
5858
{
5959
get
6060
{

test-xamarin/WindowsUniversalTestApp14393/WindowsAppCustomTypeProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace WindowsUniversalTestApp14393
1010
{
11-
class WindowsAppCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinkCustomTypeProvider
11+
class WindowsAppCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider
1212
{
1313
public HashSet<Type> GetCustomTypes()
1414
{

test-xamarin/WindowsUniversalTestApp16299/WindowsAppCustomTypeProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace WindowsUniversalTestApp16299
1010
{
11-
class WindowsAppCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinkCustomTypeProvider
11+
class WindowsAppCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider
1212
{
1313
public HashSet<Type> GetCustomTypes()
1414
{

test/System.Linq.Dynamic.Core.Tests/DynamicExpressionParserTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ public void DynamicExpressionParser_ParseLambda_IQueryable()
637637
public void DynamicExpressionParser_ParseLambda_Issue58()
638638
{
639639
// Arrange
640-
var customTypeProvider = new Mock<IDynamicLinkCustomTypeProvider>();
640+
var customTypeProvider = new Mock<IDynamicLinqCustomTypeProvider>();
641641
customTypeProvider.Setup(c => c.GetCustomTypes()).Returns([typeof(MyClass)]);
642642
var config = new ParsingConfig
643643
{
@@ -1774,7 +1774,7 @@ public void DynamicExpressionParser_ParseLambda_StringEquals_WithMemberString()
17741774
public void DynamicExpressionParser_ParseLambda_NullPropagation_InstanceMethod_0_Arguments()
17751775
{
17761776
// Arrange
1777-
var customTypeProvider = new Mock<IDynamicLinkCustomTypeProvider>();
1777+
var customTypeProvider = new Mock<IDynamicLinqCustomTypeProvider>();
17781778
customTypeProvider.Setup(c => c.GetCustomTypes()).Returns([typeof(Foo)]);
17791779
var config = new ParsingConfig
17801780
{
@@ -1797,7 +1797,7 @@ public void DynamicExpressionParser_ParseLambda_NullPropagation_InstanceMethod_0
17971797
public void DynamicExpressionParser_ParseLambda_NullPropagation_InstanceMethod_1_Argument()
17981798
{
17991799
// Arrange
1800-
var customTypeProvider = new Mock<IDynamicLinkCustomTypeProvider>();
1800+
var customTypeProvider = new Mock<IDynamicLinqCustomTypeProvider>();
18011801
customTypeProvider.Setup(c => c.GetCustomTypes()).Returns([typeof(Foo)]);
18021802
var config = new ParsingConfig
18031803
{
@@ -1820,7 +1820,7 @@ public void DynamicExpressionParser_ParseLambda_NullPropagation_InstanceMethod_1
18201820
public void DynamicExpressionParser_ParseLambda_NullPropagation_InstanceMethod_2_Arguments()
18211821
{
18221822
// Arrange
1823-
var customTypeProvider = new Mock<IDynamicLinkCustomTypeProvider>();
1823+
var customTypeProvider = new Mock<IDynamicLinqCustomTypeProvider>();
18241824
customTypeProvider.Setup(c => c.GetCustomTypes()).Returns([typeof(Foo)]);
18251825
var config = new ParsingConfig
18261826
{

test/System.Linq.Dynamic.Core.Tests/ExpressionTests.MethodCall.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public partial class ExpressionTests
1212
{
1313
private static ParsingConfig CreateParsingConfigForMethodCallTests()
1414
{
15-
var customTypeProvider = new Mock<IDynamicLinkCustomTypeProvider>();
15+
var customTypeProvider = new Mock<IDynamicLinqCustomTypeProvider>();
1616
customTypeProvider.Setup(c => c.GetCustomTypes()).Returns(new HashSet<Type> { typeof(User), typeof(Methods), typeof(Foo) });
1717
return new ParsingConfig
1818
{

test/System.Linq.Dynamic.Core.Tests/ExpressionTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public void ExpressionTests_Cast_To_FullTypeNullableEnum_Using_DynamicLinqType()
339339
public void ExpressionTests_Cast_To_Enum_Using_CustomTypeProvider()
340340
{
341341
// Arrange
342-
var dynamicLinqCustomTypeProviderMock = new Mock<IDynamicLinkCustomTypeProvider>();
342+
var dynamicLinqCustomTypeProviderMock = new Mock<IDynamicLinqCustomTypeProvider>();
343343
dynamicLinqCustomTypeProviderMock.Setup(d => d.GetCustomTypes()).Returns(new HashSet<Type> { typeof(SimpleValuesModelEnum) });
344344
var config = new ParsingConfig
345345
{
@@ -380,7 +380,7 @@ public void ExpressionTests_Cast_To_NullableEnum_Using_DynamicLinqType()
380380
public void ExpressionTests_Cast_To_NullableEnum_Using_CustomTypeProvider()
381381
{
382382
// Arrange
383-
var dynamicLinqCustomTypeProviderMock = new Mock<IDynamicLinkCustomTypeProvider>();
383+
var dynamicLinqCustomTypeProviderMock = new Mock<IDynamicLinqCustomTypeProvider>();
384384
dynamicLinqCustomTypeProviderMock.Setup(d => d.GetCustomTypes()).Returns(new HashSet<Type>
385385
{
386386
typeof(SimpleValuesModelEnum),

test/System.Linq.Dynamic.Core.Tests/Parser/ExpressionParserTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace System.Linq.Dynamic.Core.Tests.Parser;
1313

1414
public partial class ExpressionParserTests
1515
{
16-
private readonly Mock<IDynamicLinkCustomTypeProvider> _dynamicTypeProviderMock;
16+
private readonly Mock<IDynamicLinqCustomTypeProvider> _dynamicTypeProviderMock;
1717

1818
private readonly ParsingConfig _parsingConfig;
1919

@@ -34,7 +34,7 @@ public class MyView
3434

3535
public ExpressionParserTests()
3636
{
37-
_dynamicTypeProviderMock = new Mock<IDynamicLinkCustomTypeProvider>();
37+
_dynamicTypeProviderMock = new Mock<IDynamicLinqCustomTypeProvider>();
3838
_dynamicTypeProviderMock.Setup(dt => dt.GetCustomTypes()).Returns(new HashSet<Type>() { typeof(Company), typeof(MainCompany) });
3939
_dynamicTypeProviderMock.Setup(dt => dt.ResolveType(typeof(Company).FullName!)).Returns(typeof(Company));
4040
_dynamicTypeProviderMock.Setup(dt => dt.ResolveType(typeof(MainCompany).FullName!)).Returns(typeof(MainCompany));

test/System.Linq.Dynamic.Core.Tests/Parser/ExpressionPromoterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ public class SampleDto
1515
}
1616

1717
private readonly Mock<IExpressionPromoter> _expressionPromoterMock;
18-
private readonly Mock<IDynamicLinkCustomTypeProvider> _dynamicLinkCustomTypeProviderMock;
18+
private readonly Mock<IDynamicLinqCustomTypeProvider> _dynamicLinkCustomTypeProviderMock;
1919

2020
public ExpressionPromoterTests()
2121
{
22-
_dynamicLinkCustomTypeProviderMock = new Mock<IDynamicLinkCustomTypeProvider>();
22+
_dynamicLinkCustomTypeProviderMock = new Mock<IDynamicLinqCustomTypeProvider>();
2323
_dynamicLinkCustomTypeProviderMock.Setup(d => d.GetCustomTypes()).Returns(new HashSet<Type>());
2424
_dynamicLinkCustomTypeProviderMock.Setup(d => d.ResolveType(It.IsAny<string>())).Returns(typeof(SampleDto));
2525

test/System.Linq.Dynamic.Core.Tests/Parser/TypeFinderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class TypeFinderTests
1616

1717
public TypeFinderTests()
1818
{
19-
var dynamicTypeProviderMock = new Mock<IDynamicLinkCustomTypeProvider>();
19+
var dynamicTypeProviderMock = new Mock<IDynamicLinqCustomTypeProvider>();
2020
dynamicTypeProviderMock.Setup(dt => dt.ResolveType(typeof(BaseEmployee).FullName!)).Returns(typeof(BaseEmployee));
2121
dynamicTypeProviderMock.Setup(dt => dt.ResolveType(typeof(Boss).FullName!)).Returns(typeof(Boss));
2222
dynamicTypeProviderMock.Setup(dt => dt.ResolveType(typeof(Worker).FullName!)).Returns(typeof(Worker));

test/System.Linq.Dynamic.Core.Tests/QueryableTests.Methods.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public partial class QueryableTests
1111
public void CallMethod()
1212
{
1313
// Arrange
14-
var customTypeProvider = new Mock<IDynamicLinkCustomTypeProvider>();
14+
var customTypeProvider = new Mock<IDynamicLinqCustomTypeProvider>();
1515
customTypeProvider.Setup(c => c.GetCustomTypes()).Returns(new HashSet<Type> { typeof(Test) });
1616
var config = new ParsingConfig
1717
{
@@ -30,7 +30,7 @@ public void CallMethod()
3030
public void CallMethodWhichReturnsNullable()
3131
{
3232
// Arrange
33-
var customTypeProvider = new Mock<IDynamicLinkCustomTypeProvider>();
33+
var customTypeProvider = new Mock<IDynamicLinqCustomTypeProvider>();
3434
customTypeProvider.Setup(c => c.GetCustomTypes()).Returns(new HashSet<Type> { typeof(Test) });
3535
var config = new ParsingConfig
3636
{
@@ -49,7 +49,7 @@ public void CallMethodWhichReturnsNullable()
4949
public void CallMethodWhichReturnsNullable_WithValue()
5050
{
5151
// Arrange
52-
var customTypeProvider = new Mock<IDynamicLinkCustomTypeProvider>();
52+
var customTypeProvider = new Mock<IDynamicLinqCustomTypeProvider>();
5353
customTypeProvider.Setup(c => c.GetCustomTypes()).Returns(new HashSet<Type> { typeof(Test) });
5454
var config = new ParsingConfig
5555
{

test/System.Linq.Dynamic.Core.Tests/TestClasses/TestCustomTypeProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace System.Linq.Dynamic.Core.Tests
77
{
8-
public class TestCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinkCustomTypeProvider
8+
public class TestCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider
99
{
1010
private HashSet<Type>? _customTypes;
1111

0 commit comments

Comments
 (0)