public async Task ResetJsonPageLockAsync() { var pk = LockEntity.GeneratePartitionKey(); await _tableStorage.InsertOrMergeAsync(new LockEntity { PartitionKey = pk, RowKey = JsonLockKey, DateTime = new DateTime(1601, 1, 1), //Storage Azure can't store less ETag = "*" }); }
public async Task SetJsonPageLockAsync(string userEmail, string userName, string ipAddress) { var pk = LockEntity.GeneratePartitionKey(); await _tableStorage.InsertOrMergeAsync(new LockEntity { PartitionKey = pk, RowKey = JsonLockKey, UserEmail = userEmail, DateTime = DateTime.UtcNow, UserName = userName, IpAddress = ipAddress, ETag = "*" }); }
public async Task <ILockEntity> GetJsonPageLockAsync() { var pk = LockEntity.GeneratePartitionKey(); return(await _tableStorage.GetDataAsync(pk, JsonLockKey)); }