示例#1
0
        private Template GetTemplate(FileFound fileFound)
        {
            Func<TextReader> getContentReader = () => new StreamReader(fileFound.Path);

            var fullDirectory = fileFound.Directory + "\\";
            var applicationPath = fullDirectory.Replace(rootPathProvider.GetRoot(), string.Empty).Substring(1);

            return new Template(fileFound.GetFileName(),
                                applicationPath,
                                "\\",
                                findModelFromViewCollection.FindModelType(getContentReader(), fileFound.GetFileName()),
                                getContentReader);
        }
示例#2
0
 public void OnFound(FileFound file)
 {
     onFound.Do(file);
 }