Browse Source

Enable nullable annotations for Volo.Abp.AspNetCore.Components.WebAssembly.Theming

pull/17062/head
liangshiwei 3 years ago
parent
commit
630cc0bf3b
  1. 2
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj
  2. 4
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Microsoft/Extensions/DependencyInjection/EmptyWebAssemblyHostEnvironment.cs
  3. 4
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ApplicationConfigurationCache.cs
  4. 2
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyCurrentTenantAccessor.cs

2
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj

@ -5,6 +5,8 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
</PropertyGroup>
<ItemGroup>

4
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Microsoft/Extensions/DependencyInjection/EmptyWebAssemblyHostEnvironment.cs

@ -4,7 +4,7 @@ namespace Microsoft.Extensions.DependencyInjection;
public class EmptyWebAssemblyHostEnvironment : IWebAssemblyHostEnvironment
{
public string Environment { get; set; }
public string Environment { get; set; } = default!;
public string BaseAddress { get; set; }
public string BaseAddress { get; set; } = default!;
}

4
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ApplicationConfigurationCache.cs

@ -5,9 +5,9 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly;
public class ApplicationConfigurationCache : ISingletonDependency
{
protected ApplicationConfigurationDto Configuration { get; set; }
protected ApplicationConfigurationDto? Configuration { get; set; }
public virtual ApplicationConfigurationDto Get()
public virtual ApplicationConfigurationDto? Get()
{
return Configuration;
}

2
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyCurrentTenantAccessor.cs

@ -6,5 +6,5 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly;
[Dependency(ReplaceServices = true)]
public class WebAssemblyCurrentTenantAccessor : ICurrentTenantAccessor, ISingletonDependency
{
public BasicTenantInfo Current { get; set; }
public BasicTenantInfo? Current { get; set; }
}

Loading…
Cancel
Save