11namespace AutoMapper ;
2+
23using IObjectMappingOperationOptions = IMappingOperationOptions < object , object > ;
34using Factory = Func < Type , object > ;
4- #nullable enable
55public interface IMapperBase
66{
77 /// <summary>
@@ -11,15 +11,15 @@ public interface IMapperBase
1111 /// <typeparam name="TDestination">Destination type to create</typeparam>
1212 /// <param name="source">Source object to map from</param>
1313 /// <returns>Mapped destination object</returns>
14- TDestination ? Map < TDestination > ( object ? source ) ;
14+ TDestination Map < TDestination > ( object source ) ;
1515 /// <summary>
1616 /// Execute a mapping from the source object to a new destination object.
1717 /// </summary>
1818 /// <typeparam name="TSource">Source type to use</typeparam>
1919 /// <typeparam name="TDestination">Destination type to create</typeparam>
2020 /// <param name="source">Source object to map from</param>
2121 /// <returns>Mapped destination object</returns>
22- TDestination ? Map < TSource , TDestination > ( TSource ? source ) ;
22+ TDestination Map < TSource , TDestination > ( TSource source ) ;
2323 /// <summary>
2424 /// Execute a mapping from the source object to the existing destination object.
2525 /// </summary>
@@ -28,15 +28,15 @@ public interface IMapperBase
2828 /// <param name="source">Source object to map from</param>
2929 /// <param name="destination">Destination object to map into</param>
3030 /// <returns>The mapped destination object</returns>
31- TDestination ? Map < TSource , TDestination > ( TSource ? source , TDestination ? destination ) ;
31+ TDestination Map < TSource , TDestination > ( TSource source , TDestination destination ) ;
3232 /// <summary>
3333 /// Execute a mapping from the source object to a new destination object with explicit <see cref="System.Type"/> objects
3434 /// </summary>
3535 /// <param name="source">Source object to map from</param>
3636 /// <param name="sourceType">Source type to use</param>
3737 /// <param name="destinationType">Destination type to create</param>
3838 /// <returns>Mapped destination object</returns>
39- object ? Map ( object ? source , Type ? sourceType , Type destinationType ) ;
39+ object Map ( object source , Type sourceType , Type destinationType ) ;
4040 /// <summary>
4141 /// Execute a mapping from the source object to existing destination object with explicit <see cref="System.Type"/> objects
4242 /// </summary>
@@ -45,7 +45,7 @@ public interface IMapperBase
4545 /// <param name="sourceType">Source type to use</param>
4646 /// <param name="destinationType">Destination type to use</param>
4747 /// <returns>Mapped destination object</returns>
48- object ? Map ( object ? source , object ? destination , Type ? sourceType , Type ? destinationType ) ;
48+ object Map ( object source , object destination , Type sourceType , Type destinationType ) ;
4949}
5050public interface IMapper : IMapperBase
5151{
@@ -56,7 +56,7 @@ public interface IMapper : IMapperBase
5656 /// <param name="source">Source object to map from</param>
5757 /// <param name="opts">Mapping options</param>
5858 /// <returns>Mapped destination object</returns>
59- TDestination ? Map < TDestination > ( object ? source , Action < IMappingOperationOptions < object , TDestination > > opts ) ;
59+ TDestination Map < TDestination > ( object source , Action < IMappingOperationOptions < object , TDestination > > opts ) ;
6060 /// <summary>
6161 /// Execute a mapping from the source object to a new destination object with supplied mapping options.
6262 /// </summary>
@@ -65,7 +65,7 @@ public interface IMapper : IMapperBase
6565 /// <param name="source">Source object to map from</param>
6666 /// <param name="opts">Mapping options</param>
6767 /// <returns>Mapped destination object</returns>
68- TDestination ? Map < TSource , TDestination > ( TSource ? source , Action < IMappingOperationOptions < TSource , TDestination > > opts ) ;
68+ TDestination Map < TSource , TDestination > ( TSource source , Action < IMappingOperationOptions < TSource , TDestination > > opts ) ;
6969 /// <summary>
7070 /// Execute a mapping from the source object to the existing destination object with supplied mapping options.
7171 /// </summary>
@@ -75,7 +75,7 @@ public interface IMapper : IMapperBase
7575 /// <param name="destination">Destination object to map into</param>
7676 /// <param name="opts">Mapping options</param>
7777 /// <returns>The mapped destination object</returns>
78- TDestination ? Map < TSource , TDestination > ( TSource ? source , TDestination ? destination , Action < IMappingOperationOptions < TSource , TDestination > > opts ) ;
78+ TDestination Map < TSource , TDestination > ( TSource source , TDestination destination , Action < IMappingOperationOptions < TSource , TDestination > > opts ) ;
7979 /// <summary>
8080 /// Execute a mapping from the source object to a new destination object with explicit <see cref="System.Type"/> objects and supplied mapping options.
8181 /// </summary>
@@ -84,7 +84,7 @@ public interface IMapper : IMapperBase
8484 /// <param name="destinationType">Destination type to create</param>
8585 /// <param name="opts">Mapping options</param>
8686 /// <returns>Mapped destination object</returns>
87- object ? Map ( object ? source , Type ? sourceType , Type destinationType , Action < IObjectMappingOperationOptions > opts ) ;
87+ object Map ( object source , Type sourceType , Type destinationType , Action < IObjectMappingOperationOptions > opts ) ;
8888 /// <summary>
8989 /// Execute a mapping from the source object to existing destination object with supplied mapping options and explicit <see cref="System.Type"/> objects
9090 /// </summary>
@@ -94,7 +94,7 @@ public interface IMapper : IMapperBase
9494 /// <param name="destinationType">Destination type to use</param>
9595 /// <param name="opts">Mapping options</param>
9696 /// <returns>Mapped destination object</returns>
97- object ? Map ( object ? source , object ? destination , Type ? sourceType , Type ? destinationType , Action < IObjectMappingOperationOptions > opts ) ;
97+ object Map ( object source , object destination , Type sourceType , Type destinationType , Action < IObjectMappingOperationOptions > opts ) ;
9898 /// <summary>
9999 /// Configuration provider for performing maps
100100 /// </summary>
@@ -108,7 +108,7 @@ public interface IMapper : IMapperBase
108108 /// <param name="parameters">Optional parameter object for parameterized mapping expressions</param>
109109 /// <param name="membersToExpand">Explicit members to expand</param>
110110 /// <returns>Queryable result, use queryable extension methods to project and execute result</returns>
111- IQueryable < TDestination > ProjectTo < TDestination > ( IQueryable source , object ? parameters = null , params Expression < Func < TDestination , object > > [ ] membersToExpand ) ;
111+ IQueryable < TDestination > ProjectTo < TDestination > ( IQueryable source , object parameters = null , params Expression < Func < TDestination , object > > [ ] membersToExpand ) ;
112112 /// <summary>
113113 /// Project the input queryable.
114114 /// </summary>
@@ -117,7 +117,7 @@ public interface IMapper : IMapperBase
117117 /// <param name="parameters">Optional parameter object for parameterized mapping expressions</param>
118118 /// <param name="membersToExpand">Explicit members to expand</param>
119119 /// <returns>Queryable result, use queryable extension methods to project and execute result</returns>
120- IQueryable < TDestination > ProjectTo < TDestination > ( IQueryable source , IDictionary < string , object > ? parameters , params string [ ] membersToExpand ) ;
120+ IQueryable < TDestination > ProjectTo < TDestination > ( IQueryable source , IDictionary < string , object > parameters , params string [ ] membersToExpand ) ;
121121 /// <summary>
122122 /// Project the input queryable.
123123 /// </summary>
@@ -126,12 +126,11 @@ public interface IMapper : IMapperBase
126126 /// <param name="parameters">Optional parameter object for parameterized mapping expressions</param>
127127 /// <param name="membersToExpand">Explicit members to expand</param>
128128 /// <returns>Queryable result, use queryable extension methods to project and execute result</returns>
129- IQueryable ProjectTo ( IQueryable source , Type destinationType , IDictionary < string , object > ? parameters = null , params string [ ] membersToExpand ) ;
129+ IQueryable ProjectTo ( IQueryable source , Type destinationType , IDictionary < string , object > parameters = null , params string [ ] membersToExpand ) ;
130130}
131131public interface IRuntimeMapper : IMapperBase
132132{
133133}
134- #nullable disable
135134internal interface IInternalRuntimeMapper : IRuntimeMapper
136135{
137136 TDestination Map < TSource , TDestination > ( TSource source , TDestination destination , ResolutionContext context , Type sourceType = null , Type destinationType = null , MemberMap memberMap = null ) ;
0 commit comments