You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 25, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: src/AutoMapper.Extensions.Microsoft.DependencyInjection/AutoMapper.Extensions.Microsoft.DependencyInjection.csproj
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
<PropertyGroup>
4
4
<Description>AutoMapper extensions for ASP.NET Core</Description>
/// Extensions to scan for AutoMapper classes and register them with the static/singleton Mapper class
12
-
/// - Finds <see cref="Profile"/> classes and initializes AutoMapper with them using <see cref="Mapper.Initialize(Action{AutoMapper.IMapperConfigurationExpression})"/>
13
-
/// - Scans for <see cref="ITypeConverter{TSource,TDestination}"/>, <see cref="IValueResolver{TSource,TDestination,TDestMember}"/>, <see cref="IMemberValueResolver{TSource,TDestination,TSourceMember,TDestMember}" /> and <see cref="IMappingAction{TSource,TDestination}"/> implementations and registers them as <see cref="ServiceLifetime.Transient"/>
14
-
/// - Registers <see cref="Mapper.Configuration"/> as <see cref="ServiceLifetime.Singleton"/>
15
-
/// - Registers <see cref="IMapper"/> as <see cref="ServiceLifetime.Scoped"/> with a service factory of the scoped <see cref="IServiceProvider"/>
16
-
/// After calling AddAutoMapper you will have the static <see cref="Mapper"/> configuration initialized and you can use Mapper.Map and ProjectTo in your application code.
17
-
/// To use instance-based registration instead of the static <see cref="Mapper"/> class, set the <see cref="UseStaticRegistration"/> to false.
18
-
/// </summary>
19
-
publicstaticclassServiceCollectionExtensions
20
-
{
1
+
namespaceAutoMapper
2
+
{
3
+
usingSystem;
4
+
usingSystem.Collections.Generic;
5
+
usingSystem.Linq;
6
+
usingSystem.Reflection;
7
+
usingMicrosoft.Extensions.DependencyInjection;
8
+
9
+
/// <summary>
10
+
/// Extensions to scan for AutoMapper classes and register them with the static/singleton Mapper class
11
+
/// - Finds <see cref="Profile"/> classes and initializes AutoMapper with them using <see cref="Mapper.Initialize(Action{AutoMapper.IMapperConfigurationExpression})"/>
12
+
/// - Scans for <see cref="ITypeConverter{TSource,TDestination}"/>, <see cref="IValueResolver{TSource,TDestination,TDestMember}"/>, <see cref="IMemberValueResolver{TSource,TDestination,TSourceMember,TDestMember}" /> and <see cref="IMappingAction{TSource,TDestination}"/> implementations and registers them as <see cref="ServiceLifetime.Transient"/>
13
+
/// - Registers <see cref="Mapper.Configuration"/> as <see cref="ServiceLifetime.Singleton"/>
14
+
/// - Registers <see cref="IMapper"/> as <see cref="ServiceLifetime.Scoped"/> with a service factory of the scoped <see cref="IServiceProvider"/>
15
+
/// After calling AddAutoMapper you will have the static <see cref="Mapper"/> configuration initialized and you can use Mapper.Map and ProjectTo in your application code.
16
+
/// To use instance-based registration instead of the static <see cref="Mapper"/> class, set the <see cref="UseStaticRegistration"/> to false.
17
+
/// </summary>
18
+
publicstaticclassServiceCollectionExtensions
19
+
{
21
20
/// <summary>
22
-
/// Use the static registration method of Mapper.Initialize. Defaults to true.
21
+
/// Use the static registration method of Mapper.Initialize. Defaults to true.
23
22
/// When false, an instance of a MapperConfiguration object is registered instead.
0 commit comments