示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MirrorFreezeCopyService"/> class.
 /// </summary>
 public MirrorFreezeCopyService()
 {
     this.watcherConfig        = new WatcherConfig();
     this.watcherConfigService = new WatcherConfigService(this.watcherConfig);
     this.Precheck();
     this.retryOption                  = this.watcherConfigService.GetRetryOptionFromXMLFile(ConfigFilePath);
     this.listWatcher                  = this.watcherConfigService.PopulateWatchersFromXMLFile(ConfigFilePath);
     this.listWatcherExecute           = new List <WatcherExecute>();
     this.listWindowsFileSystemWatcher = new List <WindowsFileSystemWatcher>();
 }
        private void Configurate()
        {
            this.config = WatcherConfig.Load();
            this.logger = WatcherLogger.Load();

            this.HandleConfig();
            this.ConfigurateLogger();

            this.ConfigurateFileSystemWatcher();

            this.logger.Write(this.config, this.logger);

            BclResource.Culture = this.config.CultureInfo;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="WatcherConfigService"/> class.
 /// </summary>
 /// <param name="watcherConfig"> IWatcherConfig</param>
 public WatcherConfigService(IWatcherConfig watcherConfig)
 {
     this.watcherConfig = watcherConfig;
 }