Skip to content

Commit cf8b72d

Browse files
committed
Fixing .NET 3.5 build
1 parent cf1443d commit cf8b72d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

AgileMapper.UnitTests/Configuration/DataSources/WhenConfiguringDataSources.cs

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Collections.ObjectModel;
77
using System.Linq;
88
using AgileMapper.Extensions;
9+
using AgileMapper.Extensions.Internal;
910
using AgileMapper.Members;
1011
using Common;
1112
using Common.TestClasses;
@@ -249,8 +250,9 @@ public void ShouldApplyAConfiguredLinqExpression()
249250
sourceAddress.BuildingNumber,
250251
sourceAddress.DependentThoroughfare,
251252
sourceAddress.Thoroughfare
252-
}.Where(addressPart => !string.IsNullOrWhiteSpace(addressPart))
253-
.Select(addressPart => addressPart.Trim())))
253+
}.Where(addressPart => !addressPart.IsNullOrWhiteSpace())
254+
.Select(addressPart => addressPart.Trim())
255+
.ToArray()))
254256
.To(targetAddress => targetAddress.Line1);
255257

256258
var source = new Issue225.Address
@@ -801,7 +803,7 @@ public void ShouldWrapAComplexTypeDataSourceException()
801803
.And
802804
.Before
803805
.CreatingInstancesOf<Address>()
804-
.Call(ctx => { throw new InvalidOperationException("I don't like addresses"); });
806+
.Call(_ => throw new InvalidOperationException("I don't like addresses"));
805807

806808
var target = new PublicField<Person> { Value = new Person { Name = "Someone" } };
807809

@@ -1004,7 +1006,7 @@ public void ShouldApplyASourceAndTargetFunction()
10041006
using (var mapper = Mapper.CreateNew())
10051007
{
10061008
Func<PersonViewModel, Address, string> combineAddressLine1 =
1007-
(pvm, a) => pvm.Name + ", " + pvm.AddressLine1;
1009+
(pvm, _) => pvm.Name + ", " + pvm.AddressLine1;
10081010

10091011
mapper.WhenMapping
10101012
.From<PersonViewModel>()
@@ -1025,7 +1027,7 @@ public void ShouldApplyASourceTargetAndIndexFunction()
10251027
using (var mapper = Mapper.CreateNew())
10261028
{
10271029
Func<PersonViewModel, Person, int?, string> combineAddressLine1 =
1028-
(pvm, p, i) => $"{i}: {pvm.Name}, {pvm.AddressLine1}";
1030+
(pvm, _, i) => $"{i}: {pvm.Name}, {pvm.AddressLine1}";
10291031

10301032
mapper.WhenMapping
10311033
.From<PersonViewModel>()

0 commit comments

Comments
 (0)