コード例 #1
0
ファイル: NHamlMvcViewEngine.cs プロジェクト: hobdrive/NHaml
 public NHamlMvcViewEngine()
 {
     InitializeBaseViewLocations();
     _contentProvider = new MapPathTemplateContentProvider();
     _templateEngine = XmlConfigurator.GetTemplateEngine(_contentProvider, GetDefaultUsings(), GetDefaultReferences());
     _templateEngine.TemplateContentProvider = _contentProvider;
     DefaultMaster = "Application";
 }
コード例 #2
0
 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);
 }