private static JasperServiceConfiguration serviceConfiguration() { var directory = FubuRuntime.DefaultApplicationPath(); var fileSystem = new FileSystem(); return(fileSystem.LoadFromFile <JasperServiceConfiguration>(directory, JasperServiceConfiguration.FILE)); }
public void ignores_excluded_folders() { var faf = new FubuApplicationFiles(FubuRuntime.DefaultApplicationPath().AppendPath("Views", "Razor")); ClassUnderTest.Search.AppendExclude("*A3.cshtml"); ClassUnderTest.Search.AppendExclude("Templates/*.*"); var path = System.Reflection.Assembly.GetExecutingAssembly().Location; var ex = ClassUnderTest.Search.ExcludedFilesFor(faf.RootPath); var inc = ClassUnderTest.Search.IncludedFilesFor(faf.RootPath); var files = faf.FindFiles(ClassUnderTest.Search); files.ShouldNotContain(f => f.Path.EndsWith("A3.cshtml")); files.ShouldNotContain(f => f.Path.EndsWith("A4.cshtml")); }
public IEnumerable <T> ReadFile(string fileName) { _list.Clear(); var file = FileLocation.RootPath.AppendPath(fileName); if (!File.Exists(file)) { file = FubuRuntime.DefaultApplicationPath().AppendPath("bin", fileName); } if (!File.Exists(file)) { file = FubuRuntime.DefaultApplicationPath().AppendPath("bin\\release", fileName); } using (var stream = File.OpenRead(file)) { Load(stream); } return(_list); }
public void UseParallelServiceDirectory(string directory) { var path = FubuRuntime.DefaultApplicationPath(); ServiceDirectory = path.ParentDirectory().AppendPath(directory); }
public static IFubuApplicationFiles ForDefault() { return(new FubuApplicationFiles(FubuRuntime.DefaultApplicationPath())); }
public static IFubuFile Load(string relativePath) { return(new FubuApplicationFiles(FubuRuntime.DefaultApplicationPath()).Find(relativePath)); }