Ejemplo n.º 1
0
        public async Task <bool> AcquireLock(string key)
        {
            if (await _hashTable.Exists(key))
            {
                return(false);
            }

            await _hashTable.Set(key, DateTime.UtcNow);

            return(true);
        }
Ejemplo n.º 2
0
 public async Task SetShipAsync(Ship ship)
 {
     try
     {
         await _table.Set(ship.Id, ship);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }