Example #1
0
        public static TypeKind_DTO MapToSerializationModel(this TypeKindBaseDTO typeKind)
        {
            switch (typeKind)
            {
            case TypeKindBaseDTO.ClassType:
                return(TypeKind_DTO.ClassType);

            case TypeKindBaseDTO.EnumType:
                return(TypeKind_DTO.EnumType);

            case TypeKindBaseDTO.InterfaceType:
                return(TypeKind_DTO.InterfaceType);

            case TypeKindBaseDTO.StructType:
                return(TypeKind_DTO.StructType);
            }
            throw new Exception();
        }
Example #2
0
        public static TypeKind MapToObject(this TypeKindBaseDTO typeKind)
        {
            switch (typeKind)
            {
            case TypeKindBaseDTO.ClassType:
                return(TypeKind.ClassType);

            case TypeKindBaseDTO.EnumType:
                return(TypeKind.EnumType);

            case TypeKindBaseDTO.InterfaceType:
                return(TypeKind.InterfaceType);

            case TypeKindBaseDTO.StructType:
                return(TypeKind.StructType);
            }
            throw new Exception();
        }