Пример #1
0
        /// <summary>
        /// 初始化Cos
        /// </summary>
        private static void InitCos()
        {
            enableCos = MMPU.读取exe默认配置文件("EnableCos", "0");
            InfoLog.InfoPrintf($"配置文件初始化任务[EnableCos]:{enableCos}", InfoLog.InfoClass.Debug);
            if (enableCos != "0")
            {
                UploadOrderTemp.Add(int.Parse(enableCos), "Cos");
                CheckEnableUpload = true;
                InfoLog.InfoPrintf($"已检测到Cos上传任务,上传顺序为{enableCos}", InfoLog.InfoClass.必要提示);

                cosSecretId = MMPU.读取exe默认配置文件("CosSecretId", "");
                InfoLog.InfoPrintf($"配置文件初始化任务[CosSecretId]:敏感信息,隐藏内容,信息长度:{cosSecretId.Length}", InfoLog.InfoClass.Debug);

                cosSecretKey = MMPU.读取exe默认配置文件("CosSecretKey", "");
                InfoLog.InfoPrintf($"配置文件初始化任务[CosSecretKey]:敏感信息,隐藏内容,信息长度:{cosSecretKey.Length}", InfoLog.InfoClass.Debug);

                cosRegion = MMPU.读取exe默认配置文件("CosRegion", "");
                InfoLog.InfoPrintf($"配置文件初始化任务[CosRegion]:{cosRegion}", InfoLog.InfoClass.Debug);

                cosBucket = MMPU.读取exe默认配置文件("CosBucket", "");
                InfoLog.InfoPrintf($"配置文件初始化任务[CosBucket]:{cosBucket}", InfoLog.InfoClass.Debug);

                cosPath = MMPU.读取exe默认配置文件("CosPath", "/");
                MMPU.CheckPath(ref cosPath);
                InfoLog.InfoPrintf($"配置文件初始化任务[CosPath]:{cosPath}", InfoLog.InfoClass.Debug);
            }
        }
Пример #2
0
        /// <summary>
        /// 初始化OneDrive
        /// </summary>
        private static void InitOneDrive()
        {
            enableOneDrive = MMPU.读取exe默认配置文件("EnableOneDrive", "0");
            InfoLog.InfoPrintf($"配置文件初始化任务[EnableOneDrive]:{enableOneDrive}", InfoLog.InfoClass.Debug);
            if (enableOneDrive != "0")
            {
                UploadOrderTemp.Add(int.Parse(enableOneDrive), "OneDrive");
                CheckEnableUpload = true;
                InfoLog.InfoPrintf($"已检测到OneDrive上传任务,上传顺序为{enableOneDrive}", InfoLog.InfoClass.必要提示);

                oneDriveConfig = MMPU.读取exe默认配置文件("OneDriveConfig", "");
                InfoLog.InfoPrintf($"配置文件初始化任务[oneDriveConfig]:{oneDriveConfig}", InfoLog.InfoClass.Debug);
                oneDrivePath = MMPU.读取exe默认配置文件("OneDrivePath", "/");
                MMPU.CheckPath(ref oneDrivePath);
                InfoLog.InfoPrintf($"配置文件初始化任务[oneDrivePath]:{oneDrivePath}", InfoLog.InfoClass.Debug);
            }
        }