Esempio n. 1
0
 public static AuctionLot Create(IAuctionLot src)
 {
     return(new AuctionLot
     {
         AssetId = src.AssetId,
         ClientId = src.ClientId,
         Date = src.Date,
         Price = src.Price,
         Volume = src.Volume
     });
 }
        public void Add(IAuctionLot lot)
        {
            _lockSlim.EnterWriteLock();

            try
            {
                _lots.Add(lot);
            }
            finally
            {
                _lockSlim.ExitWriteLock();
            }
        }
 public static AuctionLotEntity Create(IAuctionLot src)
 {
     return(new AuctionLotEntity
     {
         PartitionKey = GeneratePartitionKey(src.ClientId),
         RowKey = GenerateRowKey(src.Date),
         AssetId = src.AssetId,
         ClientId = src.ClientId,
         Date = src.Date,
         Price = src.Price,
         Volume = src.Volume
     });
 }
 public async Task AddAsync(IAuctionLot lot)
 {
     await _tableStorage.InsertOrReplaceAsync(AuctionLotEntity.Create(lot));
 }