零度框架升级到 Aspire 13.0 版本

This commit is contained in:
administrator committed 2025-12-16 22:26:14 +08:00
1 parent 41f6c147d5
commit b11ba4f6a5
50 files changed
+336 -446

No files matched your search

@@ -12,12 +12,12 @@ namespace HelloShop.DistributedLock.Dapr
{
expiryInSeconds = expiryInSeconds == default ? 60 : expiryInSeconds;
// The CallerMemberNameAttribute is used to get the name of the calling method.
string? lockOwner = new StackTrace().GetFrame(1)?.GetMethod()?.DeclaringType?.Name;
lockOwner ??= Guid.NewGuid().ToString();
#pragma warning disable CS0618
#pragma warning disable DAPR_DISTRIBUTEDLOCK // 类型仅用于评估,在将来的更新中可能会被更改或删除。取消此诊断以继续。
TryLockResponse response = await daprClient.Lock("lockstore", resourceId, lockOwner, expiryInSeconds, cancellationToken);
#pragma warning restore CS0618
#pragma warning restore DAPR_DISTRIBUTEDLOCK // 类型仅用于评估,在将来的更新中可能会被更改或删除。取消此诊断以继续。
return new DaprDistributedLockResult(response);
}