private static void ConfigSavePropertyAnalysis(Object target, PropertyInfo prop)
        {
            var configTag = TypeInfoProvider.GetConfigTag(prop);

            if (configTag != null)
            {
                Object value = TypeInfoProvider.GetValue(prop, target);
                if (configTag.IsEncrypted && value != null && prop.PropertyType == typeof(String))
                {
                    String strValue = value as String;
                    strValue = DefaultStringEncryptor.Encrypt(strValue);
                    TypeInfoProvider.SetValue(prop, target, strValue);
                    return;
                }
                if (prop.PropertyType.IsSubclassOf(typeof(ConfigBase)))
                {
                    Object valueCopy = TypeInfoProvider.CreateInstance(prop.PropertyType);
                    CopyConfigObject(value, valueCopy, prop.PropertyType);
                    TypeInfoProvider.SetValue(prop, target, valueCopy);
                    Type type          = prop.PropertyType;
                    var  propertyInfos = TypeInfoProvider.GetProperties(type);
                    foreach (var cprop in propertyInfos)
                    {
                        ConfigSavePropertyAnalysis(valueCopy, cprop);
                    }
                }
            }
        }
        public static void LoadConfigToObject(Object obj, Type type, String filePath, Boolean isEncrypted = false)
        {
            Object target = null;

            var text = File.ReadAllText(filePath, _DefaultEncodeing);

            if (isEncrypted)
            {
                text = DefaultStringEncryptor.Decrypt(text);
            }
            target = SerializeAssistor.Deserialize(text, type);

            var propertyInfos = TypeInfoProvider.GetProperties(type);

            foreach (var prop in propertyInfos)
            {
                ConfigLoadPropertyAnalysis(target, prop);
            }
            CopyConfigObject(target, obj, type);
        }
        /// <summary>
        /// 将配置对象保存到指定路径
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="savePath">保存路径  </param>
        /// <param name="isEncrypt">表示是否需要加密</param>
        public static void SaveConfig(Object obj, Type type, String savePath, Boolean isEncrypt = false)
        {
            Object target      = obj;
            Object cloneTarget = Activator.CreateInstance(type);

            CopyConfigObject(target, cloneTarget, type);

            var propertyInfos = TypeInfoProvider.GetProperties(type);

            foreach (var prop in propertyInfos)
            {
                ConfigSavePropertyAnalysis(cloneTarget, prop);
            }

            var text = SerializeAssistor.Serialize(cloneTarget, type);

            if (isEncrypt)
            {
                text = DefaultStringEncryptor.Decrypt(text);
            }
            File.WriteAllText(savePath, text, _DefaultEncodeing);
        }