Esempio n. 1
0
        public void GetMatchingFiles_doesnt_crash_on_no_files()
        {
            var path = AppDomain.CurrentDomain.BaseDirectory;

            Assert.AreEqual(0, FileSupport.GetMatchingFiles("*.xadman", FileSupport.ProjectPath(path), true).Count());
            Assert.AreEqual(0, FileSupport.GetMatchingFiles("*.xadman", FileSupport.ProjectPath(path), false).Count());
        }
Esempio n. 2
0
        public IEnumerable <string> GetFileNames(string startDirectory)
        {
            startDirectory = Path.Combine(startDirectory, MetadataDirectory);
            var sources = FileSupport.GetMatchingFiles("*." + InputExtension, startDirectory, true)
                          .Where(x => !x.Contains("\\TemporaryGeneratedFile_"))
                          .Where(x => !x.Contains("\\AssemblyInfo.cs"))
                          .Where(x => !x.EndsWith(".g.cs"));

            return(sources);
        }
Esempio n. 3
0
        public void GetMatchingFiles_finds_files()
        {
            var path = AppDomain.CurrentDomain.BaseDirectory;

            Assert.AreEqual(3, FileSupport.GetMatchingFiles("*.kadcs", FileSupport.ProjectPath(path), true).Count());
            Assert.AreEqual(1, FileSupport.GetMatchingFiles("*.kadcs", FileSupport.ProjectPath(path), false).Count());
            var pattern = Path.Combine("..\\..", "*.kadcs");

            Assert.AreEqual(3, FileSupport.GetMatchingFiles("*.kadcs", FileSupport.ProjectPath(path), true).Count());
            Assert.AreEqual(1, FileSupport.GetMatchingFiles("*.kadcs", FileSupport.ProjectPath(path), false).Count());
            Assert.AreEqual(1, FileSupport.GetMatchingFiles("*.kadcs", FileSupport.ProjectPath(path)).Count());
        }
Esempio n. 4
0
        public IEnumerable <string> GetFileNames(string startDirectory)
        {
            var sources = FileSupport.GetMatchingFiles("*." + InputExtension, startDirectory, true).ToArray();

            return(sources);
        }