示例#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"));
        }