static RemoteApplication() { string location = Assembly.GetExecutingAssembly().Location; string directory = Path.GetDirectoryName(location); if (Directory.Exists(directory)) { FileMatcher = FileMatcher.ReadFromFile(directory.AppendPath(FileMatcher.File)); } else { FileMatcher = FileMatcher.ReadFromFile(FileMatcher.File); } }
public static FileMatcher ReadFromFile(string file) { var system = new FileSystem(); var matcher = new FileMatcher(); system.ReadTextFile(file, text => { if (text.IsEmpty()) return; var match = Build(text); matcher.Add(match); }); return matcher; }
public static FileMatcher ReadFromFile(string file) { var system = new FileSystem(); var matcher = new FileMatcher(); system.ReadTextFile(file, text => { if (text.IsEmpty()) { return; } var match = Build(text); matcher.Add(match); }); return(matcher); }
public void SetUp() { theMatcher = new FileMatcher(); theMatcher.Add(new EndsWithPatternMatch(FileChangeCategory.Application, "*.asset.config")); theMatcher.Add(new ExtensionMatch(FileChangeCategory.Content, "*.css")); theMatcher.Add(new ExtensionMatch(FileChangeCategory.Content, "*.spark")); }