Browse Source
Use more friendly `enum` type names.
pull/21675/head
maliming
2 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
8 additions and
2 deletions
-
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs
|
|
|
@ -247,8 +247,14 @@ public class CachedObjectExtensionsDtoService : ICachedObjectExtensionsDtoServic |
|
|
|
|
|
|
|
foreach (var enumProperty in enumProperties) |
|
|
|
{ |
|
|
|
// ReSharper disable once AssignNullToNotNullAttribute (enumProperty.Type.FullName can not be null for this case)
|
|
|
|
objectExtensionsDto.Enums[enumProperty.Type.FullName!] = CreateExtensionEnumDto(enumProperty); |
|
|
|
if (TypeHelper.IsNullableEnum(enumProperty.Type)) |
|
|
|
{ |
|
|
|
objectExtensionsDto.Enums[Nullable.GetUnderlyingType(enumProperty.Type)!.FullName + "?"] = CreateExtensionEnumDto(enumProperty); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
objectExtensionsDto.Enums[enumProperty.Type.FullName!] = CreateExtensionEnumDto(enumProperty); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|