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


C# Line.GetNext方法代码示例

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


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

示例1: AbsorbAnyBlanks

        /***************************************************************************
         * Function: AbsorbAnyBlanks
         * Purpose:
         * Update PLINE by making it point to the first non-blank
         * at-or-after from but not after limit.
         * If they are all blank then make it point to limit
         * If from is non-blank then leave it alone.
         * Return true iff PLINE was updated.
         * It is legit for limit to be null (meaning end of file).*/
        public static bool AbsorbAnyBlanks(ref Line from , Line limit, bool bMoveToNext )
        {
            bool progress = false;

            while ( ( from != null ) && ( from.IsBlank() ) && ( from != limit ) ) {
                if( bMoveToNext ) from = (Line)from.GetNext();
                else			  from = (Line)from.GetPrev();
                progress = true;
            }
            return progress;
        }
开发者ID:otodo,项目名称:Diffbycs,代码行数:20,代码来源:Section.cs

示例2: NextNonIgnorable

 /***************************************************************************
  * Function: NextNonIgnorable
  * Purpose:
  * An ignorable line is a blank line with no link and isIgnoreBlanks set
  * Given that line is initially not null and not ignorable:
  * If line is the last line in the list then return null
  * Else If isIgnoreBlanks is false then return the next line after line
  * else return next line which has a link or which is non-blank.
  * If there is no such line then return the last line in the list.
  * Note that this does always make progress (at the cost of sometimes returning null). */
 public static Line NextNonIgnorable(Line line,bool isIgnoreBlanks)
 {
     Line next = (Line)line.GetNext();
     if (next==null) return null;
     for(;;){
         line = next;
         if( line.link != null )	return line;
         if( !isIgnoreBlanks )	return line;
         if( !line.IsBlank() )	return line;
         next = (Line)line.GetNext();
         if( next == null ) return line;
     }
 }
开发者ID:otodo,项目名称:Diffbycs,代码行数:23,代码来源:Section.cs

示例3: FindEndOfUnmatched

 /***************************************************************************
  * Function: FindEndOfUnmatched
  * Purpose:
  * Returns a Line which is the last line in an unmatched section
  * containing (probably starting with) Line.
  * Note that it does not necessarily make progress.
  * As noted above, even if blank lines are being ignored, we don't
  * mind tagging them onto the end of an already unmatching section.
  * This means we carry on until we find the first real link */
 public static Line FindEndOfUnmatched(Line line)
 {
     for(;;){
         Line next = (Line)line.GetNext();
         if( next == null ) return line;
         if( next.link != null ) return line;
         line = next;
     }
 }
开发者ID:otodo,项目名称:Diffbycs,代码行数:18,代码来源:Section.cs


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