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 4629707..05aa40e 100644 --- a/Threenine.Map.sln +++ b/Threenine.Map.sln @@ -4,13 +4,13 @@ VisualStudioVersion = 15.0.27130.2027 MinimumVisualStudioVersion = 15.0.26124.0 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Threenine.Map", "src\Threenine.Map.csproj", "{1CDD5884-E7D3-435B-B0FC-30DAC41B3B94}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{1F5C8EB2-12EE-4ACE-9084-1F9C4474CC84}" +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 @@ - + diff --git a/UnitTests/DomainObjects/ComplexDomainObject.cs b/tests/DomainObjects/ComplexDomainObject.cs similarity index 100% rename from UnitTests/DomainObjects/ComplexDomainObject.cs rename to tests/DomainObjects/ComplexDomainObject.cs diff --git a/UnitTests/DomainObjects/DomainObjects.csproj b/tests/DomainObjects/DomainObjects.csproj similarity index 100% rename from UnitTests/DomainObjects/DomainObjects.csproj rename to tests/DomainObjects/DomainObjects.csproj diff --git a/UnitTests/DomainObjects/SimpleDomainObject.cs b/tests/DomainObjects/SimpleDomainObject.cs similarity index 100% rename from UnitTests/DomainObjects/SimpleDomainObject.cs rename to tests/DomainObjects/SimpleDomainObject.cs diff --git a/UnitTests/EntityObjects/EntityObjects.csproj b/tests/EntityObjects/EntityObjects.csproj similarity index 95% rename from UnitTests/EntityObjects/EntityObjects.csproj rename to tests/EntityObjects/EntityObjects.csproj index 34824bd..7ac1b71 100644 --- a/UnitTests/EntityObjects/EntityObjects.csproj +++ b/tests/EntityObjects/EntityObjects.csproj @@ -1,11 +1,11 @@ - - - - netstandard2.0 - - - - - - - + + + + netstandard2.0 + + + + + + + diff --git a/UnitTests/EntityObjects/SimpleEntity.cs b/tests/EntityObjects/SimpleEntity.cs similarity index 94% rename from UnitTests/EntityObjects/SimpleEntity.cs rename to tests/EntityObjects/SimpleEntity.cs index 9fa413a..a602824 100644 --- a/UnitTests/EntityObjects/SimpleEntity.cs +++ b/tests/EntityObjects/SimpleEntity.cs @@ -1,12 +1,12 @@ -using System; - - -namespace EntityObjects -{ - public class SimpleEntity - { - public string Name { get; set; } - public string Description { get; set; } - public int Age { get; set; } - } -} +using System; + + +namespace EntityObjects +{ + public class SimpleEntity + { + public string Name { get; set; } + public string Description { get; set; } + public int Age { get; set; } + } +} diff --git a/UnitTests/MapperTests/ComplexDomainObjectTests.cs b/tests/MapperTests/ComplexDomainObjectTests.cs similarity index 100% rename from UnitTests/MapperTests/ComplexDomainObjectTests.cs rename to tests/MapperTests/ComplexDomainObjectTests.cs diff --git a/UnitTests/MapperTests/MapperFixture.cs b/tests/MapperTests/MapperFixture.cs similarity index 100% rename from UnitTests/MapperTests/MapperFixture.cs rename to tests/MapperTests/MapperFixture.cs diff --git a/UnitTests/MapperTests/MapperTests.csproj b/tests/MapperTests/MapperTests.csproj similarity index 100% rename from UnitTests/MapperTests/MapperTests.csproj rename to tests/MapperTests/MapperTests.csproj diff --git a/UnitTests/MapperTests/SimpleDomainObjectTests.cs b/tests/MapperTests/SimpleDomainObjectTests.cs similarity index 100% rename from UnitTests/MapperTests/SimpleDomainObjectTests.cs rename to tests/MapperTests/SimpleDomainObjectTests.cs diff --git a/UnitTests/MapperTests/TestCollection.cs b/tests/MapperTests/TestCollection.cs similarity index 100% rename from UnitTests/MapperTests/TestCollection.cs rename to tests/MapperTests/TestCollection.cs diff --git a/website/website.md b/website/website.md deleted file mode 100644 index e69de29..0000000