bool IMappingEngineRunner.ShouldMapSourceCollectionAsNull(ResolutionContext context) { var typeMap = context.GetContextTypeMap(); if (typeMap != null) { return(ConfigurationProvider.GetProfileConfiguration(typeMap.Profile).AllowNullCollections); } return(ConfigurationProvider.AllowNullCollections); }
bool IMappingEngineRunner.ShouldMapSourceValueAsNull(ResolutionContext context) { if (TypeExtensions.IsValueType(context.DestinationType) && !PrimitiveExtensions.IsNullableType(context.DestinationType)) { return(false); } var typeMap = context.GetContextTypeMap(); if (typeMap != null) { return(ConfigurationProvider.GetProfileConfiguration(typeMap.Profile).AllowNullDestinationValues); } return(ConfigurationProvider.AllowNullDestinationValues); }