示例#1
0
        public void Update(IPreferenceSet prefs)
        {
            var clientRetrievalTask = new ClientRetrievalTask
            {
                Enabled        = SyncOnSchedule,
                Interval       = SyncTimeMinutes,
                ProcessingMode = SyncOnLoad ? ProcessingMode.Serial : ProcessingMode.Parallel
            };

            prefs.Set(Preference.ClientRetrievalTask, clientRetrievalTask);
            prefs.Set(Preference.AllowRunningAsync, AllowRunningAsync);

            var webGenerationTask = new WebGenerationTask
            {
                Enabled              = GenerateWeb,
                Interval             = GenerateInterval,
                AfterClientRetrieval = WebGenAfterRefresh
            };

            prefs.Set(Preference.WebGenerationTask, webGenerationTask);

            prefs.Set(Preference.WebDeploymentType, WebGenType);
            if (WebGenType == WebDeploymentType.Ftp)
            {
                prefs.Set(Preference.WebDeploymentRoot, FileSystemPath.AddUnixTrailingSlash(WebRoot));
            }
            else
            {
                prefs.Set(Preference.WebDeploymentRoot, FileSystemPath.AddTrailingSlash(WebRoot));
            }
            prefs.Set(Preference.WebGenServer, WebGenServer);
            prefs.Set(Preference.WebGenPort, WebGenPort);
            prefs.Set(Preference.WebGenUsername, WebGenUsername);
            prefs.Set(Preference.WebGenPassword, WebGenPassword);
            prefs.Set(Preference.WebGenCopyHtml, CopyHtml);
            prefs.Set(Preference.WebGenCopyXml, CopyXml);
            prefs.Set(Preference.WebGenCopyFAHlog, CopyFAHlog);
            prefs.Set(Preference.WebGenFtpMode, FtpMode);
            prefs.Set(Preference.WebGenLimitLogSize, LimitLogSize);
            prefs.Set(Preference.WebGenLimitLogSizeLength, LimitLogSizeLength);
        }