Browse Source
Merge pull request #9358 from personball/fix-issue-9357
Use Type instead of TypeAsString to compare.
pull/9382/head
Halil İbrahim Kalkan
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
10 deletions
-
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs
|
|
|
@ -10,6 +10,7 @@ using Microsoft.Extensions.Options; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
using Volo.Abp.Http.Modeling; |
|
|
|
using Volo.Abp.MultiTenancy; |
|
|
|
using Volo.Abp.Reflection; |
|
|
|
using Volo.Abp.Threading; |
|
|
|
using Volo.Abp.Tracing; |
|
|
|
|
|
|
|
@ -142,17 +143,8 @@ namespace Volo.Abp.Http.Client.DynamicProxying |
|
|
|
|
|
|
|
protected virtual bool TypeMatches(MethodParameterApiDescriptionModel actionParameter, ParameterInfo methodParameter) |
|
|
|
{ |
|
|
|
return NormalizeTypeName(actionParameter.TypeAsString) == |
|
|
|
NormalizeTypeName(methodParameter.ParameterType.GetFullNameWithAssemblyName()); |
|
|
|
return actionParameter.Type.ToUpper() == TypeHelper.GetFullNameHandlingNullableAndGenerics(methodParameter.ParameterType).ToUpper(); |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual string NormalizeTypeName(string typeName) |
|
|
|
{ |
|
|
|
const string placeholder = "%COREFX%"; |
|
|
|
const string netCoreLib = "System.Private.CoreLib"; |
|
|
|
const string netFxLib = "mscorlib"; |
|
|
|
|
|
|
|
return typeName.Replace(netCoreLib, placeholder).Replace(netFxLib, placeholder); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|