Browse Source

Enable nullable annotations for Volo.Abp.DistributedLocking.Dapr

pull/17303/head
liangshiwei 3 years ago
parent
commit
3e3d6402da
  1. 2
      framework/src/Volo.Abp.DistributedLocking.Dapr/Volo.Abp.DistributedLocking.Dapr.csproj
  2. 2
      framework/src/Volo.Abp.DistributedLocking.Dapr/Volo/Abp/DistributedLocking/Dapr/AbpDistributedLockDaprOptions.cs
  3. 2
      framework/src/Volo.Abp.DistributedLocking.Dapr/Volo/Abp/DistributedLocking/Dapr/DaprAbpDistributedLock.cs

2
framework/src/Volo.Abp.DistributedLocking.Dapr/Volo.Abp.DistributedLocking.Dapr.csproj

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

2
framework/src/Volo.Abp.DistributedLocking.Dapr/Volo/Abp/DistributedLocking/Dapr/AbpDistributedLockDaprOptions.cs

@ -4,7 +4,7 @@ namespace Volo.Abp.DistributedLocking.Dapr;
public class AbpDistributedLockDaprOptions public class AbpDistributedLockDaprOptions
{ {
public string StoreName { get; set; } public string StoreName { get; set; } = default!;
public string? Owner { get; set; } public string? Owner { get; set; }

2
framework/src/Volo.Abp.DistributedLocking.Dapr/Volo/Abp/DistributedLocking/Dapr/DaprAbpDistributedLock.cs

@ -24,7 +24,7 @@ public class DaprAbpDistributedLock : IAbpDistributedLock, ITransientDependency
DistributedLockDaprOptions = distributedLockDaprOptions.Value; DistributedLockDaprOptions = distributedLockDaprOptions.Value;
} }
public async Task<IAbpDistributedLockHandle> TryAcquireAsync( public async Task<IAbpDistributedLockHandle?> TryAcquireAsync(
string name, string name,
TimeSpan timeout = default, TimeSpan timeout = default,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)

Loading…
Cancel
Save