예제 #1
0
        public ICollection <ShuffleNumber> ShuffleNumbersByShuffleType(int numberSetId, string shuffleIncludeType)
        {
            ShuffleIncludeType includeType = (ShuffleIncludeType)Enum.Parse(typeof(ShuffleIncludeType), shuffleIncludeType);
            var numberSet = _numberSetDomain.GetNumberSet(numberSetId);

            ICollection <ShuffleNumber> shuffleResult = new List <ShuffleNumber>();

            if (numberSet != null && numberSet.NumberSetNumbers != null && numberSet.NumberSetNumbers.Any())
            {
                switch (includeType)
                {
                case ShuffleIncludeType.All:
                {
                    shuffleResult = _shuffleDomain.ShuffleAllNumbers(numberSet.NumberSetNumbers);
                    break;
                }

                case ShuffleIncludeType.Selected:
                {
                    shuffleResult = _shuffleDomain.ShuffleSelectedNumbers(numberSet.NumberSetNumbers);
                    break;
                }

                default:
                {
                    break;
                }
                }
            }
            return(shuffleResult);
        }
예제 #2
0
 public NumberSet GetNumberSet(int numberSetId)
 {
     return(_numberSetDomain.GetNumberSet(numberSetId));
 }