-
Notifications
You must be signed in to change notification settings - Fork 390
Description
Previously, I added two overload for method Adapt that locally and temporarily modified the global configuration.
public static TDestination Adapt<TDestination>(this object? source, Action<TypeAdapterConfig> configAction)
public static TDestination Adapt<TSource, TDestination>(this object? source, Action<TypeAdapterSetter<TSource, TDestination>> configAction)
What do you think about adding the following the overload to modify an existing object?
public static TDestination Adapt<TSource, TDestination>(this object? source, TDestination destination, Action<TypeAdapterSetter<TSource, TDestination>> SetterAction)
And add an overload to ProjectToType method that locally and temporarily modified the global configuration.
The proposed overload:
public static IQueryable<TDestination> ProjectToType<TDestination>(this IQueryable source, TypeAdapterConfig? config = null, Action<TypeAdapterSetter<TSource, TDestination>> SetterAction)
Of course, the following method already exists in the current version and uses a config instead of the global setting.
public static IQueryable ProjectToType(this IQueryable source, Type destinationType, TypeAdapterConfig? config = null)