Esempio n. 1
0
 public HamlDocument ParseViewSource(ViewSource layoutViewSource)
 {
     using (var streamReader = layoutViewSource.GetTextReader())
     {
         return ParseStreamReader(streamReader, layoutViewSource.FileName);
     }
 }
Esempio n. 2
0
 public HamlDocument Parse(ViewSource viewSource)
 {
     using (var streamReader = viewSource.GetTextReader())
     {
         var hamlFile = _fileLexer.Read(streamReader, viewSource.FileName);
         return _treeParser.ParseHamlFile(hamlFile);
     }
 }
Esempio n. 3
0
 public string GetTemplateSource(ViewSource viewSource, Type templateBaseType)
 {
     var viewSourceCollection = new ViewSourceCollection { viewSource };
     var className = viewSourceCollection.GetClassName();
     return _templateFactoryFactory.GetTemplateSource(className, viewSourceCollection, templateBaseType);
 }
Esempio n. 4
0
 public TemplateFactory GetCompiledTemplate(ViewSource viewSource, Type templateBaseType)
 {
     return GetCompiledTemplate(new ViewSourceCollection { viewSource }, templateBaseType);
 }
Esempio n. 5
0
 public TemplateFactory CompileTemplateFactory(string className, ViewSource viewSource)
 {
     return CompileTemplateFactory(className, new ViewSourceCollection { viewSource }, typeof(TemplateBase.Template));
 }