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));
        }
예제 #2
0
        public void CanResolveFileInRoot()
        {
            var f1 = write("f1");

            Assert.AreEqual(f1.NormalizePath(), fr.Resolve("~/f1"));
            Assert.AreEqual(f1.NormalizePath(), fr.Resolve("f1"));
        }
예제 #3
0
 private void EvalScriptPath()
 {
     _filename = FileNameResolver.Resolve("~/scripts/" + ScriptName + ".js");
 }
예제 #4
0
 private void EvalScriptPath()
 {
     _filename = FileNameResolver.Resolve("~/styles/" + StyleName + ".css");
 }
예제 #5
0
 /// <summary>
 ///     processing of execution - main method of action
 /// </summary>
 /// <returns> </returns>
 protected override object MainProcess()
 {
     return(FileNameResolver.Resolve(FileName, Existed));
 }
예제 #6
0
 /// <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)));
 }