6
6
using System . Collections . ObjectModel ;
7
7
using System . Linq ;
8
8
using AgileMapper . Extensions ;
9
+ using AgileMapper . Extensions . Internal ;
9
10
using AgileMapper . Members ;
10
11
using Common ;
11
12
using Common . TestClasses ;
@@ -249,8 +250,9 @@ public void ShouldApplyAConfiguredLinqExpression()
249
250
sourceAddress . BuildingNumber ,
250
251
sourceAddress . DependentThoroughfare ,
251
252
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 ( ) ) )
254
256
. To ( targetAddress => targetAddress . Line1 ) ;
255
257
256
258
var source = new Issue225 . Address
@@ -801,7 +803,7 @@ public void ShouldWrapAComplexTypeDataSourceException()
801
803
. And
802
804
. Before
803
805
. CreatingInstancesOf < Address > ( )
804
- . Call ( ctx => { throw new InvalidOperationException ( "I don't like addresses" ) ; } ) ;
806
+ . Call ( _ => throw new InvalidOperationException ( "I don't like addresses" ) ) ;
805
807
806
808
var target = new PublicField < Person > { Value = new Person { Name = "Someone" } } ;
807
809
@@ -1004,7 +1006,7 @@ public void ShouldApplyASourceAndTargetFunction()
1004
1006
using ( var mapper = Mapper . CreateNew ( ) )
1005
1007
{
1006
1008
Func < PersonViewModel , Address , string > combineAddressLine1 =
1007
- ( pvm , a ) => pvm . Name + ", " + pvm . AddressLine1 ;
1009
+ ( pvm , _ ) => pvm . Name + ", " + pvm . AddressLine1 ;
1008
1010
1009
1011
mapper . WhenMapping
1010
1012
. From < PersonViewModel > ( )
@@ -1025,7 +1027,7 @@ public void ShouldApplyASourceTargetAndIndexFunction()
1025
1027
using ( var mapper = Mapper . CreateNew ( ) )
1026
1028
{
1027
1029
Func < PersonViewModel , Person , int ? , string > combineAddressLine1 =
1028
- ( pvm , p , i ) => $ "{ i } : { pvm . Name } , { pvm . AddressLine1 } ";
1030
+ ( pvm , _ , i ) => $ "{ i } : { pvm . Name } , { pvm . AddressLine1 } ";
1029
1031
1030
1032
mapper . WhenMapping
1031
1033
. From < PersonViewModel > ( )
0 commit comments