Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs/issue163 #164

Merged
merged 3 commits into from
Oct 23, 2019
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 @@ -5,6 +5,7 @@
<TargetFrameworks>net35;netstandard1.0</TargetFrameworks>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.MoreTestClasses</AssemblyName>
<RootNamespace>AgileObjects.AgileMapper.UnitTests.MoreTestClasses</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<TargetFramework>netcoreapp1.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore</AssemblyName>
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>1.1.9</RuntimeFrameworkVersion>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
Expand All @@ -14,6 +13,7 @@
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -25,10 +25,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.Common" Version="4.3.0" />
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="1.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="System.Data.Common" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -48,6 +48,10 @@
</Compile>
</ItemGroup>

<ItemGroup>
<Compile Remove="..\AgileMapper.UnitTests\TestClasses\PublicOtherInterface.cs" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs" Link="Properties\CommonAssemblyInfo.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2_1</AssemblyName>
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore2_1</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>2.1.2</RuntimeFrameworkVersion>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
Expand All @@ -14,25 +13,23 @@
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore2</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
<DefineConstants>TRACE;DEBUG;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;NETCOREAPP2_1;NET_STANDARD</DefineConstants>
<DefineConstants>TRACE;RELEASE;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
<PackageReference Include="System.Data.Common" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.1.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="System.Data.Common" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2_1</AssemblyName>
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore2_1</PackageId>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2_2</AssemblyName>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>2.2.2</RuntimeFrameworkVersion>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
Expand All @@ -14,25 +13,23 @@
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore2</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
<DefineConstants>TRACE;DEBUG;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
<DefineConstants>TRACE;RELEASE;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">
<PackageReference Include="System.Data.Common" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="System.Data.Common" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<TargetFramework>netcoreapp2.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore2</AssemblyName>
<PackageId>AgileObjects.AgileMapper.UnitTests.NetCore2</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>2.0.7</RuntimeFrameworkVersion>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
Expand All @@ -14,25 +13,23 @@
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore2</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
<DefineConstants>TRACE;DEBUG;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;NET_STANDARD</DefineConstants>
<DefineConstants>TRACE;RELEASE;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<PackageReference Include="System.Data.Common" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="System.Data.Common" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\common.props" />

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.NetCore3</AssemblyName>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>3.0.0</RuntimeFrameworkVersion>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<RootNamespace>AgileObjects.AgileMapper.UnitTests.NetCore2</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE;RELEASE;NET_STANDARD;FEATURE_STRINGSPLIT_OPTIONS;</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AgileObjects.NetStandardPolyfills" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="System.Data.Common" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AgileMapper.UnitTests.Common\AgileMapper.UnitTests.Common.csproj" />
<ProjectReference Include="..\AgileMapper.UnitTests.MoreTestClasses\AgileMapper.UnitTests.MoreTestClasses.csproj" />
<ProjectReference Include="..\AgileMapper\AgileMapper.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\AgileMapper.UnitTests\**\*.cs" Exclude="..\AgileMapper.UnitTests\obj\**\*.cs;..\AgileMapper.UnitTests\WhenUsingPartialTrust.cs;">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
</ItemGroup>

<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs" Link="Properties\CommonAssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<TargetFramework>netcoreapp2.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</AssemblyName>
<PackageId>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>2.0.7</RuntimeFrameworkVersion>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
Expand All @@ -16,6 +15,7 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<RootNamespace>AgileObjects.AgileMapper.UnitTests.Orms.EfCore2.NetCore2</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
1 change: 1 addition & 0 deletions AgileMapper.UnitTests/AgileMapper.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
<Compile Include="TestClasses\PublicEnumerable.cs" />
<Compile Include="TestClasses\PublicImplementation.cs" />
<Compile Include="TestClasses\PublicIndex.cs" />
<Compile Include="TestClasses\PublicOtherImplementation.cs" />
<Compile Include="TestClasses\PublicSealed.cs" />
<Compile Include="TestClasses\PublicPropertyStruct.cs" />
<Compile Include="TestClasses\PublicTwoFields.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ public void ShouldApplyAConfiguredExpressionToAnArray()
mapper.WhenMapping
.From<PublicProperty<string>>()
.To<PublicField<int[]>>()
#if NETCOREAPP2_0
#if FEATURE_STRINGSPLIT_OPTIONS
.Map(ctx => ctx.Source.Value.Split(':', StringSplitOptions.None))
#else
.Map(ctx => ctx.Source.Value.Split(':'))
Expand Down Expand Up @@ -1244,7 +1244,9 @@ public void ShouldApplyAConfiguredSourceInterfaceMember()
result.Name.ShouldBe("input");
result.Info.ShouldNotBeNull();
result.Info.Id.ShouldBe("12321");
result.Info.Value.ShouldNotBeNull();

// Source has a .Value member, but we don't runtime-type interfaces
result.Info.Value.ShouldBeNull();
}
}

Expand Down
5 changes: 5 additions & 0 deletions AgileMapper.UnitTests/TestClasses/IPublicInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ public interface IPublicInterface<T>
{
T Value { get; set; }
}

public interface IPublicInterface
{
object Value { get; set; }
}
}
4 changes: 3 additions & 1 deletion AgileMapper.UnitTests/TestClasses/PublicImplementation.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace AgileObjects.AgileMapper.UnitTests.TestClasses
{
public class PublicImplementation<T> : IPublicInterface<T>
public class PublicImplementation<T> : IPublicInterface<T>, IPublicInterface
{
public T Value { get; set; }

object IPublicInterface.Value { get => Value; set => Value = (T)value; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace AgileObjects.AgileMapper.UnitTests.TestClasses
{
public class PublicOtherImplementation<T> : IPublicInterface<T>, IPublicInterface
{
public T Value { get; set; }

object IPublicInterface.Value { get => Value; set => Value = (T)value; }
}
}
9 changes: 9 additions & 0 deletions AgileMapper.UnitTests/WhenMappingToNewComplexTypeMembers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ public void ShouldMapASourcePropertyToMultipleTargets()
result.CurrencyId.ShouldBe(1);
}

[Fact]
public void ShouldMapANonGenericInterfaceMember()
{
var source = new PublicField<IPublicInterface>();
var result = Mapper.Map(source).ToANew<PublicField<IPublicInterface>>();

result.ShouldNotBeNull();
}

// See https://github.com/agileobjects/AgileMapper/issues/146
[Fact]
public void ShouldMapToATargetInterfaceMembersImplementedInterfaceMembers()
Expand Down
2 changes: 1 addition & 1 deletion AgileMapper.UnitTests/WhenMappingToNewEnumerableMembers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public void ShouldHandleANullSourceMemberInAConfiguredEnumerableSource()
mapper.WhenMapping
.From<PublicProperty<string>>()
.To<PublicField<int[]>>()
#if NETCOREAPP2_0
#if FEATURE_STRINGSPLIT_OPTIONS
.Map(ctx => ctx.Source.Value.Split(':', System.StringSplitOptions.None))
#else
.Map(ctx => ctx.Source.Value.Split(':'))
Expand Down
7 changes: 7 additions & 0 deletions AgileMapper.sln
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Performance", "Performance"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Orms", "Orms", "{86B68C08-267A-47BD-BCBC-427710D2654F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AgileMapper.UnitTests.NetCore3", "AgileMapper.UnitTests.NetCore3\AgileMapper.UnitTests.NetCore3.csproj", "{A6A0E6FF-E114-4F26-99E9-CAD1C03BD743}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -151,6 +153,10 @@ Global
{D1AB8AB2-CFF5-4AB0-8D06-3ADAD78D6B43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1AB8AB2-CFF5-4AB0-8D06-3ADAD78D6B43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1AB8AB2-CFF5-4AB0-8D06-3ADAD78D6B43}.Release|Any CPU.Build.0 = Release|Any CPU
{A6A0E6FF-E114-4F26-99E9-CAD1C03BD743}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6A0E6FF-E114-4F26-99E9-CAD1C03BD743}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6A0E6FF-E114-4F26-99E9-CAD1C03BD743}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6A0E6FF-E114-4F26-99E9-CAD1C03BD743}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -178,6 +184,7 @@ Global
{D1AB8AB2-CFF5-4AB0-8D06-3ADAD78D6B43} = {88D48136-E176-4AF7-ACA4-A2954F3BD55B}
{8155DEC6-431B-4371-9EBC-D8E729AF3096} = {88D48136-E176-4AF7-ACA4-A2954F3BD55B}
{86B68C08-267A-47BD-BCBC-427710D2654F} = {88D48136-E176-4AF7-ACA4-A2954F3BD55B}
{A6A0E6FF-E114-4F26-99E9-CAD1C03BD743} = {88D48136-E176-4AF7-ACA4-A2954F3BD55B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C39E9BDB-0077-445C-8F09-801CAE1AF8AB}
Expand Down
1 change: 1 addition & 0 deletions AgileMapper.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertToUsingDeclaration/@EntryIndexedValue">HINT</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=LocalConstants/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private void ThrowIfUnconstructable<TDerivedTarget>()
var configuredImplementationPairings = MapperContext
.UserConfigurations
.DerivedTypes
.GetImplementationTypePairsFor(_configInfo.ToMapperData(), MapperContext);
.GetImplementationTypePairsFor(_configInfo.ToMapperData());

if (configuredImplementationPairings.None())
{
Expand Down
8 changes: 2 additions & 6 deletions AgileMapper/Configuration/DataSourceReversalSetting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ namespace AgileObjects.AgileMapper.Configuration
using System;
#endif
using Members;
using ReadableExpressions.Extensions;

internal class DataSourceReversalSetting :
UserConfiguredItemBase
Expand Down Expand Up @@ -48,15 +47,12 @@ public string GetConflictMessage(DataSourceReversalSetting conflicting)
return GetRedundantSettingConflictMessage(conflicting, " by default");
}

var targetType = ConfigInfo.TargetType.GetFriendlyName();

if (ConfigInfo.IsForAllSourceTypes())
{
return GetRedundantSettingConflictMessage(conflicting, " when mapping to " + targetType);
return GetRedundantSettingConflictMessage(conflicting, " when mapping to " + TargetTypeName);
}

var sourceType = ConfigInfo.SourceType.GetFriendlyName();
var typeSettings = $" when mapping {sourceType} -> {targetType}";
var typeSettings = $" when mapping {SourceTypeName} -> {TargetTypeName}";

return GetRedundantSettingConflictMessage(conflicting, typeSettings);
}
Expand Down
Loading