Example #1
0
        public void Initialize(PathConfiguration pathConfiguration)
        {
            if (pathConfiguration == null)
            {
                throw new ArgumentNullException(nameof(pathConfiguration));
            }

            this.LogFilePath                 = this.pathTransformer.MakeAbsolute(pathConfiguration.LogFilePath);
            this.SyncthingBackupPath         = this.pathTransformer.MakeAbsolute("syncthing.exe");
            this.ConfigurationFilePath       = this.pathTransformer.MakeAbsolute(pathConfiguration.ConfigurationFilePath);
            this.ConfigurationFileBackupPath = this.pathTransformer.MakeAbsolute(pathConfiguration.ConfigurationFileBackupPath);
            this.CefCachePath                = this.pathTransformer.MakeAbsolute(pathConfiguration.CefCachePath);
            this.UpdatesDownloadPath         = Path.Combine(Path.GetTempPath(), "SyncTrayzor");
            this.InstallCountFilePath        = this.pathTransformer.MakeAbsolute("InstallCount.txt");
            this.DefaultSyncthingPath        = String.IsNullOrWhiteSpace(pathConfiguration.SyncthingPath) ?
                                               null :
                                               this.pathTransformer.MakeAbsolute(pathConfiguration.SyncthingPath);
            this.DefaultSyncthingHomePath = String.IsNullOrWhiteSpace(pathConfiguration.SyncthingHomePath) ?
                                            null :
                                            this.pathTransformer.MakeAbsolute(pathConfiguration.SyncthingHomePath);
            this.UnexpandedDefaultSyncthingPath = pathConfiguration.SyncthingPath;

            logger.Debug("LogFilePath: {0}", this.LogFilePath);
            logger.Debug("SyncthingBackupPath: {0}", this.SyncthingBackupPath);
            logger.Debug("ConfigurationFilePath: {0}", this.ConfigurationFilePath);
            logger.Debug("ConfigurationFileBackupPath: {0}", this.ConfigurationFileBackupPath);
            logger.Debug("CefCachePath: {0}", this.CefCachePath);
            logger.Debug("DefaultSyncthingPath: {0}", this.DefaultSyncthingPath);
            logger.Debug("DefaultSyncthingHomePath: {0}", this.DefaultSyncthingHomePath);
        }
        public void Initialize(PathConfiguration pathConfiguration)
        {
            if (pathConfiguration == null)
                throw new ArgumentNullException("pathConfiguration");

            this.pathConfiguration = pathConfiguration;

            logger.Debug("ExePath: {0}", this.ExePath);
            logger.Debug("LogFilePath: {0}", this.LogFilePath);
            logger.Debug("SyncthingBackupPath: {0}", this.SyncthingBackupPath);
            logger.Debug("ConfigurationFilePath: {0}", this.ConfigurationFilePath);
            logger.Debug("ConfigurationFileBackupPath: {0}", this.ConfigurationFileBackupPath);
            logger.Debug("CefCachePath: {0}", this.CefCachePath);
        }