本文整理汇总了C#中Mono.Xml.XPath2.XPathSequence.GetEnumerator方法的典型用法代码示例。如果您正苦于以下问题:C# XPathSequence.GetEnumerator方法的具体用法?C# XPathSequence.GetEnumerator怎么用?C# XPathSequence.GetEnumerator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Xml.XPath2.XPathSequence
的用法示例。
在下文中一共展示了XPathSequence.GetEnumerator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FnEmpty
public static bool FnEmpty (XPathSequence e)
{
if (e is XPathEmptySequence)
return true;
return !e.GetEnumerator ().MoveNext ();
}
示例2: FnIndexOf
public static XPathSequence FnIndexOf (XQueryContext ctx, XPathSequence items, XPathItem item, CultureInfo ci)
{
ArrayList al = new ArrayList ();
IEnumerator e = items.GetEnumerator ();
for (int i = 0; e.MoveNext (); i++) {
XPathItem iter = e.Current as XPathItem;
if (iter.XmlType.TypeCode == XmlTypeCode.String) {
if (ci.CompareInfo.Compare (iter.Value, item.Value) == 0)
al.Add (i);
}
else {
IComparable ic = (IComparable) iter.TypedValue;
if (ic.CompareTo ((IComparable) item.TypedValue) == 0)
al.Add (i);
}
}
return new ListIterator (ctx, al);
}