Пример #1
0
 public void FileNotInFolder()
 {
     var file = new FileWithPosition(@"C:\Progra~1\someprogram1\somelog.txt");
     Assert.That(!file.FileNameInFolder(@"C:\Program Files\someprogram\"));
     Assert.That(!file.FileNameInFolder(@"C:\Progra~1\someprogram\"));
     var file2 = new FileWithPosition(@"C:\Program Files\someprogram1\somelog.txt");
     Assert.That(!file2.FileNameInFolder(@"C:\Program Files\someprogram\"));
     Assert.That(!file2.FileNameInFolder(@"C:\Progra~1\someprogram\"));
 }
Пример #2
0
 public LogFileReaderBase(FileWithPosition file, LogEntryParser parser = null, IInvoker invoker = null)
 {
     this.File = file;
     this.parser = parser ?? new LogEntryParser();
     this.invoker = invoker ?? new DirectInvoker();
 }
Пример #3
0
 public Watcher(FileWithPosition file, LogEntryParser parser = null, IInvoker invoker = null)
     : base(file,parser,invoker)
 {
 }
Пример #4
0
 public Poller(FileWithPosition file, long duration, LogEntryParser parser = null, IInvoker invoker = null)
     : base(file,parser,invoker)
 {
     this.duration = duration;
 }
Пример #5
0
 public void FileNameMatch()
 {
     var file = new FileWithPosition(@"C:\Progra~1\someprogram\somelog.txt");
     Assert.That(file.FileNameMatch(@"C:\Program Files\someprogram\somelog.txt"));
 }