public void externalizationTest() { res.Externalize(@"(?i)fileresolver[\s\S]*restest"); var resolvedpath = res.Resolve("~/tmp/_internal/folder/restest.txt", false); Assert.True(File.Exists(resolvedpath)); Assert.AreEqual("content", File.ReadAllText(resolvedpath)); }
public void CanResolveFileInRoot() { var f1 = write("f1"); Assert.AreEqual(f1.NormalizePath(), fr.Resolve("~/f1")); Assert.AreEqual(f1.NormalizePath(), fr.Resolve("f1")); }
private void EvalScriptPath() { _filename = FileNameResolver.Resolve("~/scripts/" + ScriptName + ".js"); }
private void EvalScriptPath() { _filename = FileNameResolver.Resolve("~/styles/" + StyleName + ".css"); }
/// <summary> /// processing of execution - main method of action /// </summary> /// <returns> </returns> protected override object MainProcess() { return(FileNameResolver.Resolve(FileName, Existed)); }
/// <summary> /// Определяет имя файла в текущей файловой системе, текущем контексте /// </summary> /// <param name="name">Имя файла</param> /// <param name="existed"> </param> /// <param name="resolvetype">тип файла</param> /// <returns> </returns> public string ResolveFileName(string name, bool existed = true, FileSearchResultType resolvetype = FileSearchResultType.FullPath) { return(FileNameResolver.Resolve(FileSearchQuery.Leveled(name, existed, resolvetype))); }