maliming
4 years ago
No known key found for this signature in database
GPG Key ID: 96224957E51C89E
1 changed files with
2 additions and
2 deletions
-
framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConventionalRegistrar.cs
|
|
|
@ -1,7 +1,6 @@ |
|
|
|
using System; |
|
|
|
using System.Linq; |
|
|
|
using AutoMapper; |
|
|
|
using AutoMapper.Internal; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
|
|
|
|
@ -19,7 +18,8 @@ namespace Volo.Abp.AutoMapper |
|
|
|
|
|
|
|
protected override bool IsConventionalRegistrationDisabled(Type type) |
|
|
|
{ |
|
|
|
return !OpenTypes.Any(type.ImplementsGenericInterface) || base.IsConventionalRegistrationDisabled(type); |
|
|
|
return type.GetInterfaces().Any(x => x.IsGenericType && OpenTypes.Contains(x.GetGenericTypeDefinition())) || |
|
|
|
base.IsConventionalRegistrationDisabled(type); |
|
|
|
} |
|
|
|
|
|
|
|
protected override ServiceLifetime? GetDefaultLifeTimeOrNull(Type type) |
|
|
|
|