Пример #1
0
 public BetedPair BetedPair(BetablePair betablePair, BetingType type)
 {
     return(new BetedPair
     {
         BetablePair = betablePair,
         BetablePairId = betablePair.Id,
         BetedType = type
     });
 }
Пример #2
0
        public static decimal GetQuotaForType(this BetablePair pair, BetingType type)
        {
            switch (type)
            {
            case BetingType.Team1Win: return(pair.Team1WinQuota);

            case BetingType.Team2Win: return(pair.Team2WinQuota);

            case BetingType.Draw: return(pair.DrawQuota);

            default: throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }