CheckFile() public méthode

Checks the filename for valid regex.
public CheckFile ( string name, string &reason ) : bool
name string /// The file name ///
reason string /// Is set to the reason if true is returned. ///
Résultat bool
 public void AllowCorrectEventsTest()
 {
     var filter = new IgnoredFileNamesFilter();
     string reason;
     Assert.That(filter.CheckFile("testfile", out reason), Is.False);
     Assert.That(string.IsNullOrEmpty(reason), Is.True);
 }
 public void DefaultConstrutorAddsRequiredFilter()
 {
     var filter = new IgnoredFileNamesFilter();
     string reason;
     Assert.That(filter.CheckFile("bla.sync", out reason), Is.True);
     Assert.That(reason, Is.Not.Null);
 }
 public void HandleIgnoredFileNamesTest()
 {
     List<string> wildcards = new List<string>();
     wildcards.Add("*~");
     var filter = new IgnoredFileNamesFilter { Wildcards = wildcards };
     string reason;
     Assert.That(filter.CheckFile("file~", out reason), Is.True);
     Assert.That(string.IsNullOrEmpty(reason), Is.False);
 }