Skip to content

Releases: f1x3d/DistributedLeaseManager

2.0.0

07 Sep 20:20
82b7410
Compare
Choose a tag to compare

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

  1. 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));
  2. 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

29 Aug 18:20
1472e1e
Compare
Choose a tag to compare

What's Changed

DistributedLeaseManager.AzureCosmosDb

  • Updated to allow specifying Cosmos Db partition key path by @andrewdmoreno in #6

New Contributors

Full Changelog: releases/1.0.0...releases/1.1.0

1.0.0

21 Oct 14:26
17c9bf2
Compare
Choose a tag to compare
releases/1.0.0

Add the CI pipeline (#4)