예제 #1
0
        public void AddOdd(Betting betting, int quantity)
        {
            CardLine line = lineCollection.Where(b => b.Betting == betting)
                            .FirstOrDefault();

            if (line == null)
            {
                lineCollection.Add(
                    new CardLine {
                    Betting = betting, Quantity = quantity
                });
            }
            else
            {
                line.Quantity += quantity;
            }
        }
예제 #2
0
 public void RemoveOdd(Betting betting)
 {
     lineCollection.RemoveAll(b => b.Betting == betting);
 }