當前位置: 首頁>>代碼示例>>C#>>正文


C# Parse.at方法代碼示例

本文整理匯總了C#中fit.Parse.at方法的典型用法代碼示例。如果您正苦於以下問題:C# Parse.at方法的具體用法?C# Parse.at怎麽用?C# Parse.at使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在fit.Parse的用法示例。


在下文中一共展示了Parse.at方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: testIndexing

 public void testIndexing()
 {
     Parse p = new Parse("leader<table><tr><td>one</td><td>two</td><td>three</td></tr><tr><td>four</td></tr></table>trailer");
     Assert.AreEqual("one", p.at(0,0,0).body);
     Assert.AreEqual("two", p.at(0,0,1).body);
     Assert.AreEqual("three", p.at(0,0,2).body);
     Assert.AreEqual("three", p.at(0,0,3).body);
     Assert.AreEqual("three", p.at(0,0,4).body);
     Assert.AreEqual("four", p.at(0,1,0).body);
     Assert.AreEqual("four", p.at(0,1,1).body);
     Assert.AreEqual("four", p.at(0,2,0).body);
     Assert.AreEqual(1, p.size());
     Assert.AreEqual(2, p.parts.size());
     Assert.AreEqual(3, p.parts.parts.size());
     Assert.AreEqual("one", p.leaf().body);
     Assert.AreEqual("four", p.parts.last().leaf().body);
 }
開發者ID:juherr,項目名稱:fit,代碼行數:17,代碼來源:FrameworkTest.cs

示例3: getLinkedFixtureWithArgs

 /* Added from FitNesse*/
 protected Fixture getLinkedFixtureWithArgs(Parse tables)
 {
     Parse header = tables.at(0, 0, 0);
     Fixture fixture = loadFixture(header.text());
     fixture.counts = counts;
     fixture.summary = summary;
     fixture.getArgsForTable(tables);
     return fixture;
 }
開發者ID:juherr,項目名稱:fit,代碼行數:10,代碼來源:Fixture.cs

示例4: FixtureName

 public Parse FixtureName(Parse tables)
 {
     return tables.at(0, 0, 0);
 }
開發者ID:juherr,項目名稱:fit,代碼行數:4,代碼來源:Fixture.cs


注:本文中的fit.Parse.at方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。