本文整理汇总了C#中System.Collections.Generic.List.MoveNext方法的典型用法代码示例。如果您正苦于以下问题:C# System.Collections.Generic.List.MoveNext方法的具体用法?C# System.Collections.Generic.List.MoveNext怎么用?C# System.Collections.Generic.List.MoveNext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Collections.Generic.List
的用法示例。
在下文中一共展示了System.Collections.Generic.List.MoveNext方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChildNavigator
public ChildNavigator(IDataViewStrategy dataStore,IndexList indexList)
{
if (dataStore == null) {
throw new ArgumentNullException("dataStore");
}
this.store = dataStore;
this.indexList = indexList;
genEnumerator = this.indexList.GetEnumerator();
genEnumerator.MoveNext();
}
示例2: ConvertPosix2DotNetExpr
/// <summary>
/// Converts POSIX regular expression to .NET Framework regular expression
/// </summary>
/// <param name="expr">POSIX 1003.2 regular expression</param>
/// <returns>.NET Framework compatible regular expression</returns>
// WORKING: change to private!
public static string ConvertPosix2DotNetExpr(string expr)
{
if (expr == null) return "";
// number that is not used in automaton
const int errorState = 99;
// 0 == initial state
int state = 0;
// iterator for iterating in strings
#if !SILVERLIGHT
CharEnumerator ch = expr.GetEnumerator();
#else
System.Collections.Generic.IEnumerator<char> ch = new System.Collections.Generic.List<char>(expr.ToCharArray()).GetEnumerator();
#endif
// true if we are at the end of bracket expression
bool eOfExpr = false;
// true if we have read next character and this character is not applicable for current state,
// we change state with lambda step and there is character scanned again
// true if we are changing state and the character should be scanned again
bool lambdaStep = false;
// into this StringBuilder is converted regular expression written
// 2*expr.Length is estimated necessary length of output string
StringBuilder output = new StringBuilder(2 * expr.Length);
// bracket expressions are very complicated, we have made separate class for managing them
// if we need to create bracket expression class instance, we store it in this variable
// and reuse it after Reset() call
BracketExpression be = null;
eOfExpr = !ch.MoveNext();
while (!eOfExpr)
{
switch (state)
{
case 0: // initial state
switch (ch.Current)
{
case '\\':
state = 1;
break;
case '[':
state = 2;
if (be != null) // bracket expr. already exists, reset it only
be.Reset();
else
be = new BracketExpression();
break;
case '(':
state = 15;
break;
default:
output.Append(ch.Current);
break;
}
break;
case 1:
if (controlCharsMap.Contains(ch.Current))
{ // control character - must be preppended by '\'
output.Append('\\');
}
output.Append(ch.Current);
state = 0;
break;
case 2:
switch (ch.Current)
{
case '^':
be.Negation = true;
state = 3;
break;
case ']':
be.Append(']');
state = 4;
break;
default:
lambdaStep = true;
state = 4;
break;
}
break;
//.........这里部分代码省略.........