Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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"));
        }