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
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoMapper, Version=0.0.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\..\packages\AutoMapper.6.0.0\lib\net45\AutoMapper.dll</HintPath>
<Private>True</Private>
<Reference Include="AutoMapper, Version=6.2.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\..\packages\AutoMapper.6.2.1\lib\net45\AutoMapper.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class MapCollectionWithEqualityTests
{
public MapCollectionWithEqualityTests()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand Down Expand Up @@ -68,6 +69,7 @@ public void Should_Work_With_Null_Destination()

public void Should_Be_Instanced_Based()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AutoMapper" version="6.0.0" targetFramework="net45" />
<package id="AutoMapper" version="6.2.1" targetFramework="net45" />
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
<package id="Fixie" version="1.0.2" targetFramework="net45" />
<package id="FluentAssertions" version="4.15.0" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoMapper, Version=0.0.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\..\packages\AutoMapper.6.0.0\lib\net45\AutoMapper.dll</HintPath>
<Private>True</Private>
<Reference Include="AutoMapper, Version=6.2.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\..\packages\AutoMapper.6.2.1\lib\net45\AutoMapper.dll</HintPath>
</Reference>
<Reference Include="Fixie, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Fixie.1.0.2\lib\net45\Fixie.dll</HintPath>
Expand Down
10 changes: 10 additions & 0 deletions src/AutoMapper.Collection.Tests/MapCollectionWithEqualityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class MapCollectionWithEqualityTests
{
public MapCollectionWithEqualityTests()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand Down Expand Up @@ -72,6 +73,7 @@ public void Should_Be_Fast_With_Large_Reversed_Lists()

public void Should_Be_Fast_With_Large_Lists_MultiProperty_Mapping()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand All @@ -87,6 +89,7 @@ public void Should_Be_Fast_With_Large_Lists_MultiProperty_Mapping()

public void Should_Be_Fast_With_Large_Lists_MultiProperty_Mapping_Cant_Extract()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand All @@ -102,6 +105,7 @@ public void Should_Be_Fast_With_Large_Lists_MultiProperty_Mapping_Cant_Extract()

public void Should_Be_Fast_With_Large_Lists_Cant_Extract_Negative()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand All @@ -118,6 +122,7 @@ public void Should_Be_Fast_With_Large_Lists_Cant_Extract_Negative()

public void Should_Be_Fast_With_Large_Lists_MultiProperty_Mapping_Cant_Extract_Negative()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand All @@ -134,6 +139,7 @@ public void Should_Be_Fast_With_Large_Lists_MultiProperty_Mapping_Cant_Extract_N

public void Should_Be_Fast_With_Large_Lists_SubObject()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand All @@ -149,6 +155,7 @@ public void Should_Be_Fast_With_Large_Lists_SubObject()

public void Should_Be_Fast_With_Large_Lists_SubObject_WrongCollectionType_Should_Throw()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand All @@ -165,6 +172,7 @@ public void Should_Be_Fast_With_Large_Lists_SubObject_WrongCollectionType_Should

public void Should_Work_With_Conditionals()
{
Mapper.Reset();
Mapper.Initialize(cfg =>
{
cfg.AddCollectionMappers();
Expand Down Expand Up @@ -212,6 +220,7 @@ public void Should_Work_With_Null_Destination()

public void Should_Work_With_Comparing_String_Types()
{
Mapper.Reset();
Mapper.Initialize(cfg =>
{
cfg.AddCollectionMappers();
Expand Down Expand Up @@ -290,6 +299,7 @@ public class SaleCharge

public void Should_Be_Instanced_Based()
{
Mapper.Reset();
Mapper.Initialize(x =>
{
x.AddCollectionMappers();
Expand Down
2 changes: 1 addition & 1 deletion src/AutoMapper.Collection.Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AutoMapper" version="6.0.0" targetFramework="net45" />
<package id="AutoMapper" version="6.2.1" targetFramework="net45" />
<package id="Fixie" version="1.0.2" targetFramework="net45" />
<package id="FluentAssertions" version="4.15.0" targetFramework="net45" />
<package id="System.ValueTuple" version="4.3.0" targetFramework="net45" />
Expand Down
10 changes: 1 addition & 9 deletions src/AutoMapper.Collection/AutoMapper.Collection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="6.0.0" />
<PackageReference Include="AutoMapper" Version="6.2.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<PackageReference Include="System.Threading" Version="4.0.11" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="System.Threading" Version="4.0.11" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public Expression MapExpression(IConfigurationProvider configurationProvider, Pr
sourceExpression, destExpression, contextExpression, Constant(EquivalencyExpression));
var collectionMap = CollectionMapper.MapExpression(configurationProvider, profileMap, propertyMap, sourceExpression, destExpression, contextExpression);

return Condition(notNull, map, collectionMap);
return Condition(notNull, map, Convert(collectionMap, destExpression.Type));
}
}
}