示例#1
0
 public NHamlMvcViewEngine()
 {
     InitializeBaseViewLocations();
     _contentProvider = new MapPathTemplateContentProvider();
     _templateEngine = XmlConfigurator.GetTemplateEngine(_contentProvider, GetDefaultUsings(), GetDefaultReferences());
     _templateEngine.TemplateContentProvider = _contentProvider;
     DefaultMaster = "Application";
 }
 public void SetUp()
 {
     var templateFactoryFactory = new TemplateFactoryFactory(
         new FileTemplateContentProvider(),
         new ViewSourceParser(new HamlFileLexer(), new HamlTreeParser()),
         new HamlDocumentWalker(new CodeDomClassBuilder()),
         new CodeDomTemplateCompiler(new CSharp2TemplateTypeBuilder()),
         new List<string>(),
         new List<string>());
     _templateEngine = new TemplateEngine(new SimpleTemplateCache(), templateFactoryFactory);
 }
示例#3
0
 public void SetUp()
 {
     _templateCache = new SimpleTemplateCache();
     _templateCache.Clear();
     _templateFactoryFactoryMock = new Mock<ITemplateFactoryFactory>();
     _templateEngine = new TemplateEngine(_templateCache, _templateFactoryFactoryMock.Object);
 }