Contains configuration parameters for the LazyCopyDriver.
        /// <summary>
        /// Creates driver configuration based on the current settings.
        /// </summary>
        /// <returns>Driver configuration.</returns>
        private static DriverConfiguration GetConfiguration()
        {
            DriverConfiguration configuration = new DriverConfiguration
            {
                ReportRate    = Settings.Default.ReportRate,
                OperationMode = OperationMode.FetchEnabled
            };

            return(configuration);
        }
        /// <summary>
        /// Updates the driver configuration using the current settings.
        /// </summary>
        public void ConfigureDriver()
        {
            lock (this.syncRoot)
            {
                LazyCopyDriver.Logger.Debug("Configuring driver...");
                DriverConfiguration configuration = LazyCopyDriver.GetConfiguration();

                LazyCopyDriver.Logger.Debug("Updating driver settings...");

                this.driverClient.SetWatchPaths(configuration.WatchPaths.ToArray());
                this.driverClient.SetReportRate(configuration.ReportRate);
                this.driverClient.SetOperationStatus(configuration.OperationMode);

                LazyCopyDriver.Logger.Debug("Finished configuring driver.");
            }
        }
Example #3
0
        /// <summary>
        /// Creates driver configuration based on the current settings.
        /// </summary>
        /// <returns>Driver configuration.</returns>
        private static DriverConfiguration GetConfiguration()
        {
            DriverConfiguration configuration = new DriverConfiguration
            {
                ReportRate    = Settings.Default.ReportRate,
                OperationMode = OperationMode.FetchEnabled
            };

            return configuration;
        }