Browse Source

Enable nullable annotations for Volo.Abp.AspNetCore.Mvc.Contracts

pull/17094/head
liangshiwei 3 years ago
parent
commit
c8667233b4
  1. 2
      framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/MauiBlazorRemoteTenantStore.cs
  2. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcCachedApplicationConfigurationClient.cs
  3. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcRemoteTenantStore.cs
  4. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj
  5. 16
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs
  6. 5
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationConfigurationDto.cs
  7. 5
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationDto.cs
  8. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationRequestDto.cs
  9. 9
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationResourceDto.cs
  10. 7
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationSettingConfigurationDto.cs
  11. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ClockDto.cs
  12. 16
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentCultureDto.cs
  13. 16
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentUserDto.cs
  14. 14
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/DateTimeFormatDto.cs
  15. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/EntityExtensionDto.cs
  16. 7
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionEnumDto.cs
  17. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionEnumFieldDto.cs
  18. 7
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionPropertyAttributeDto.cs
  19. 17
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionPropertyDto.cs
  20. 8
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionPropertyUiDto.cs
  21. 10
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionPropertyUiLookupDto.cs
  22. 5
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/LocalizableStringDto.cs
  23. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ModuleExtensionDto.cs
  24. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ObjectExtensionsDto.cs
  25. 15
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/TimingDto.cs
  26. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/CurrentTenantDto.cs
  27. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/FindTenantResultDto.cs
  28. 6
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs
  29. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs

2
framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor/Volo/Abp/AspNetCore/Components/MauiBlazor/MauiBlazorRemoteTenantStore.cs

@ -98,7 +98,7 @@ public class MauiBlazorRemoteTenantStore : ITenantStore, ITransientDependency
return null;
}
return new TenantConfiguration(tenantResultDto.TenantId.Value, tenantResultDto.Name);
return new TenantConfiguration(tenantResultDto.TenantId.Value, tenantResultDto.Name!);
}
protected virtual string CreateCacheKey(string tenantName)

4
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcCachedApplicationConfigurationClient.cs

@ -37,7 +37,7 @@ public class MvcCachedApplicationConfigurationClient : ICachedApplicationConfigu
Cache = cache;
}
public async Task<ApplicationConfigurationDto?> GetAsync()
public async Task<ApplicationConfigurationDto> GetAsync()
{
var cacheKey = CreateCacheKey();
var httpContext = HttpContextAccessor?.HttpContext;
@ -85,7 +85,7 @@ public class MvcCachedApplicationConfigurationClient : ICachedApplicationConfigu
return config;
}
public ApplicationConfigurationDto? Get()
public ApplicationConfigurationDto Get()
{
var cacheKey = CreateCacheKey();
var httpContext = HttpContextAccessor?.HttpContext;

2
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcRemoteTenantStore.cs

@ -146,7 +146,7 @@ public class MvcRemoteTenantStore : ITenantStore, ITransientDependency
return null;
}
return new TenantConfiguration(tenantResultDto.TenantId.Value, tenantResultDto.Name);
return new TenantConfiguration(tenantResultDto.TenantId.Value, tenantResultDto.Name!);
}
protected virtual string CreateCacheKey(string tenantName)

2
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj

@ -5,6 +5,8 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.Contracts</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.Contracts</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

16
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs

@ -31,4 +31,20 @@ public class ApplicationConfigurationDto : IHasExtraProperties
public ObjectExtensionsDto ObjectExtensions { get; set; }
public ExtraPropertyDictionary ExtraProperties { get; set; }
public ApplicationConfigurationDto()
{
Localization = new ApplicationLocalizationConfigurationDto();
Auth = new ApplicationAuthConfigurationDto();
Setting = new ApplicationSettingConfigurationDto();
CurrentUser = new CurrentUserDto();
Features = new ApplicationFeatureConfigurationDto();
GlobalFeatures = new ApplicationGlobalFeatureConfigurationDto();
MultiTenancy = new MultiTenancyInfoDto();
CurrentTenant = new CurrentTenantDto();
Timing = new TimingDto();
Clock = new ClockDto();
ObjectExtensions = new ObjectExtensionsDto();
ExtraProperties = new ExtraPropertyDictionary();
}
}

5
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationConfigurationDto.cs

@ -28,7 +28,7 @@ public class ApplicationLocalizationConfigurationDto
public CurrentCultureDto CurrentCulture { get; set; }
public string DefaultResourceName { get; set; }
public string? DefaultResourceName { get; set; }
public Dictionary<string, List<NameValue>> LanguagesMap { get; set; }
@ -38,5 +38,8 @@ public class ApplicationLocalizationConfigurationDto
{
Values = new Dictionary<string, Dictionary<string, string>>();
Languages = new List<LanguageInfo>();
CurrentCulture = new CurrentCultureDto();
LanguagesMap = new Dictionary<string, List<NameValue>>();
LanguageFilesMap = new Dictionary<string, List<NameValue>>();
}
}

5
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationDto.cs

@ -7,4 +7,9 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;
public class ApplicationLocalizationDto
{
public Dictionary<string, ApplicationLocalizationResourceDto> Resources { get; set; }
public ApplicationLocalizationDto()
{
Resources = new Dictionary<string, ApplicationLocalizationResourceDto>();
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationRequestDto.cs

@ -5,7 +5,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;
public class ApplicationLocalizationRequestDto
{
[Required]
public string CultureName { get; set; }
public string CultureName { get; set; } = default!;
public bool OnlyDynamics { get; set; }
}

9
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationResourceDto.cs

@ -7,6 +7,11 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;
public class ApplicationLocalizationResourceDto
{
public Dictionary<string, string> Texts { get; set; }
public string[] BaseResources { get; set; }
public string[] BaseResources { get; set; } = default!;
public ApplicationLocalizationResourceDto()
{
Texts = new Dictionary<string, string>();
}
}

7
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationSettingConfigurationDto.cs

@ -6,5 +6,10 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;
[Serializable]
public class ApplicationSettingConfigurationDto
{
public Dictionary<string, string> Values { get; set; }
public Dictionary<string, string?> Values { get; set; }
public ApplicationSettingConfigurationDto()
{
Values = new Dictionary<string, string?>();
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ClockDto.cs

@ -2,5 +2,5 @@
public class ClockDto
{
public string Kind { get; set; }
public string Kind { get; set; } = default!;
}

16
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentCultureDto.cs

@ -5,21 +5,21 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;
[Serializable]
public class CurrentCultureDto
{
public string DisplayName { get; set; }
public string DisplayName { get; set; } = default!;
public string EnglishName { get; set; }
public string EnglishName { get; set; } = default!;
public string ThreeLetterIsoLanguageName { get; set; }
public string ThreeLetterIsoLanguageName { get; set; } = default!;
public string TwoLetterIsoLanguageName { get; set; }
public string TwoLetterIsoLanguageName { get; set; } = default!;
public bool IsRightToLeft { get; set; }
public string CultureName { get; set; }
public string CultureName { get; set; } = default!;
public string Name { get; set; }
public string Name { get; set; } = default!;
public string NativeName { get; set; }
public string NativeName { get; set; } = default!;
public DateTimeFormatDto DateTimeFormat { get; set; }
public DateTimeFormatDto DateTimeFormat { get; set; } = default!;
}

16
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentUserDto.cs

@ -15,23 +15,23 @@ public class CurrentUserDto
public Guid? ImpersonatorTenantId { get; set; }
public string ImpersonatorUserName { get; set; }
public string? ImpersonatorUserName { get; set; }
public string ImpersonatorTenantName { get; set; }
public string? ImpersonatorTenantName { get; set; }
public string UserName { get; set; }
public string? UserName { get; set; }
public string Name { get; set; }
public string? Name { get; set; }
public string SurName { get; set; }
public string? SurName { get; set; }
public string Email { get; set; }
public string? Email { get; set; }
public bool EmailVerified { get; set; }
public string PhoneNumber { get; set; }
public string? PhoneNumber { get; set; }
public bool PhoneNumberVerified { get; set; }
public string[] Roles { get; set; }
public string[] Roles { get; set; } = default!;
}

14
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/DateTimeFormatDto.cs

@ -2,17 +2,17 @@
public class DateTimeFormatDto
{
public string CalendarAlgorithmType { get; set; }
public string CalendarAlgorithmType { get; set; } = default!;
public string DateTimeFormatLong { get; set; }
public string DateTimeFormatLong { get; set; } = default!;
public string ShortDatePattern { get; set; }
public string ShortDatePattern { get; set; } = default!;
public string FullDateTimePattern { get; set; }
public string FullDateTimePattern { get; set; } = default!;
public string DateSeparator { get; set; }
public string DateSeparator { get; set; } = default!;
public string ShortTimePattern { get; set; }
public string ShortTimePattern { get; set; } = default!;
public string LongTimePattern { get; set; }
public string LongTimePattern { get; set; } = default!;
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/EntityExtensionDto.cs

@ -9,4 +9,10 @@ public class EntityExtensionDto
public Dictionary<string, ExtensionPropertyDto> Properties { get; set; }
public Dictionary<string, object> Configuration { get; set; }
public EntityExtensionDto()
{
Properties = new Dictionary<string, ExtensionPropertyDto>();
Configuration = new Dictionary<string, object>();
}
}

7
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionEnumDto.cs

@ -8,5 +8,10 @@ public class ExtensionEnumDto
{
public List<ExtensionEnumFieldDto> Fields { get; set; }
public string LocalizationResource { get; set; }
public string? LocalizationResource { get; set; }
public ExtensionEnumDto()
{
Fields = new List<ExtensionEnumFieldDto>();
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionEnumFieldDto.cs

@ -5,7 +5,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending;
[Serializable]
public class ExtensionEnumFieldDto
{
public string Name { get; set; }
public string? Name { get; set; }
public object Value { get; set; }
public object? Value { get; set; }
}

7
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionPropertyAttributeDto.cs

@ -6,7 +6,12 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending;
[Serializable]
public class ExtensionPropertyAttributeDto
{
public string TypeSimple { get; set; }
public string TypeSimple { get; set; } = default!;
public Dictionary<string, object> Config { get; set; }
public ExtensionPropertyAttributeDto()
{
Config = new Dictionary<string, object>();
}
}

17
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionPropertyDto.cs

@ -7,12 +7,11 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending;
[Serializable]
public class ExtensionPropertyDto
{
public string Type { get; set; }
public string Type { get; set; } = default!;
public string TypeSimple { get; set; }
public string TypeSimple { get; set; } = default!;
[CanBeNull]
public LocalizableStringDto DisplayName { get; set; }
public LocalizableStringDto? DisplayName { get; set; }
public ExtensionPropertyApiDto Api { get; set; }
@ -22,5 +21,13 @@ public class ExtensionPropertyDto
public Dictionary<string, object> Configuration { get; set; }
public object DefaultValue { get; set; }
public object? DefaultValue { get; set; }
public ExtensionPropertyDto()
{
Api = new ExtensionPropertyApiDto();
Ui = new ExtensionPropertyUiDto();
Attributes = new List<ExtensionPropertyAttributeDto>();
Configuration = new Dictionary<string, object>();
}
}

8
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionPropertyUiDto.cs

@ -9,4 +9,12 @@ public class ExtensionPropertyUiDto
public ExtensionPropertyUiFormDto OnCreateForm { get; set; }
public ExtensionPropertyUiFormDto OnEditForm { get; set; }
public ExtensionPropertyUiLookupDto Lookup { get; set; }
public ExtensionPropertyUiDto()
{
OnTable = new ExtensionPropertyUiTableDto();
OnCreateForm = new ExtensionPropertyUiFormDto();
OnEditForm = new ExtensionPropertyUiFormDto();
Lookup = new ExtensionPropertyUiLookupDto();
}
}

10
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ExtensionPropertyUiLookupDto.cs

@ -5,9 +5,9 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending;
[Serializable]
public class ExtensionPropertyUiLookupDto
{
public string Url { get; set; }
public string ResultListPropertyName { get; set; }
public string DisplayPropertyName { get; set; }
public string ValuePropertyName { get; set; }
public string FilterParamName { get; set; }
public string Url { get; set; } = default!;
public string ResultListPropertyName { get; set; } = default!;
public string DisplayPropertyName { get; set; } = default!;
public string ValuePropertyName { get; set; } = default!;
public string FilterParamName { get; set; } = default!;
}

5
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/LocalizableStringDto.cs

@ -9,10 +9,9 @@ public class LocalizableStringDto
[NotNull]
public string Name { get; private set; }
[CanBeNull]
public string Resource { get; set; }
public string? Resource { get; set; }
public LocalizableStringDto([NotNull] string name, string resource = null)
public LocalizableStringDto([NotNull] string name, string? resource = null)
{
Name = Check.NotNullOrEmpty(name, nameof(name));
Resource = resource;

6
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ModuleExtensionDto.cs

@ -9,4 +9,10 @@ public class ModuleExtensionDto
public Dictionary<string, EntityExtensionDto> Entities { get; set; }
public Dictionary<string, object> Configuration { get; set; }
public ModuleExtensionDto()
{
Entities = new Dictionary<string, EntityExtensionDto>();
Configuration = new Dictionary<string, object>();
}
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/ObjectExtensionsDto.cs

@ -9,4 +9,10 @@ public class ObjectExtensionsDto
public Dictionary<string, ModuleExtensionDto> Modules { get; set; }
public Dictionary<string, ExtensionEnumDto> Enums { get; set; }
public ObjectExtensionsDto()
{
Modules = new Dictionary<string, ModuleExtensionDto>();
Enums = new Dictionary<string, ExtensionEnumDto>();
}
}

15
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/TimingDto.cs

@ -3,6 +3,11 @@
public class TimingDto
{
public TimeZone TimeZone { get; set; }
public TimingDto()
{
TimeZone = new TimeZone();
}
}
public class TimeZone
@ -10,14 +15,20 @@ public class TimeZone
public IanaTimeZone Iana { get; set; }
public WindowsTimeZone Windows { get; set; }
public TimeZone()
{
Iana = new IanaTimeZone();
Windows = new WindowsTimeZone();
}
}
public class WindowsTimeZone
{
public string TimeZoneId { get; set; }
public string? TimeZoneId { get; set; }
}
public class IanaTimeZone
{
public string TimeZoneName { get; set; }
public string? TimeZoneName { get; set; }
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/CurrentTenantDto.cs

@ -8,7 +8,7 @@ public class CurrentTenantDto
{
public Guid? Id { get; set; }
public string Name { get; set; }
public string? Name { get; set; }
public bool IsAvailable { get; set; }
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/FindTenantResultDto.cs

@ -9,7 +9,7 @@ public class FindTenantResultDto
public Guid? TenantId { get; set; }
public string Name { get; set; }
public string? Name { get; set; }
public bool IsActive { get; set; }
}

6
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs

@ -127,7 +127,7 @@ public class AbpApplicationConfigurationAppService : ApplicationService, IAbpApp
return new CurrentTenantDto()
{
Id = CurrentTenant.Id,
Name = CurrentTenant.Name,
Name = CurrentTenant.Name!,
IsAvailable = CurrentTenant.IsAvailable
};
}
@ -286,7 +286,7 @@ public class AbpApplicationConfigurationAppService : ApplicationService, IAbpApp
{
var result = new ApplicationSettingConfigurationDto
{
Values = new Dictionary<string, string>()
Values = new Dictionary<string, string?>()
};
var settingDefinitions = _settingDefinitionManager.GetAll().Where(x => x.IsVisibleToClients);
@ -356,7 +356,7 @@ public class AbpApplicationConfigurationAppService : ApplicationService, IAbpApp
{
return new ClockDto
{
Kind = Enum.GetName(typeof(DateTimeKind), _abpClockOptions.Kind)
Kind = Enum.GetName(typeof(DateTimeKind), _abpClockOptions.Kind)!
};
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs

@ -231,7 +231,7 @@ 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);
objectExtensionsDto.Enums[enumProperty.Type.FullName!] = CreateExtensionEnumDto(enumProperty);
}
}
@ -248,7 +248,7 @@ public class CachedObjectExtensionsDtoService : ICachedObjectExtensionsDtoServic
extensionEnumDto.Fields.Add(
new ExtensionEnumFieldDto
{
Name = enumProperty.Type.GetEnumName(enumValue),
Name = enumProperty.Type.GetEnumName(enumValue)!,
Value = enumValue
}
);

Loading…
Cancel
Save