From 0be091ed89b9e55862a68298521d79968c33f1bd Mon Sep 17 00:00:00 2001 From: Gary Woodfine Date: Sun, 5 Jan 2020 22:56:13 +0000 Subject: [PATCH] updated automapper to 8.1.0 --- README.md | 4 ++++ Threenine.Map.sln | 6 +++--- src/MapConfigurationFactory.cs | 5 ++++- src/Threenine.Map.csproj | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2deaccb..43b5052 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,10 @@ or using the Dotnet Core CLI `dotnet add package Threenine.Map` +The package will install Automapper 8.1.0. + +*** Do not attempt to use the library with Automapper 9.X + breaking with the removal of the static API + ## Documentation We are currently compiling comprehensive documentation and examples of use of available on [Threenine.Map - Read the Docs](http://threeninemap.readthedocs.io/en/latest/Getting-started.html). diff --git a/Threenine.Map.sln b/Threenine.Map.sln index 642e523..05aa40e 100644 --- a/Threenine.Map.sln +++ b/Threenine.Map.sln @@ -6,11 +6,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Threenine.Map", "src\Threen EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1F5C8EB2-12EE-4ACE-9084-1F9C4474CC84}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MapperTests", "UnitTests\MapperTests\MapperTests.csproj", "{9BF2645A-007C-4402-9AAB-08F813CBF680}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MapperTests", "tests\MapperTests\MapperTests.csproj", "{9BF2645A-007C-4402-9AAB-08F813CBF680}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DomainObjects", "UnitTests\DomainObjects\DomainObjects.csproj", "{8A8B8DD5-7961-49C6-A2A9-F91954236396}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DomainObjects", "tests\DomainObjects\DomainObjects.csproj", "{8A8B8DD5-7961-49C6-A2A9-F91954236396}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityObjects", "UnitTests\EntityObjects\EntityObjects.csproj", "{36A8C934-D5DB-4153-86D3-DC8975421E78}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityObjects", "tests\EntityObjects\EntityObjects.csproj", "{36A8C934-D5DB-4153-86D3-DC8975421E78}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/MapConfigurationFactory.cs b/src/MapConfigurationFactory.cs index 8b8ba40..66c72d2 100644 --- a/src/MapConfigurationFactory.cs +++ b/src/MapConfigurationFactory.cs @@ -24,7 +24,7 @@ public static void Scan(Func assemblyFilter = null) LoadMapsFromAssemblies(assembliesToLoad.ToArray()); } - public static void LoadMapsFromAssemblies(params Assembly[] assemblies) + private static void LoadMapsFromAssemblies(params Assembly[] assemblies) { var types = assemblies.SelectMany(a => a.GetExportedTypes()).ToArray(); LoadAllMappings(types); @@ -33,6 +33,9 @@ public static void LoadMapsFromAssemblies(params Assembly[] assemblies) public static void LoadAllMappings(IList types) { + + + Mapper.Initialize( cfg => { diff --git a/src/Threenine.Map.csproj b/src/Threenine.Map.csproj index fd0962b..ea6cbe2 100644 --- a/src/Threenine.Map.csproj +++ b/src/Threenine.Map.csproj @@ -23,7 +23,7 @@ - +