예제 #1
0
        public ABTestingItemTO GetTO()
        {
            var result = new ABTestingItemTO();

            result.attachItem = this.attachItem.GetTO();

            result.userId = new List <LongConditionTO>();
            foreach (var item in this.userId)
            {
                result.userId.Add(item.GetTO());
            }

            result.userGender = new List <EnumConditionTO>();
            foreach (var item in this.userGender)
            {
                result.userGender.Add(item.GetTO());
            }

            result.userBirthYear = new List <IntConditionTO>();
            foreach (var item in this.userBirthYear)
            {
                result.userBirthYear.Add(item.GetTO());
            }

            result.prefsInt = new List <IntPrefsTO>();
            foreach (var item in this.prefsInt)
            {
                result.prefsInt.Add(item.GetTO());
            }

            result.prefsFloat = new List <FloatPrefsTO>();
            foreach (var item in this.prefsFloat)
            {
                result.prefsFloat.Add(item.GetTO());
            }

                        #if UNITY_EDITOR
            result.comment = this.comment;
                        #endif

            return(result);
        }
예제 #2
0
        public ABTestingItem(ABTestingItemTO source)
        {
            this.attachItem = new AttachItem(source.attachItem);

            this.userId = new List <LongCondition>();
            foreach (var item in source.userId)
            {
                this.userId.Add(new LongCondition(item));
            }

            this.userGender = new List <EnumCondition>();
            foreach (var item in source.userGender)
            {
                this.userGender.Add(new EnumCondition(item));
            }

            this.userBirthYear = new List <IntCondition>();
            foreach (var item in source.userBirthYear)
            {
                this.userBirthYear.Add(new IntCondition(item));
            }

            this.prefsInt = new List <IntPrefs>();
            foreach (var item in source.prefsInt)
            {
                this.prefsInt.Add(new IntPrefs(item));
            }

            this.prefsFloat = new List <FloatPrefs>();
            foreach (var item in source.prefsFloat)
            {
                this.prefsFloat.Add(new FloatPrefs(item));
            }

                        #if UNITY_EDITOR
            this.comment = source.comment;
                        #endif
        }