Exemplo n.º 1
0
        public object Create(NewAuctionCommand command)
        {
            var newAuction = new Auction()
                                 {
                                     Id = _auctions.Count + 1,
                                     Title = command.Title,
                                     Description = command.Description,
                                     MinBid = command.MinBid
                                 };

            _auctions.Add(newAuction);

            TraderHubUtil.BroadcastNewAuction(newAuction);

            return new object();
        }
Exemplo n.º 2
0
 public static void BroadcastNewAuction(Auction auction)
 {
     var hub = GetHubContext();
     hub.Clients.newAuction(auction);
 }
Exemplo n.º 3
0
 public static void BroadcastBidPlacedFor(Auction auction)
 {
     var hub = GetHubContext();
      hub.Clients.bidPlaced(new { auction.Id, auction.HighestBid, auction.Bids, NewBid = true });
 }