当前位置: 首页>>代码示例>>C#>>正文


C# Parse.addToTag方法代码示例

本文整理汇总了C#中fit.Parse.addToTag方法的典型用法代码示例。如果您正苦于以下问题:C# Parse.addToTag方法的具体用法?C# Parse.addToTag怎么用?C# Parse.addToTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fit.Parse的用法示例。


在下文中一共展示了Parse.addToTag方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ResultingHTML

        public String ResultingHTML()
        {
            Parse table = new Parse(OriginalHTML);
            Parse row = table.at(0, Row - 1);
            Parse cell = row.at(0, Column - 1);

            if (OverwriteCellBody != null) cell.body = OverwriteCellBody;
            if (AddToCellBody != null) cell.addToBody(AddToCellBody);

            if (OverwriteCellTag != null) cell.tag = OverwriteCellTag;
            if (OverwriteEndCellTag != null) cell.end = OverwriteEndCellTag;
            if (AddToCellTag != null) cell.addToTag(stripDelimiters(AddToCellTag));

            if (OverwriteRowTag != null) row.tag = OverwriteRowTag;
            if (OverwriteEndRowTag != null) row.end = OverwriteEndRowTag;
            if (AddToRowTag != null) row.addToTag(stripDelimiters(AddToRowTag));

            if (OverwriteTableTag != null) table.tag = OverwriteTableTag;
            if (OverwriteEndTableTag != null) table.end = OverwriteEndTableTag;
            if (AddToTableTag != null) table.addToTag(stripDelimiters(AddToTableTag));

            if (AddCellFollowing != null) addParse(cell, AddCellFollowing, new String[] {"td"});
            if (RemoveFollowingCell != null) removeParse(cell);

            if (AddRowFollowing != null) addParse(row, AddRowFollowing, new String[] {"tr", "td"});
            if (RemoveFollowingRow != null) removeParse(row);

            if (AddTableFollowing != null) addParse(table, AddTableFollowing, new String[] {"table", "tr", "td"});

            return GenerateOutput(table);
        }
开发者ID:juherr,项目名称:fit,代码行数:31,代码来源:AnnotationFixture.cs

示例2: wrong

 public virtual void wrong(Parse cell)
 {
     cell.addToTag(" bgcolor=\"" + red + "\"");
     cell.body = escape(cell.text());
     counts.wrong++;
 }
开发者ID:juherr,项目名称:fit,代码行数:6,代码来源:Fixture.cs

示例3: right

 public virtual void right(Parse cell)
 {
     cell.addToTag(" bgcolor=\"" + green + "\"");
     counts.right++;
 }
开发者ID:juherr,项目名称:fit,代码行数:5,代码来源:Fixture.cs

示例4: ignore

 public virtual void ignore(Parse cell)
 {
     cell.addToTag(" bgcolor=\"#efefef\"");
     counts.ignores++;
 }
开发者ID:juherr,项目名称:fit,代码行数:5,代码来源:Fixture.cs

示例5: error

 public void error(Parse cell, String message)
 {
     cell.body = escape(cell.text());
     cell.addToBody("<hr><pre>" + escape(message) + "</pre>");
     cell.addToTag(" bgcolor=\"" + yellow + "\"");
     counts.exceptions++;
 }
开发者ID:juherr,项目名称:fit,代码行数:7,代码来源:Fixture.cs

示例6: buildCells

 protected virtual Parse buildCells(object row)
 {
     if (row == null) {
         Parse nil = new Parse("td", "null", null, null);
         nil.addToTag(" colspan="+columnBindings.Length);
         return nil;
     }
     Parse root = new Parse(null, null, null, null);
     Parse next = root;
     for (int i=0; i<columnBindings.Length; i++) {
         next = next.more = new Parse("td", "&nbsp;", null, null);
         TypeAdapter a = columnBindings[i];
         if (a == null) {
             ignore (next);
         }
         else {
             try {
                 a.target = row;
                 info(next, a.get().ToString());
             }
             catch (Exception e) {
                 exception(next, e);
             }
         }
     }
     return root.more;
 }
开发者ID:juherr,项目名称:fit,代码行数:27,代码来源:RowFixture.cs


注:本文中的fit.Parse.addToTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。