diff --git a/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo.Abp.DistributedLocking.Abstractions.csproj b/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo.Abp.DistributedLocking.Abstractions.csproj index 7e01d295e7..e53f5b718c 100644 --- a/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo.Abp.DistributedLocking.Abstractions.csproj +++ b/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo.Abp.DistributedLocking.Abstractions.csproj @@ -5,6 +5,8 @@ netstandard2.0;netstandard2.1;net7.0 + enable + Nullable Volo.Abp.DistributedLocking.Abstractions Volo.Abp.DistributedLocking.Abstractions $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/IAbpDistributedLock.cs b/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/IAbpDistributedLock.cs index 754ae807f8..1d1b5e01db 100644 --- a/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/IAbpDistributedLock.cs +++ b/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/IAbpDistributedLock.cs @@ -16,8 +16,7 @@ public interface IAbpDistributedLock /// The name of the lock /// How long to wait before giving up on the acquisition attempt. Defaults to 0 /// Cancellation token - [ItemCanBeNull] - Task TryAcquireAsync( + Task TryAcquireAsync( [NotNull] string name, TimeSpan timeout = default, CancellationToken cancellationToken = default diff --git a/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/LocalAbpDistributedLock.cs b/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/LocalAbpDistributedLock.cs index 490f024d36..58d67e1caf 100644 --- a/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/LocalAbpDistributedLock.cs +++ b/framework/src/Volo.Abp.DistributedLocking.Abstractions/Volo/Abp/DistributedLocking/LocalAbpDistributedLock.cs @@ -22,7 +22,7 @@ public class LocalAbpDistributedLock : IAbpDistributedLock, ISingletonDependency } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public async Task TryAcquireAsync( + public async Task TryAcquireAsync( string name, TimeSpan timeout = default, CancellationToken cancellationToken = default)