예제 #1
0
        public void LimitTime(RegulationType regulation, string userId, int amount)
        {
            var service = this.GetService(regulation) as ITimeLimitable;

            if (service != null)
            {
                service.LimitPerMonth(userId, amount);
            }
            else
            {
                Console.WriteLine($"Action restricted for this regulation ${regulation.ToString()}");
            }
        }
예제 #2
0
        public void SelfExclude(RegulationType regulation, string userId, int amount)
        {
            var service = this.GetService(regulation) as ISelfExcludable;

            if (service != null)
            {
                service.SelfExclude(userId, amount);
            }
            else
            {
                Console.WriteLine($"Action restricted for this regulation ${regulation.ToString()}");
            }
        }
예제 #3
0
        public void LimitBetAmount(RegulationType regulation, string userId, decimal amount)
        {
            var service = this.GetService(regulation) as IBettingLimitable;

            if (service != null)
            {
                service.LimitPerDay(userId, amount);
            }
            else
            {
                Console.WriteLine($"Action restricted for this regulation: {regulation.ToString()}");
            }
        }