Skip to content

Commit

Permalink
0.0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
lanesCSO committed May 7, 2024
1 parent 42cd39f commit a9e8f41
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
10 changes: 10 additions & 0 deletions src/CSO.AutoMapper.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/CSO.AutoMapper/CSO.AutoMapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
<Configuration></Configuration>
<Company>Central Statistics Office, Ireland</Company>
<PackageId>CSO.AutoMapper.BETA</PackageId>
<PackageId>CSO.AutoMapper</PackageId>
<Product>CSO Automapper</Product>
<Copyright>Central Statistics Office, Ireland</Copyright>
<Version>0.0.1</Version>
<Authors>Central Statistics Office, Ireland</Authors>
<SignAssembly>False</SignAssembly>
<RepositoryUrl>https://github.com/CSOIreland/CSOAutomapper</RepositoryUrl>
<PackageReleaseNotes>
- [INFO] initial release of CSO standalone automapper library
- [ENHANCEMENT] Upgraded to 13.0.1 version of automapper
</PackageReleaseNotes>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode>true</RestoreLockedMode>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="13.0.0" />
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

Expand Down
11 changes: 11 additions & 0 deletions src/CSO.AutoMapper/Entities/AutoMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public static IMapper CreateMapper(IDictionary<string, string> configDict)
cfg.CreateMap<JValue, DateTime?>().ConvertUsing<StringToNullDateTimeConverter>();
cfg.CreateMap<JValue, Decimal>().ConvertUsing<StringToDecimalConverter>();
cfg.CreateMap<JValue, Decimal?>().ConvertUsing<StringToNullDecimalConverter>();
cfg.CreateMap<JValue, String?>().ConvertUsing<StringToNullConverter>();


});

var mapper = config.CreateMapper();
Expand Down Expand Up @@ -264,6 +267,14 @@ public class StringToNullDateTimeConverter : ITypeConverter<JValue, DateTime?>
}
}
}

public class StringToNullConverter : ITypeConverter<JValue, string?>
{
public string? Convert(JValue source, string? destination, ResolutionContext context)
{
return source.Value == null ? null : source.Value.ToString();
}
}
}
}

12 changes: 3 additions & 9 deletions src/CSO.AutoMapper/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
Expand All @@ -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",
Expand Down

0 comments on commit a9e8f41

Please sign in to comment.