示例#1
0
 public Logger()                                                                                                               
 {
     var optionsManager = new OptionsManager(AppDomain.CurrentDomain.BaseDirectory);
     configOptions = optionsManager.GetOptions<Options>();
     path = configOptions.PathToDirectory.SourceDirectory;
     watcher = new FileSystemWatcher(path);
     watcher.NotifyFilter = NotifyFilters.LastAccess
         | NotifyFilters.LastWrite
         | NotifyFilters.FileName
         | NotifyFilters.DirectoryName;
     watcher.Filter = "*.txt";
     watcher.Created += Watcher_Created;
 }