Releases: f1x3d/DistributedLeaseManager
Releases · f1x3d/DistributedLeaseManager
2.0.0
Breaking Changes
The lease ResourceId
is now of type string
instead of Guid
:
public interface IDistributedLeaseManager
{
- Task<IDistributedLeaseAcquisitionResult> TryAcquireLease(Guid resourceId, TimeSpan duration);
+ Task<IDistributedLeaseAcquisitionResult> TryAcquireLease(string resourceId, TimeSpan duration);
- Task<IDistributedLeaseAcquisitionResult> TryAcquireLease(string resourceCategory, Guid resourceId, TimeSpan duration);
+ Task<IDistributedLeaseAcquisitionResult> TryAcquireLease(string resourceCategory, string resourceId, TimeSpan duration);
}
Migration Steps from v1
-
Use a string representation of your GUID lease identifiers:
var resourceId = Guid.NewGuid(); -await using var leaseResult = await leaseManager.TryAcquireLease(resourceId, TimeSpan.FromSeconds(5)); +await using var leaseResult = await leaseManager.TryAcquireLease(resourceId.ToString(), TimeSpan.FromSeconds(5));
-
For
DistributedLeaseManager.EntityFrameworkCore
users, generate and apply a new migration to change the database column type
What's Changed
- Update ResourceId property of DistributedLease to support string IDs by @andrewdmoreno in #8
Full Changelog: releases/1.1.0...releases/2.0.0
1.1.0
What's Changed
DistributedLeaseManager.AzureCosmosDb
- Updated to allow specifying Cosmos Db partition key path by @andrewdmoreno in #6
New Contributors
- @andrewdmoreno made their first contribution in #6
Full Changelog: releases/1.0.0...releases/1.1.0
1.0.0
releases/1.0.0 Add the CI pipeline (#4)