Ywdsoft.Utility.ConfigHandler.ConfigDescriptionCache.SetConfigValueType C# (CSharp) Method

SetConfigValueType() private static method

设置默认项数值类型-根据属性类型进行转换
private static SetConfigValueType ( ConfigAttribute configAttr, Type propertyType ) : void
configAttr ConfigAttribute
propertyType System.Type 属性类型
return void
        private static void SetConfigValueType(ConfigAttribute configAttr,Type propertyType)
        {
            switch (propertyType.ToString()) {
                case "System.String":
                    configAttr.ValueType = ConfigValueType.String;
                    break;
                case "System.Boolean":
                    configAttr.ValueType = ConfigValueType.Bool;
                    break;
                case "System.Int32":
                case "System.Double":
                    configAttr.ValueType = ConfigValueType.Number;
                    break;
                default:
                    configAttr.ValueType = ConfigValueType.String;
                    break;
            }
        }