From a9e8f415f1ae4c8cac674fc4ea0d55913c416fea Mon Sep 17 00:00:00 2001 From: Stephen Lane Date: Tue, 7 May 2024 11:47:16 +0100 Subject: [PATCH] 0.0.1 release --- src/CSO.AutoMapper.sln | 10 ++++++++++ src/CSO.AutoMapper/CSO.AutoMapper.csproj | 6 +++--- src/CSO.AutoMapper/Entities/AutoMap.cs | 11 +++++++++++ src/CSO.AutoMapper/packages.lock.json | 12 +++--------- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/CSO.AutoMapper.sln b/src/CSO.AutoMapper.sln index 2f1952a..cd633e3 100644 --- a/src/CSO.AutoMapper.sln +++ b/src/CSO.AutoMapper.sln @@ -10,6 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSO.AutoMapper", "CSO.AutoMapper\CSO.AutoMapper.csproj", "{88A6E5BE-ADFC-4C09-BBB6-612A6F402007}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSOAutoMapperUnitTests", "CSOAutoMapperUnitTests\CSOAutoMapperUnitTests.csproj", "{D41ABB57-1417-430E-8223-8C2867A68A3E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -26,6 +28,14 @@ Global {88A6E5BE-ADFC-4C09-BBB6-612A6F402007}.Release|Any CPU.Build.0 = Release|Any CPU {88A6E5BE-ADFC-4C09-BBB6-612A6F402007}.Release|x64.ActiveCfg = Release|x64 {88A6E5BE-ADFC-4C09-BBB6-612A6F402007}.Release|x64.Build.0 = Release|x64 + {D41ABB57-1417-430E-8223-8C2867A68A3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D41ABB57-1417-430E-8223-8C2867A68A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D41ABB57-1417-430E-8223-8C2867A68A3E}.Debug|x64.ActiveCfg = Debug|Any CPU + {D41ABB57-1417-430E-8223-8C2867A68A3E}.Debug|x64.Build.0 = Debug|Any CPU + {D41ABB57-1417-430E-8223-8C2867A68A3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D41ABB57-1417-430E-8223-8C2867A68A3E}.Release|Any CPU.Build.0 = Release|Any CPU + {D41ABB57-1417-430E-8223-8C2867A68A3E}.Release|x64.ActiveCfg = Release|Any CPU + {D41ABB57-1417-430E-8223-8C2867A68A3E}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/CSO.AutoMapper/CSO.AutoMapper.csproj b/src/CSO.AutoMapper/CSO.AutoMapper.csproj index 519e61f..c09f659 100644 --- a/src/CSO.AutoMapper/CSO.AutoMapper.csproj +++ b/src/CSO.AutoMapper/CSO.AutoMapper.csproj @@ -9,7 +9,7 @@ True Central Statistics Office, Ireland - CSO.AutoMapper.BETA + CSO.AutoMapper CSO Automapper Central Statistics Office, Ireland 0.0.1 @@ -17,14 +17,14 @@ False https://github.com/CSOIreland/CSOAutomapper - - [INFO] initial release of CSO standalone automapper library + - [ENHANCEMENT] Upgraded to 13.0.1 version of automapper true true - + diff --git a/src/CSO.AutoMapper/Entities/AutoMap.cs b/src/CSO.AutoMapper/Entities/AutoMap.cs index 69afb47..51926c2 100644 --- a/src/CSO.AutoMapper/Entities/AutoMap.cs +++ b/src/CSO.AutoMapper/Entities/AutoMap.cs @@ -29,6 +29,9 @@ public static IMapper CreateMapper(IDictionary configDict) cfg.CreateMap().ConvertUsing(); cfg.CreateMap().ConvertUsing(); cfg.CreateMap().ConvertUsing(); + cfg.CreateMap().ConvertUsing(); + + }); var mapper = config.CreateMapper(); @@ -264,6 +267,14 @@ public class StringToNullDateTimeConverter : ITypeConverter } } } + + public class StringToNullConverter : ITypeConverter + { + public string? Convert(JValue source, string? destination, ResolutionContext context) + { + return source.Value == null ? null : source.Value.ToString(); + } + } } } diff --git a/src/CSO.AutoMapper/packages.lock.json b/src/CSO.AutoMapper/packages.lock.json index 81306c6..f4df3dc 100644 --- a/src/CSO.AutoMapper/packages.lock.json +++ b/src/CSO.AutoMapper/packages.lock.json @@ -4,11 +4,10 @@ "net8.0": { "AutoMapper": { "type": "Direct", - "requested": "[13.0.0, )", - "resolved": "13.0.0", - "contentHash": "BFMiZ5kNqbN1ircgFE7qtXWzGjGf1UnEPo39dWlvaPFVep75cikyjFCFssthj9l2ZC4OkeG4vXIgMTApnedSNg==", + "requested": "[13.0.1, )", + "resolved": "13.0.1", + "contentHash": "/Fx1SbJ16qS7dU4i604Sle+U9VLX+WSNVJggk6MupKVkYvvBm4XqYaeFuf67diHefHKHs50uQIS2YEDFhPCakQ==", "dependencies": { - "Microsoft.CSharp": "4.7.0", "Microsoft.Extensions.Options": "6.0.0" } }, @@ -18,11 +17,6 @@ "resolved": "13.0.3", "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" }, - "Microsoft.CSharp": { - "type": "Transitive", - "resolved": "4.7.0", - "contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==" - }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", "resolved": "6.0.0",