コード例 #1
0
        public static Block WriteOutCells(IEnumerable<CellDefinition> cells, bool header){
            string tagname = header ? "th" : "td";
            var onitem = new Block();
            foreach (CellDefinition cell in cells){
                var opentag = new ExpressionInterpolationExpression();
                ExpressionInterpolationExpression attrs = getAttributes(cell.Attributes);
                opentag.append("<" + tagname).append(attrs).append(">");
                onitem.add(opentag.writeOut());
                onitem.add(cell.Value.brailOutResolve());

                onitem.Add(("</" + tagname + ">").toLiteral().writeOut());
            }
            return onitem;
        }
コード例 #2
0
            private void buildStartTag(string tagname, IEnumerable<Expression> argsource, Block innerblock) {
                IDictionary<string, string> defaults = null;
                if (DefaultAttributes.ContainsKey(tagname)){
                    defaults = DefaultAttributes[tagname];
                }
                ExpressionInterpolationExpression args = BrailBuildingHelper.getAttributes(argsource, defaults,
                                                                                           "class",
                                                                                           "id");

                if (tagname != "bmlempty"){
                    var tag = new ExpressionInterpolationExpression();
                    tag
                        .append("<" + tagname)
                        .append(args)
                        .append(">");
                    innerblock.add(BrailBuildingHelper.WriteOut(tag));
                }
            }