예제 #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);
            }
        }
예제 #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;
        }
예제 #3
0
파일: FileMatcher.cs 프로젝트: KevM/fubu
        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);
        }
예제 #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"));
        }