Esempio n. 1
0
        public static CasinoItem CreateInstance(CasinoType itemType)
        {
            CasinoItem item;

            switch (itemType)
            {
            case CasinoType.SingleChoice:
                item = new SingleChoice {
                    ItemType = CasinoType.SingleChoice
                };
                break;

            case CasinoType.MatchResult:
                item = new MatchResult {
                    ItemType = CasinoType.MatchResult
                };
                break;

            default:
                throw new Exception("Unknown Casino Item Type.");
            }

            return(item);
        }
Esempio n. 2
0
        public static CasinoItem CreateInstance(CasinoType itemType)
        {
            CasinoItem item;

            switch (itemType)
            {
                case CasinoType.SingleChoice:
                    item = new SingleChoice { ItemType = CasinoType.SingleChoice };
                    break;
                case CasinoType.MatchResult:
                    item = new MatchResult { ItemType = CasinoType.MatchResult };
                    break;
                default:
                    throw new Exception("Unknown Casino Item Type.");
            }

            return item;
        }