Ejemplo n.º 1
0
        public static HamlNodeWalker GetNodeWalker(Type nodeType, int sourceFileLineNo, ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
        {
            if (nodeType == typeof(HamlNodeTagId)
                || nodeType == typeof(HamlNodeTagClass)
                || nodeType == typeof(HamlNodeHtmlAttributeCollection)) return null;
            if (nodeType == typeof(HamlNodeTextContainer))
                return new HamlNodeTextContainerWalker(classBuilder, options);
            if (nodeType == typeof(HamlNodeTag))
                return new HamlNodeTagWalker(classBuilder, options);
            if (nodeType == typeof(HamlNodeHtmlComment))
                return new HamlNodeHtmlCommentWalker(classBuilder, options);
            if (nodeType == typeof(HamlNodeHamlComment))
                return new HamlNodeHamlCommentWalker(classBuilder, options);
            if (nodeType == typeof(HamlNodeEval))
                return new HamlNodeEvalWalker(classBuilder, options);
            if (nodeType == typeof(HamlNodeCode))
                return new HamlNodeCodeWalker(classBuilder, options);
            if (nodeType == typeof(HamlNodeTextLiteral))
                return new HamlNodeTextLiteralWalker(classBuilder, options);
            if (nodeType == typeof(HamlNodeTextVariable))
                return new HamlNodeTextVariableWalker(classBuilder, options);
            if (nodeType == typeof(HamlNodeDocType))
                return new HamlNodeDocTypeWalker(classBuilder, options);
            if (nodeType == typeof(HamlNodePartial))
                return new HamlPartialWalker(classBuilder, options);

            throw new HamlUnknownNodeTypeException(nodeType, sourceFileLineNo);
        }
Ejemplo n.º 2
0
        protected HamlNodeWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
        {
            Invariant.ArgumentNotNull(options, "options");
            Invariant.ArgumentNotNull(classBuilder, "classBuilder");

            ClassBuilder = classBuilder;
            Options      = options;
        }
 public HamlNodeHtmlAttributeCollectionWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 4
0
 public HamlNodeHtmlAttributeCollectionWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 5
0
 public HamlNodeTextVariableWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 6
0
 public HamlNodeDocTypeWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 7
0
        public static HamlNodeWalker GetNodeWalker(Type nodeType, int sourceFileLineNo, ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
        {
            if (nodeType == typeof(HamlNodeTagId) ||
                nodeType == typeof(HamlNodeTagClass) ||
                nodeType == typeof(HamlNodeHtmlAttributeCollection))
            {
                return(null);
            }
            if (nodeType == typeof(HamlNodeTextContainer))
            {
                return(new HamlNodeTextContainerWalker(classBuilder, options));
            }
            if (nodeType == typeof(HamlNodeTag))
            {
                return(new HamlNodeTagWalker(classBuilder, options));
            }
            if (nodeType == typeof(HamlNodeHtmlComment))
            {
                return(new HamlNodeHtmlCommentWalker(classBuilder, options));
            }
            if (nodeType == typeof(HamlNodeHamlComment))
            {
                return(new HamlNodeHamlCommentWalker(classBuilder, options));
            }
            if (nodeType == typeof(HamlNodeEval))
            {
                return(new HamlNodeEvalWalker(classBuilder, options));
            }
            if (nodeType == typeof(HamlNodeCode))
            {
                return(new HamlNodeCodeWalker(classBuilder, options));
            }
            if (nodeType == typeof(HamlNodeTextLiteral))
            {
                return(new HamlNodeTextLiteralWalker(classBuilder, options));
            }
            if (nodeType == typeof(HamlNodeTextVariable))
            {
                return(new HamlNodeTextVariableWalker(classBuilder, options));
            }
            if (nodeType == typeof(HamlNodeDocType))
            {
                return(new HamlNodeDocTypeWalker(classBuilder, options));
            }
            if (nodeType == typeof(HamlNodePartial))
            {
                return(new HamlPartialWalker(classBuilder, options));
            }

            throw new HamlUnknownNodeTypeException(nodeType, sourceFileLineNo);
        }
Ejemplo n.º 8
0
 public HamlNodeTextContainerWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 9
0
 public HamlNodeTextLiteralWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 10
0
 public HamlNodeTextContainerWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 11
0
 public HamlPartialWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions htmlOptions)
     : base(classBuilder, htmlOptions)
 {
 }
Ejemplo n.º 12
0
 public HamlDocumentWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions htmlOptions)
     : base(classBuilder, htmlOptions)
 {
 }
Ejemplo n.º 13
0
 public HamlDocumentWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions htmlOptions)
     : base(classBuilder, htmlOptions)
 {
 }
 public void SetUp()
 {
     _classBuilderMock = new ClassBuilderMock();
     _hamlOptions = new HamlHtmlOptions();
     _walker = new HamlNodeHtmlCommentWalker(_classBuilderMock, _hamlOptions);
 }
Ejemplo n.º 15
0
 public DummyWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 16
0
 public HamlNodeTextVariableWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 17
0
 public HamlNodeHtmlCommentWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 18
0
 public void SetUp()
 {
     _classBuilderMock = new ClassBuilderMock();
     _hamlOptions = new HamlHtmlOptions();
     _tagWalker = new HamlNodeTagWalker(_classBuilderMock, _hamlOptions);
 }
Ejemplo n.º 19
0
 public HamlNodeHamlCommentWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 20
0
 public HamlNodeDocTypeWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 21
0
 public HamlNodeTextLiteralWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions options)
     : base(classBuilder, options)
 {
 }
Ejemplo n.º 22
0
 public HamlPartialWalker(ITemplateClassBuilder classBuilder, HamlHtmlOptions htmlOptions)
     : base(classBuilder, htmlOptions)
 {
 }