コード例 #1
0
ファイル: HamlDocumentBuilder.cs プロジェクト: hobdrive/NHaml
 public static HamlDocument Create(string documentName, params HamlNode[] nodes)
 {
     var document = new HamlDocument(documentName);
     foreach (var node in nodes)
         document.AddChild(node);
     return document;
 }
コード例 #2
0
ファイル: HamlTreeParser.cs プロジェクト: hobdrive/NHaml
        public HamlDocument ParseHamlFile(HamlFile hamlFile)
        {
            var result = new HamlDocument(hamlFile.FileName);

            ParseNode(result, hamlFile);

            return result;
        }
コード例 #3
0
        public HamlDocument ParseHamlFile(HamlFile hamlFile)
        {
            var result = new HamlDocument(hamlFile.FileName);

            ParseNode(result, hamlFile);

            return(result);
        }
コード例 #4
0
        // TODO - Missing tests
        private HamlDocument ApplyMasterPage(HamlDocument hamlDocument, HamlDocument masterPage)
        {
            if (masterPage == null) return hamlDocument;

            HamlNodePartial partial = masterPage.GetNextUnresolvedPartial();
            partial.SetDocument(hamlDocument);
            return masterPage;
        }
コード例 #5
0
ファイル: HamlDocumentWalker.cs プロジェクト: hobdrive/NHaml
 public string Walk(HamlDocument document, string className, Type baseType, IEnumerable<string> imports)
 {
     ClassBuilder.Clear();
     base.Walk(document);
     return ClassBuilder.Build(className, baseType, imports);
 }