public void PlaceBid(decimal bid, int clientId, string clientIP, AuctionhouseService ahService) { if (AuctionStatus == 0) { AuctionStatus = 1; Gavel gavel = new Gavel(this, ahService); this.Gavel = gavel; Thread gavelThread = new Thread(gavel.Start); gavelThread.Start(); } else { this.Gavel.ResetGavel(); } Bid b = new Bid(bid, DateTime.Now, clientId); lock (bidLock) { CurrentBidIp = clientIP; LastBid = CurrentBid; CurrentBid = b; } }
public AuctionhouseServer(int port) { this.port = port; ahService = new AuctionhouseService(this); }
} // 0=ended, 1= running public Gavel(Product product, AuctionhouseService ahService) { this.product = product; this.ahService = ahService; this.GavelStatus = 0; }