Skip to content

Commit 27a9d01

Browse files
authored
Merge pull request #12 from micdah/mda/upgrade-to-AutoMapper-11
- Changed reference to AutoMapper to the range `[11.0, 12.0)`
2 parents d87bfe0 + 0dd1062 commit 27a9d01

File tree

6 files changed

+13
-26
lines changed

6 files changed

+13
-26
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ jobs:
1717
uses: actions/checkout@v2
1818
with:
1919
fetch-depth: 0
20+
- name: Use .NET 6
21+
uses: actions/setup-dotnet@v1
22+
with:
23+
dotnet-version: '6.0.x'
2024
- name: Build and Test
2125
run: ./Build.ps1
2226
shell: pwsh

src/AutoMapper.Extensions.EnumMapping.Tests/AutoMapper.Extensions.EnumMapping.Tests.csproj

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net461;netcoreapp2.1;</TargetFrameworks>
3+
<TargetFramework>net6.0</TargetFramework>
44
<IsPackable>false</IsPackable>
55
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
66
</PropertyGroup>
@@ -24,17 +24,4 @@
2424
<ProjectReference Include="..\..\src\AutoMapper.Extensions.EnumMapping\AutoMapper.Extensions.EnumMapping.csproj" />
2525
</ItemGroup>
2626

27-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
28-
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
29-
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
30-
</ItemGroup>
31-
32-
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
33-
<Reference Include="Microsoft.CSharp" />
34-
</ItemGroup>
35-
36-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
37-
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
38-
</ItemGroup>
39-
4027
</Project>

src/AutoMapper.Extensions.EnumMapping/AutoMapper.Extensions.EnumMapping.csproj

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Company>Henk Kin</Company>
66
<Summary>Convention-based enum value mapping extension for AutoMapper.</Summary>
77
<Description>Convention-based enum value mapping extension for AutoMapper.</Description>
8-
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
8+
<TargetFramework>netstandard2.1</TargetFramework>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
<AssemblyName>AutoMapper.Extensions.EnumMapping</AssemblyName>
1111
<AssemblyOriginatorKeyFile>..\..\AutoMapper.snk</AssemblyOriginatorKeyFile>
@@ -24,19 +24,12 @@
2424
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
2525
</PropertyGroup>
2626

27-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
27+
<ItemGroup>
28+
<PackageReference Include="AutoMapper" Version="[11.0, 12.0)" />
2829
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
2930
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
3031
</ItemGroup>
3132

32-
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
33-
<Reference Include="Microsoft.CSharp" />
34-
</ItemGroup>
35-
36-
<ItemGroup>
37-
<PackageReference Include="AutoMapper" Version="[10.0, 11.0)" />
38-
</ItemGroup>
39-
4033
<ItemGroup>
4134
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
4235
<PackageReference Include="MinVer" Version="2.3.0" PrivateAssets="All" />

src/AutoMapper.Extensions.EnumMapping/EnumMapperConfigurationExpressionExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Linq;
22
using AutoMapper.Extensions.EnumMapping.Internal;
3+
using AutoMapper.Internal;
34

45
namespace AutoMapper.Extensions.EnumMapping
56
{
@@ -14,7 +15,7 @@ public static class EnumMapperConfigurationExpressionExtensions
1415
/// <param name="mapperConfigurationExpression">Configuration object for AutoMapper</param>
1516
public static void EnableEnumMappingValidation(this IMapperConfigurationExpression mapperConfigurationExpression)
1617
{
17-
mapperConfigurationExpression.Advanced.Validator(context =>
18+
mapperConfigurationExpression.Internal().Validator(context =>
1819
{
1920
if (context.TypeMap != null)
2021
{

src/AutoMapper.Extensions.EnumMapping/Internal/EnumMappingValidationRuntimeFeature.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Text;
4+
using AutoMapper.Internal;
45

56
namespace AutoMapper.Extensions.EnumMapping.Internal
67
{
@@ -17,7 +18,7 @@ public EnumMappingValidationRuntimeFeature(Dictionary<TSource, TDestination> enu
1718
_enumMappingType = enumMappingType;
1819
}
1920

20-
public void Seal(IConfigurationProvider configurationProvider)
21+
public void Seal(IGlobalConfiguration configurationProvider)
2122
{
2223
}
2324

src/AutoMapper.Extensions.EnumMapping/Internal/IEnumMappingValidationRuntimeFeature.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using AutoMapper.Features;
2+
using AutoMapper.Internal;
23

34
namespace AutoMapper.Extensions.EnumMapping.Internal
45
{

0 commit comments

Comments
 (0)