Пример #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);
 }