Пример #1
0
        /// <summary>
        /// <see cref="SchoolFinder.SchoolTypes"/> => <see cref="SchoolMeal.SchoolType"/> 변환 메소드
        /// </summary>
        /// <param name="type">변환할 값</param>
        /// <returns>변환된 값</returns>
        public static SchoolMeal.SchoolType ConvertSchoolTypes(SchoolFinder.SchoolTypes type)
        {
            SchoolMeal.SchoolType result = SchoolMeal.SchoolType.Elementary;
            switch (type)
            {
            case SchoolFinder.SchoolTypes.Elementary:
                result = SchoolMeal.SchoolType.Elementary;
                break;

            case SchoolFinder.SchoolTypes.Middle:
                result = SchoolMeal.SchoolType.Middle;
                break;

            case SchoolFinder.SchoolTypes.High:
                result = SchoolMeal.SchoolType.High;
                break;

            default:
                break;
            }
            return(result);
        }
Пример #2
0
        /// <summary>
        /// <see cref="SchoolConfigQuery.SchoolTypes"/> => <see cref="SchoolFinder.SchoolTypes"/> 변환 메소드
        /// </summary>
        /// <param name="type">변환할 값</param>
        /// <returns>변환된 값</returns>
        public static SchoolFinder.SchoolTypes ConvertSchoolTypes(SchoolConfigQuery.SchoolTypes type)
        {
            SchoolFinder.SchoolTypes result = SchoolFinder.SchoolTypes.Elementary;
            switch (type)
            {
            case SchoolConfigQuery.SchoolTypes.초등학교:
                result = SchoolFinder.SchoolTypes.Elementary;
                break;

            case SchoolConfigQuery.SchoolTypes.중학교:
                result = SchoolFinder.SchoolTypes.Middle;
                break;

            case SchoolConfigQuery.SchoolTypes.고등학교:
                result = SchoolFinder.SchoolTypes.High;
                break;

            default:
                break;
            }

            return(result);
        }