-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable multiple calls of RegisterAutoMapper
- Loading branch information
Showing
10 changed files
with
141 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...Contrib.Autofac.DependencyInjection/AutoMapper.Contrib.Autofac.DependencyInjection.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/AutoMapper.Contrib.Autofac.DependencyInjection/MapperConfigurationExpressionAdapter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace AutoMapper.Contrib.Autofac.DependencyInjection; | ||
|
||
internal class MapperConfigurationExpressionAdapter | ||
{ | ||
public MapperConfigurationExpression MapperConfigurationExpression { get; } | ||
|
||
public MapperConfigurationExpressionAdapter(MapperConfigurationExpression mapperConfigurationExpression) | ||
{ | ||
this.MapperConfigurationExpression = mapperConfigurationExpression; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...ction.SecondAssembly/AutoMapper.Contrib.Autofac.DependencyInjection.SecondAssembly.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="AutoMapper" Version="12.0.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
6 changes: 6 additions & 0 deletions
6
test/AutoMapper.Contrib.Autofac.DependencyInjection.SecondAssembly/ObjectDestination.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace AutoMapper.Contrib.Autofac.DependencyInjection.SecondAssembly; | ||
|
||
public class ObjectDestination | ||
{ | ||
public string? Id { get; set; } | ||
} |
6 changes: 6 additions & 0 deletions
6
test/AutoMapper.Contrib.Autofac.DependencyInjection.SecondAssembly/ObjectSource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace AutoMapper.Contrib.Autofac.DependencyInjection.SecondAssembly; | ||
|
||
public class ObjectSource | ||
{ | ||
public string? Id { get; set; } | ||
} |
9 changes: 9 additions & 0 deletions
9
test/AutoMapper.Contrib.Autofac.DependencyInjection.SecondAssembly/SecondAssemblyProfile.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace AutoMapper.Contrib.Autofac.DependencyInjection.SecondAssembly; | ||
|
||
public class SecondAssemblyProfile : Profile | ||
{ | ||
public SecondAssemblyProfile() | ||
{ | ||
this.CreateMap<ObjectSource, ObjectDestination>().ReverseMap(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters